This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/64883] FAIL: 17_intro/headers/c++*/all_attributes.cc (test for excess errors) on x86_64-apple-darwin14
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 31 Jan 2015 21:07:01 +0000
- Subject: [Bug libstdc++/64883] FAIL: 17_intro/headers/c++*/all_attributes.cc (test for excess errors) on x86_64-apple-darwin14
- Auto-submitted: auto-generated
- References: <bug-64883-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64883
--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Iain Sandoe from comment #7)
> (a) given that the __attribute__((xyzzy)) etc. versions are in pretty wide
> use "in the wild".
>
> (b) Section 6.33 of the current GCC manual doesn't really mention the
> __xxxx__ versions and the examples throughout the section use undecorated
> versions (the only example with __xxxx__ seems to be __target__). This
> section specifically states the attributes may be identifiers or reserved
> words.
Right, I think it's only mentioned at
https://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html
> ... we might implement some compatibility warning (again in the future) - or
> perhaps at least add a note to the manual.
I'm not sure a waning is appropriate. Users are welcome to use the non-uglified
attributes, it's their responsibility to ensure their own attributes don't
clash with their own macros.
(In reply to howarth from comment #8)
> Certainly getting the current GCC manual in sync with this new restriction
> and emitting a clear warning in the gcc 5.0 release compiler would get the
> issue more traction with upstream developers.
There is no new restriction.
The failing test is only intended to check that libstdc++ is consistent about
using the uglified attributes. Anything outside libstdc++ can do whatever it
wants. IMHO the C standard library headers should use the reserved names, but
the GCC manual is not the right place to document how to implement the C
standard library.