This is the mail archive of the gcc-patches@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: [patch] Fix PR c++/29024


Lee Millward wrote:

2006-09-24 Lee Millward <lee.millward@codesourcery.com>

       PR c++/29024
       * parser.c (cp_parser_set_storage_class): Set
       multiple_storage_classes_p for the input decl specifier
       if a typedef specifier is present.
       (cp_parser_decl_specifier_seq) <RID_TYPEDEF>: If a storage
       class specifier has already been set for this declaration,
       set multiple_storage_classes_p to true on the decl_specs.

2006-09-24 Lee Millward <lee.millward@codesourcery.com>

       PR c++/29024
       * g++.dg/parse/typedef8.C: New te

I like the idea of this patch. It's slightly inaccurate, in that we'll now get the error:


multiple storage classes in declaration of ...

when using "typedef" together with "static". The reason this is inaccurate is that "typedef" isn't a storage-class specifier; it's just a specifier.

So, I think the field "multiple_storage_classes_p" should be renamed "conflicting_specifiers_p", and the error message should be:

conflicting specifiers in declaration of ...

+ /* A store class specifier cannot be applied along side a typedef

s|store class|storage class


s|along side|together with (or alongside)

OK with the renaming and the error message tweak.

Thanks!

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


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