AnsweredAssumed Answered

Use of stdbool.h in Code Warrior for DSC

Question asked by Colin Cameron on Nov 9, 2015
Latest reply on Dec 21, 2015 by Fiona Kuang

I want to use the _Bool type and `true`/`false` by including stdbool.h, here's my test code:

 

#pragma c99 on

#include <stdbool.h>

 

void main(void)

{

     _Bool b = true;

    b = false;

}

 

But I get the following error:  #warning "MSL support for C99 is not enabled"

 

And neither `true` or `false` is defined. `_Bool` is defined and works correctly so I'm confused as to what's happening. How do I enable C99 mode, get the correct defines and get rid of the warning?

 

I know that, since _Bool works correctly, I can just define `true` and `false` myself but I want to understand what the warning means and what other problems it may cause.

 

I'm using CodeWarrior 10.6 build 140329

Outcomes