I
Ian Collins
I guess the problem with this example is many compilers now haveKeith said:You added an extra "#include <stdbool.h>" outside the #if block. In
C99 mode, <stdbool.h> is included twice, which is harmless. In
non-C99 mode, it's included once, defining "false", "true", and "bool"
as macros, making the typedef illegal.
Remove the extra #include and it's fine.
stdbool.h, but not many claim to be C99, so __STDC_VERSION__ is less
than 199901L causing the compile error.
The extra include is a bit daft, it would makes the code fail to compile
if the implementation doesn't have stdbool.h.