[patch] PR c++/26151: duplicate 'duplicate' diagnostic

Mark Mitchell mark@codesourcery.com
Tue Feb 7 16:43:00 GMT 2006


Volker Reichelt wrote:

> 	  static const char *const decl_spec_names[] = {
> 	    "signed",
> 	    "unsigned",
> 	    "short",
> 	    "long",
> 	    "const",
> 	    "volatile",
> 	    "restrict",
> 	    "inline",
> 	    "virtual",
> 	    "explicit",
> 	    "friend",
> 	    "typedef",
> 	    "__complex",
> 	    "__thread"
> 
> Special-casing "friend" wouldn't make much sense IMHO.
> Should I try to move the whole loop into the parser?

Yes, I think so.  (Of course "long" is special, as shown in that code.)
 I think you might be right about moving the loop on branches, but let's
get the patch first, and then make a decision.  It's not critical to fix
this bug on any branch, since it's just a duplicate valid diagnostic.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713



More information about the Gcc-patches mailing list