diff options
author | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2008-08-21 10:55:13 +0000 |
---|---|---|
committer | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2008-08-21 10:55:13 +0000 |
commit | 509c9d60e430b84903eb1232a70871aa93150623 (patch) | |
tree | 83b0791500b25a6c18b622d8641f3ac55eb3f00b /gcc/cp/parser.c | |
parent | 2fb63453bdd24fff367b4ddb18c59b3972520728 (diff) | |
download | gcc-509c9d60e430b84903eb1232a70871aa93150623.zip gcc-509c9d60e430b84903eb1232a70871aa93150623.tar.gz gcc-509c9d60e430b84903eb1232a70871aa93150623.tar.bz2 |
diagnostic.c (pedwarn_at): Rename as pedwarn.
2008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
* diagnostic.c (pedwarn_at): Rename as pedwarn.
(pedwarn): Delete.
* toplev.h (pedwarn_at): Likewise.
* builtins.c: Update all calls to pedwarn.
* c-lex.c: Likewise.
* toplev.c: Likewise.
* c-tree.h: Likewise.
* c-decl.c: Likewise.
* c-errors.c: Likewise.
* c-typeck.c: Likewise.
* c-common.c: Likewise.
* c-parser.c: Likewise.
cp/
* typeck.c: Update all calls to pedwarn.
* decl.c: Likewise.
* call.c: Likewise.
* error.c: Likewise.
* pt.c: Likewise.
* name-lookup.c: Likewise.
* parser.c: Likewise.
fortran/
* f95-lang.c: Update all calls to pedwarn.
From-SVN: r139373
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r-- | gcc/cp/parser.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index ccbecd7..357d1cb 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -2162,9 +2162,8 @@ cp_parser_check_decl_spec (cp_decl_specifier_seq *decl_specs, error ("%H%<long long long%> is too long for GCC", &location); else if (pedantic && !in_system_header && warn_long_long && cxx_dialect == cxx98) - pedwarn (OPT_Wlong_long, - "%HISO C++ 1998 does not support %<long long%>", - &location); + pedwarn (location, OPT_Wlong_long, + "ISO C++ 1998 does not support %<long long%>"); } else if (count > 1) { @@ -3217,9 +3216,8 @@ cp_parser_primary_expression (cp_parser *parser, && cp_lexer_next_token_is (parser->lexer, CPP_OPEN_BRACE)) { /* Statement-expressions are not allowed by the standard. */ - pedwarn (OPT_pedantic, - "%HISO C++ forbids braced-groups within expressions", - &token->location); + pedwarn (token->location, OPT_pedantic, + "ISO C++ forbids braced-groups within expressions"); /* And they're not allowed outside of a function-body; you cannot, for example, write: @@ -4548,7 +4546,7 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p, bool cast_p, { /* Warn the user that a compound literal is not allowed in standard C++. */ - pedwarn (OPT_pedantic, "ISO C++ forbids compound-literals"); + pedwarn (input_location, OPT_pedantic, "ISO C++ forbids compound-literals"); /* For simplicity, we disallow compound literals in constant-expressions. We could allow compound literals of integer type, whose @@ -7612,7 +7610,7 @@ cp_parser_jump_statement (cp_parser* parser) if (cp_lexer_next_token_is (parser->lexer, CPP_MULT)) { /* Issue a warning about this use of a GNU extension. */ - pedwarn (OPT_pedantic, "%HISO C++ forbids computed gotos", &token->location); + pedwarn (token->location, OPT_pedantic, "ISO C++ forbids computed gotos"); /* Consume the '*' token. */ cp_lexer_consume_token (parser->lexer); /* Parse the dependent expression. */ @@ -7752,7 +7750,7 @@ cp_parser_declaration_seq_opt (cp_parser* parser) invalid. Allow it unless we're being pedantic. */ cp_lexer_consume_token (parser->lexer); if (!in_system_header) - pedwarn (OPT_pedantic, "extra %<;%>"); + pedwarn (input_location, OPT_pedantic, "extra %<;%>"); continue; } @@ -11740,7 +11738,7 @@ cp_parser_enumerator_list (cp_parser* parser, tree type) if (cp_lexer_next_token_is (parser->lexer, CPP_CLOSE_BRACE)) { if (!in_system_header) - pedwarn (OPT_pedantic, "comma at end of enumerator list"); + pedwarn (input_location, OPT_pedantic, "comma at end of enumerator list"); break; } } @@ -14384,7 +14382,7 @@ cp_parser_initializer_list (cp_parser* parser, bool* non_constant_p) && cp_lexer_peek_nth_token (parser->lexer, 2)->type == CPP_COLON) { /* Warn the user that they are using an extension. */ - pedwarn (OPT_pedantic, + pedwarn (input_location, OPT_pedantic, "ISO C++ does not allow designated initializers"); /* Consume the identifier. */ identifier = cp_lexer_consume_token (parser->lexer)->u.value; @@ -15408,7 +15406,7 @@ cp_parser_member_declaration (cp_parser* parser) { cp_token *token = cp_lexer_peek_token (parser->lexer); if (!in_system_header_at (token->location)) - pedwarn (OPT_pedantic, "%Hextra %<;%>", &token->location); + pedwarn (token->location, OPT_pedantic, "extra %<;%>"); } else { |