There is a previous post titled: "Use of stdbool.h in Code Warrior for DSC" at this link:
It ended by recommending that the user add the flag "-flag slld".
I am having the same problem with bool undefined. Adding "-flag slld" does fix the problem. BUT, it also implements support for 64-bit data type (long long) which I do not need. Unless this is by-product of C99. Because, the bool data type is part of the C99 specification.
The issue is that stdbool.h includes "#include <ansi_parms.h>". ansi_parms.h has the following #defines:
#ifndef _MSL_HIWARE_COMP /* LINE 107 */
#define _MSL_HIWARE_COMP 0
#ifndef _MSL_C99 /* LINE 151 */
#define _MSL_C99 1
Then when stdbool.h gets to line 17, it has the conditional:
#if (!_MSL_C99 && !_MSL_HIWARE_COMP) /*- mm 030304 -*/
#warning "MSL support for C99 is not enabled"
So, _MSL_C99 is true but _MSL_HIWARE_COMP is false. This seems to cause C99 support to be disabled. So, why do I need to enable slld, long long support to fix this. Is that because long long support is intrinsically part of the C99 specification? I am working with limited flash and do not need long long support or any additional flash space that this might use. Also, where does adding -flag slld set the _MSL_HIWARE_COMP defintion to 1? Grepping the whole directory of
"C:\Freescale\CW MCU v10.7\MCU\M56800E Support\" the only definition for _MSL_HIWARE_COMP is line 107 in ansi_parms.h. So, how does -flag slld accomplish this? And, how can I get C99 support WITHOUT "long long" support?