[forwarded from http://bugs.debian.org/345587]

  Matthias

Rechecked with 4.1.2. Bug submitter writes:

As shown below, the __linux macro is no longer defined when using
the C99 mode on a PowerPC machine. An x86 machine does not have
this behavior. This is normal for the linux macro to be no longer
defined (as it is not reserved), but I do not see why it should
be the case for the __linux macro. So, IMHO, the PPC should do
the same as x86.

powerpc:
$ gcc -dM -E -xc /dev/null | grep linux
#define __linux 1
#define __linux__ 1
#define __gnu_linux__ 1
#define linux 1
$ gcc -std=c99 -dM -E -xc /dev/null | grep linux
#define __linux__ 1
#define __gnu_linux__ 1

x86:
$ gcc -dM -E -xc /dev/null | grep linux
#define __linux 1
#define __linux__ 1
#define __gnu_linux__ 1
#define linux 1
$ gcc -std=c99 -dM -E -xc /dev/null | grep linux
#define __linux 1
#define __linux__ 1
#define __gnu_linux__ 1


-- 
           Summary: cpp: x86/powerpc inconsistency for the __linux macro
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: preprocessor
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: debian-gcc at lists dot debian dot org


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

Reply via email to