[cfe-commits] patch: predefines available with -undef

Nick Lewycky nlewycky at google.com
Fri Jun 10 14:02:38 PDT 2011


On 10 June 2011 13:53, Jay Foad <jay.foad at gmail.com> wrote:

> Hi Nick,
>
> > $ gcc -undef -dM -E -
> > #define __STDC_HOSTED__ 1
> > #define __STDC__ 1
> > $ gcc -undef -dM -E -x assembler-with-cpp -
> > #define __ASSEMBLER__ 1
> > #define __STDC_HOSTED__ 1
> > #define __STDC__ 1
> > $ gcc-4.6 -undef -dM -E -x assembler-with-cpp - -ffreestanding
> > #define __ASSEMBLER__ 1
> > #define __STDC_HOSTED__ 0
> > #define __STDC__ 1
>
> Also:
>
> $ gcc -undef -dM -E -x objective-c /dev/null
> #define __OBJC__ 1
> #define _FORTIFY_SOURCE 2
> #define __STDC_HOSTED__ 1
> #define __STDC__ 1
>
> (Dunno why I have _FORTIFY_SOURCE here; the point is that __OBJC__
> counts as a standard macro.) This is in line with GCC's documentation:
>
>
> http://gcc.gnu.org/onlinedocs/cpp/Standard-Predefined-Macros.html#Standard-Predefined-Macros


Committed in r132855. Thanks!

Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110610/89d071b0/attachment.html>


More information about the cfe-commits mailing list