aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r--gcc/cp/parser.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index a53c0293..81cd03f 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -4111,10 +4111,10 @@ cp_parser_nested_name_specifier_opt (cp_parser *parser,
&& !(TREE_CODE (new_scope) == TYPENAME_TYPE
&& (TREE_CODE (TYPENAME_TYPE_FULLNAME (new_scope))
== TEMPLATE_ID_EXPR)))
- pedwarn (TYPE_P (new_scope)
- ? "%qT is not a template"
- : "%qD is not a template",
- new_scope);
+ permerror (TYPE_P (new_scope)
+ ? "%qT is not a template"
+ : "%qD is not a template",
+ new_scope);
/* If it is a class scope, try to complete it; we are about to
be looking up names inside the class. */
if (TYPE_P (new_scope)
@@ -8928,7 +8928,7 @@ cp_parser_mem_initializer (cp_parser* parser)
/* Find out what is being initialized. */
if (cp_lexer_next_token_is (parser->lexer, CPP_OPEN_PAREN))
{
- pedwarn ("anachronistic old-style base class initializer");
+ permerror ("anachronistic old-style base class initializer");
mem_initializer_id = NULL_TREE;
}
else
@@ -9845,7 +9845,7 @@ cp_parser_template_id (cp_parser *parser,
static bool hint;
if (!hint)
{
- inform ("(if you use -fpermissive G++ will accept your code)");
+ inform ("(if you use %<-fpermissive%> G++ will accept your code)");
hint = true;
}
}
@@ -11186,7 +11186,7 @@ cp_parser_elaborated_type_specifier (cp_parser* parser,
tag_type = typename_type;
/* The `typename' keyword is only allowed in templates. */
if (!processing_template_decl)
- pedwarn ("using %<typename%> outside of template");
+ permerror ("using %<typename%> outside of template");
}
/* Otherwise it must be a class-key. */
else
@@ -13865,7 +13865,7 @@ cp_parser_parameter_declaration (cp_parser *parser,
if (!parser->default_arg_ok_p)
{
- if (!flag_pedantic_errors)
+ if (flag_permissive)
warning (0, "deprecated use of default argument for parameter of non-function");
else
{
@@ -14758,7 +14758,7 @@ cp_parser_class_head (cp_parser* parser,
class member of a namespace outside of its namespace. */
if (scope == nested_name_specifier)
{
- pedwarn ("extra qualification ignored");
+ permerror ("extra qualification not allowed");
nested_name_specifier = NULL_TREE;
num_templates = 0;
}
@@ -18121,7 +18121,7 @@ static void
cp_parser_check_class_key (enum tag_types class_key, tree type)
{
if ((TREE_CODE (type) == UNION_TYPE) != (class_key == union_type))
- pedwarn ("%qs tag used in naming %q#T",
+ permerror ("%qs tag used in naming %q#T",
class_key == union_type ? "union"
: class_key == record_type ? "struct" : "class",
type);