[llvm-commits] [llvm] r58048 - in /llvm/trunk: include/llvm/Support/DataTypes.h.in win32/VMCore/VMCore.vcproj win32/clang.sln

Kenneth Boyd zaimoni at zaimoni.com
Fri Oct 24 18:13:36 PDT 2008


Ted Kremenek wrote:
> Thanks Kenneth.
>
> I noticed that "__STDC_CONSTANT_MACROS" is explicitly passed as a -D  
> option by make:
>
> Makefile.rules:CPP.BaseFlags += -D_GNU_SOURCE -D__STDC_LIMIT_MACROS - 
> D__STDC_CONSTANT_MACROS
>   
> Modifying the Xcode project to also add this option is trivial; I'm  
> not certain if your last comment implies that the compiler (gcc)  
> should be defining __STDC_CONSTANT_MACROS on its own.
>   
The wording of the C standards is paradoxical here.  My impression is 
that the C99 standard committee was thinking of __STDC_CONSTANT_MACROS 
acting on stdint.h (in C++) like the POSIX feature test macro 
_POSIX_C_SOURCE does on limits.h ; the compiler has no business defining 
_POSIX_C_SOURCE automatically.

I'm not comfortable with application source code defining any macros 
reserved to either the implementation, or the C/C++ standards.  Doing it 
at the command line feels like the most reasonable way to do it.

Kenneth





More information about the llvm-commits mailing list