[Bug preprocessor/65128] New: remove "linux" and "unix" from preprocessor macros from cpp-5

shawn at churchofgit dot com gcc-bugzilla@gcc.gnu.org
Fri Feb 20 01:15:00 GMT 2015


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

            Bug ID: 65128
           Summary: remove "linux" and "unix" from preprocessor macros
                    from cpp-5
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: preprocessor
          Assignee: unassigned at gcc dot gnu.org
          Reporter: shawn at churchofgit dot com

I just spent like a whole hour until I realized that cpp defines "linux" which
gives this confusing error:

src/systemctl/bootspec.h:40:15: error: expected identifier or ‘(’ before
numeric constant
         char *linux;
               ^
We should remove these defines from gcc 5, and force programs to check __unix__
and __linux__


More information about the Gcc-bugs mailing list