[cfe-commits] r64408 - in /cfe/trunk: lib/Headers/limits.h test/Preprocessor/clang_headers.c
Chris Lattner
clattner at apple.com
Thu Feb 12 20:00:37 PST 2009
On Feb 12, 2009, at 4:32 PM, Eli Friedman wrote:
> On Thu, Feb 12, 2009 at 3:06 PM, Mike Stump <mrs at apple.com> wrote:
>> +/* The system's limits.h may, in turn, try to #include_next GCC's
>> limits.h.
>> + Avert this #include_next madness. */
>> +#if defined __GNUC__ && !defined _GCC_LIMITS_H_
>> +#define _GCC_LIMITS_H_
>> +#endif
>
> Are there any cases where clang doesn't define __GNUC__? Also, if
> we've gotten here, isn't it guaranteed that _GCC_LIMITS_H isn't
> defined? Therefore, do we need the #if at all?
>
> Also, probably worth noting an alternative solution I got on IRC: add
> gcc's fixincludes path (something like
> /usr/lib/gcc/i486-linux-gnu/4.3/include-fixed) to
> InitHeaderSearch::AddDefaultSystemIncludePaths. It looks like gcc's
> solution is more complicated than necessary, though.
Using GCC header files is dangerous. I don't think it is a problem
for fix-included header files, but using normal GCC headers implicitly
makes the produced binary GPL.
-Chris
More information about the cfe-commits
mailing list