revert: parser.c (cp_parser_member_declaration): Pedwarn about stray semicolons after member declarations.

cp:
	Revert:
	2007-03-26  Dirk Mueller  <dmueller@suse.de>

	* parser.c (cp_parser_member_declaration): Pedwarn
	about stray semicolons after member declarations.

testsuite:
	* g++.dg/warn/pedantic2.C: Fix error marker.  Add more tests.

	Revert:
	2007-03-22  Dirk Mueller  <dmueller@suse.de>

	* g++.old-deja/g++.brendan/warnings2.C: Don't use -pedantic.

From-SVN: r127226
This commit is contained in:
Volker Reichelt 2007-08-05 20:09:32 +00:00 committed by Volker Reichelt
parent 0d475361a5
commit 9dfbac5b94
5 changed files with 23 additions and 8 deletions

View File

@ -1,3 +1,10 @@
2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
Revert:
2007-03-26 Dirk Mueller <dmueller@suse.de>
* parser.c (cp_parser_member_declaration): Pedwarn
about stray semicolons after member declarations.
2007-08-02 Lee Millward <lee.millward@gmail.com>

View File

@ -15001,11 +15001,7 @@ cp_parser_member_declaration (cp_parser* parser)
token = cp_lexer_peek_token (parser->lexer);
/* If the next token is a semicolon, consume it. */
if (token->type == CPP_SEMICOLON)
{
if (pedantic && !in_system_header)
pedwarn ("extra %<;%>");
cp_lexer_consume_token (parser->lexer);
}
cp_lexer_consume_token (parser->lexer);
return;
}
else

View File

@ -1,3 +1,12 @@
2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
* g++.dg/warn/pedantic2.C: Fix error marker. Add more tests.
Revert:
2007-03-22 Dirk Mueller <dmueller@suse.de>
* g++.old-deja/g++.brendan/warnings2.C: Don't use -pedantic.
2007-08-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/32979

View File

@ -2,5 +2,9 @@
class foo
{
foo() {}; // { dg-error "extra" }
foo() {};
void bar() {};
foo(int) {};; // { dg-error "extra" }
void bar(int) {};; // { dg-error "extra" }
};

View File

@ -1,5 +1,4 @@
// { dg-do compile }
// { dg-options "-Wall -Wextra" }
// { dg-do assemble }
// GROUPS passed warnings
class K {
public: