https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100057
--- Comment #1 from cqwrteur <unlvsur at live dot com> --- The funny stuff is that __STDC_HOSTED__ should not be set as true. I guess GCC incorrectly mark __STDC_HOSTED__ as 1 for C++, even we live in freestanding environment. #ifndef _GCC_WRAP_STDINT_H #if __STDC_HOSTED__ # if defined __cplusplus && __cplusplus >= 201103L # undef __STDC_LIMIT_MACROS # define __STDC_LIMIT_MACROS # undef __STDC_CONSTANT_MACROS # define __STDC_CONSTANT_MACROS # endif # include_next <stdint.h> #else # include "stdint-gcc.h" #endif #define _GCC_WRAP_STDINT_H #endif