On Jun 4, 2011, at 2:37 AM, Nick Lewycky wrote:
> This patch makes clang predefine some macros even when asked not to by the
> -undef flag. I found real-world code which passes -undef and then tests for
> these macros.
>
> $ 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
LGTM!
- Doug
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits