public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/53182] New: GNU C: attributes without underscores should be discouraged / no longer be documented e.g. as examples
@ 2012-05-02 1:40 vincent-gcc at vinc17 dot net
2012-05-02 11:54 ` [Bug c/53182] " rguenth at gcc dot gnu.org
2012-05-02 13:28 ` ericb at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: vincent-gcc at vinc17 dot net @ 2012-05-02 1:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53182
Bug #: 53182
Summary: GNU C: attributes without underscores should be
discouraged / no longer be documented e.g. as examples
Classification: Unclassified
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: vincent-gcc@vinc17.net
Attributes without underscores can conflict with the ISO C standard. For
instance, if the C11 <stdnoreturn.h> header is included, this breaks GCC's
__attribute__ ((noreturn))
(such problems may occur in particular if different libraries, with different
expectations, are used). To avoid such a clash, only the __noreturn__ version
should be used. Other attributes without __ may also lead to conflicts with a
future C standard. You can see
http://lists.gnu.org/archive/html/bug-gnulib/2012-05/msg00024.html
and the corresponding discussion, from which I've reported this bug.
I suggest the following changes:
* Fix the GCC manual: the versions without __ should be discouraged (explain
why) and the examples should always use the __ version, e.g. change
void fatal () __attribute__ ((noreturn));
to
void fatal () __attribute__ ((__noreturn__));
* Possibly issue a warning if an attribute without __ is used.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-05-02 13:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-02 1:40 [Bug c/53182] New: GNU C: attributes without underscores should be discouraged / no longer be documented e.g. as examples vincent-gcc at vinc17 dot net
2012-05-02 11:54 ` [Bug c/53182] " rguenth at gcc dot gnu.org
2012-05-02 13:28 ` ericb at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).