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
解決済! 解決策の投稿を見る。
Hello Colin
Please add the compiler option –flag slld to remove this compiler warning.
To add the option, pleases select ‘Project’ menu ->Poperties > C/C++Build > Settings > DSC Compiler > ‘Language’ Panel >Other Flags
Best Regards
Fiona Kuang
Technical Information & Commercial Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello Colin
Please add the compiler option –flag slld to remove this compiler warning.
To add the option, pleases select ‘Project’ menu ->Poperties > C/C++Build > Settings > DSC Compiler > ‘Language’ Panel >Other Flags
Best Regards
Fiona Kuang
Technical Information & Commercial Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
If this issue is still slowing your progress, please add your sample project illustrating your issue by zipping up the entire project.
Or, if it is easier, please state the simple specification for a sample project that we can create now for the community to address this.