From 9dfbac5b94278cac26c43986553827e0fe4adc8e Mon Sep 17 00:00:00 2001 From: Volker Reichelt Date: Sun, 5 Aug 2007 20:09:32 +0000 Subject: [PATCH] revert: parser.c (cp_parser_member_declaration): Pedwarn about stray semicolons after member declarations. cp: Revert: 2007-03-26 Dirk Mueller * 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 * g++.old-deja/g++.brendan/warnings2.C: Don't use -pedantic. From-SVN: r127226 --- gcc/cp/ChangeLog | 7 +++++++ gcc/cp/parser.c | 6 +----- gcc/testsuite/ChangeLog | 9 +++++++++ gcc/testsuite/g++.dg/warn/pedantic2.C | 6 +++++- gcc/testsuite/g++.old-deja/g++.brendan/warnings2.C | 3 +-- 5 files changed, 23 insertions(+), 8 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 26edb7dfdcff..c14a911b6670 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +2007-08-05 Volker Reichelt + + Revert: + 2007-03-26 Dirk Mueller + + * parser.c (cp_parser_member_declaration): Pedwarn + about stray semicolons after member declarations. 2007-08-02 Lee Millward diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 530ddbae8a2a..a4ae9970c286 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -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 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f32d54a7f5f0..e349f1c9cca8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2007-08-05 Volker Reichelt + + * g++.dg/warn/pedantic2.C: Fix error marker. Add more tests. + + Revert: + 2007-03-22 Dirk Mueller + + * g++.old-deja/g++.brendan/warnings2.C: Don't use -pedantic. + 2007-08-05 Francois-Xavier Coudert PR fortran/32979 diff --git a/gcc/testsuite/g++.dg/warn/pedantic2.C b/gcc/testsuite/g++.dg/warn/pedantic2.C index 6302a37b8ca2..5a9bf1d39252 100644 --- a/gcc/testsuite/g++.dg/warn/pedantic2.C +++ b/gcc/testsuite/g++.dg/warn/pedantic2.C @@ -2,5 +2,9 @@ class foo { - foo() {}; // { dg-error "extra" } + foo() {}; + void bar() {}; + + foo(int) {};; // { dg-error "extra" } + void bar(int) {};; // { dg-error "extra" } }; diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/warnings2.C b/gcc/testsuite/g++.old-deja/g++.brendan/warnings2.C index a65f818bd2c0..665c7a425545 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/warnings2.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/warnings2.C @@ -1,5 +1,4 @@ -// { dg-do compile } -// { dg-options "-Wall -Wextra" } +// { dg-do assemble } // GROUPS passed warnings class K { public: