summaryrefslogtreecommitdiff
path: root/gcc/cp/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r--gcc/cp/error.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index ee8f0e082a5..6595063637b 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -1556,6 +1556,8 @@ dump_function_name (tree t, int flags)
{
if (LAMBDA_TYPE_P (DECL_CONTEXT (t)))
name = get_identifier ("<lambda>");
+ else if (TYPE_ANONYMOUS_P (DECL_CONTEXT (t)))
+ name = get_identifier ("<constructor>");
else
name = constructor_name (DECL_CONTEXT (t));
}
@@ -3304,7 +3306,7 @@ maybe_warn_cpp0x (cpp0x_warn_str str)
"only available with -std=c++11 or -std=gnu++11");
break;
case CPP0X_INLINE_NAMESPACES:
- pedwarn (input_location, OPT_pedantic,
+ pedwarn (input_location, OPT_Wpedantic,
"inline namespaces "
"only available with -std=c++11 or -std=gnu++11");
break;
@@ -3350,13 +3352,15 @@ pedwarn_cxx98 (location_t location, int opt, const char *gmsgid, ...)
{
diagnostic_info diagnostic;
va_list ap;
+ bool ret;
va_start (ap, gmsgid);
diagnostic_set_info (&diagnostic, gmsgid, &ap, location,
(cxx_dialect == cxx98) ? DK_PEDWARN : DK_WARNING);
diagnostic.option_index = opt;
+ ret = report_diagnostic (&diagnostic);
va_end (ap);
- return report_diagnostic (&diagnostic);
+ return ret;
}
/* Issue a diagnostic that NAME cannot be found in SCOPE. DECL is what