When I added stdbool.h to my project, I got the warning " #warning "MSL support for C99 is not enabled ".
I looked at stdbool.h in the folder:
C:\Program Files\Freescale\CodeWarrior for DSC56800E v8.3\M56800 Support\msl\MSL_C\MSL_Common\Include
On line 32 it has this define: " #define bool _Bool ".
Three questions:
--------------------------------------------------------------------------------------
1) Where is _Bool defined?
I grepped the whole directory tree starting at:
" C:\Program Files\Freescale\CodeWarrior for DSC56800E v8.3\ ".
I did not find the definition for _Bool in any file.
--------------------------------------------------------------------------------------
2) What is the proper way to enable C99 mode in the compiler?
--------------------------------------------------------------------------------------
3) Why is that not enabled by default?
Hi
_Bool is a CW built-in boolean type. it it redefined as bool in stdbool.h.
If you want to use bool, we need follow below steps:
For detail, see my attached video.
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------