stdbool.h
contains this code:
#if __cplusplus < 201103L
/* Defining these macros in C++98 is a GCC extension. */
#define bool bool
#define false false
#define true true
#endif
Why does gcc need to redefine standard C++ types?
stdbool.h
contains this code:
#if __cplusplus < 201103L
/* Defining these macros in C++98 is a GCC extension. */
#define bool bool
#define false false
#define true true
#endif
Why does gcc need to redefine standard C++ types?
Although #define fnord fnord
won't generally change the way the identifier fnord
is processed, it will cause #ifdef fnord
to report the macro as defined. If other code might do something like
#ifndef true
#define true 1
#endif
Having a #define true true
would cause such conditional definition to be skipped.