[PATCH] D29464: [MinGWToolChain] Don't use GCC headers on Win32

Yaron Keren via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 3 08:10:40 PST 2017


yaron.keren added a comment.

Hiding these two include dirs removes many headers. Most has clang equivalents but not all of them.
For example quadmath.h is only there, and without the include path programs using it will fail to compile.

The reason mingw limits.h isn't used in your example is that clang version of limits.h specifically disables it:

  /* 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

so the solution may be stop disablng it... say

  #if defined __GNUC__ && !defined _GCC_LIMITS_H_ && !defined __MINGW32__
  #define _GCC_LIMITS_H_
  #endif


https://reviews.llvm.org/D29464





More information about the cfe-commits mailing list