https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28314

--- Comment #5 from Martin Sebor <msebor at gcc dot gnu.org> ---
FWIW, while looking into this bug I couldn't find the topic discussed in the
LSB where I would expect this to be specified.  I did come across a couple of
sites on the web that gather this type of information.  The one below says that
__linux is obsolete, apparently because it doesn't conform to POSIX:

http://sourceforge.net/p/predef/wiki/OperatingSystems/

In XSH section 2.2.2 The Name Space, POSIX specifies that "all identifiers that
begin with an underscore and either an uppercase letter or another underscore
are always reserved for any use by the implementation."  So both __linux__ and
__linux should be fine.

That aside, since the macros are part of the GCC public interface (and they are
relied on by users) I would expect to see them documented in the GCC manual
(along with other OS identification macros such as _AIX).  Since, as Vincent
notes, they aren't, I think a new bug should be raised for that.

Reply via email to