This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Semicolons at the end of member function definitions
- From: Gabriel Dos Reis <gdr at cs dot tamu dot edu>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: Volker Reichelt <v dot reichelt at netcologne dot de>, Dirk Mueller <dmueller at suse dot de>, gcc at gcc dot gnu dot org
- Date: Fri, 3 Aug 2007 10:55:02 -0500 (CDT)
- Subject: Re: Semicolons at the end of member function definitions
- References: <tkrat.6fde7d1faf6cb977@netcologne.de> <46B1412F.2070402@codesourcery.com>
On Wed, 1 Aug 2007, Mark Mitchell wrote:
| Volker Reichelt wrote:
|
| > 2007-03-26 Dirk Mueller <dmueller@suse.de>
| >
| > * parser.c (cp_parser_member_declaration): Pedwarn
| > about stray semicolons after member declarations.
| >
|
| > It makes
| >
| > struct A
| > {
| > void foo() {};
| > }
|
| That is indeed still legal in the current working draft. (The reason
| that I copied the grammar productions above the parser functions was so
| that it would be easy to check things like this...)
|
| > Therefore, IMHO the patch is wrong and should be reverted.
|
| Yes, please go ahead and revert it. And, if you have time, please add a
| test-case specifically for this case. The previous patch removed
| semicolons from lots of valid code, but probably none of those test
| cases were specifically for this case.
I agree with Mark.
Sorry for the confusion.
-- Gaby