[cfe-commits] r64408 - in /cfe/trunk: lib/Headers/limits.h test/Preprocessor/clang_headers.c

Eli Friedman eli.friedman at gmail.com
Thu Feb 12 16:32:09 PST 2009


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.

-Eli



More information about the cfe-commits mailing list