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] |
Sean Hunt<rideau3@gmail.com> writes:
void foo () __attribute__((noreturn)); // right per spec void foo __attribute__((noreturn)) (); // works __attribute__((noreturn)) void foo (); // works
It's obvious that the first example of each kind (noreturn appearing after the function declarator) must be accepted if it's a GCC attribute and not if it's a C++0x attributes. The later two (noreturn appearing before the declaration or after the identifier) must be accepted for C++0x attributes, but it's not clear if the GCC syntax being accepted is an accident or by design.
As far as I can see they are both documenated as working at http://gcc.gnu.org/onlinedocs/gcc-4.5.0/gcc/Attribute-Syntax.html , so I think it is by design.
Is anyone currently working on C++0x attributes in GCC and, if not, is there anyone who can help me through what we should and shouldn't accept in clang?
I don't know the answer to this. It's clear that C++0x attributes are not the same as GNU attributes.
Ian
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |