Currently limits.h always includes the libc limits.h if it's available at build time. Should it be self-contained instead like stdint.h with -ffreestanding?
Can you clarify which file you mean? gcc/ginclude does not have a limits.h. I assume you are not talking about the fixinclude'd limits.h?
Sorry, even though GCC's limits.h is installed under include-fixed, it is generated separately, not by the generic fixincludes mechanism. I was confused.
(In reply to Alexander Monakov from comment #1) > Can you clarify which file you mean? gcc/ginclude does not have a limits.h. > > I assume you are not talking about the fixinclude'd limits.h? No, I mean the limits.h in $(dirname $(gcc -print-libgcc-file-name)). It currently contains these lines to include libc limits.h: #ifndef _LIBC_LIMITS_H_ /* Use "..." so that we find syslimits.h only in this same directory. */ #include "syslimits.h" #endif (if libc limits.h is fixinclude'd, it will be saved to syslimits.h; otherwise syslimits.h will just contain "#include_next <limits.h>".) And I'm asking if #ifndef _LIBC_LIMITS_H_ && !__STDC_HOSTED__ /* Use "..." so that we find syslimits.h only in this same directory. */ #include "syslimits.h" #endif would be better?