This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Semicolons at the end of member function definitions


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]