This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Semicolons at the end of member function definitions
- From: Volker Reichelt <v dot reichelt at netcologne dot de>
- To: Dirk Mueller <dmueller at suse dot de>, Gabriel Dos Reis <gdr at cs dot tamu dot edu>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 31 Jul 2007 04:42:28 +0200 (CEST)
- Subject: Semicolons at the end of member function definitions
Hi,
I just stumbled over the patch
2007-03-26 Dirk Mueller <dmueller@suse.de>
* parser.c (cp_parser_member_declaration): Pedwarn
about stray semicolons after member declarations.
which was approved by Gaby here:
http://gcc.gnu.org/ml/gcc-patches/2007-03/msg01456.html
and made it into the trunk here:
http://gcc.gnu.org/ml/gcc-cvs/2007-03/msg00841.html
It makes
struct A
{
void foo() {};
}
a hard error with -pedantic.
The 1998 version of the standard (sorry, I don't have the 2003 version
available) contains in [class.mem]:
member-declaration:
...
function-definition ;opt
...
Therefore, IMHO the patch is wrong and should be reverted.
Or am I missing something?
Regards,
Volker