56F807, CW 8.3, stdbool.h, where is _Bool defined

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

56F807, CW 8.3, stdbool.h, where is _Bool defined

1,194 次查看
j___
Contributor IV

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?

0 项奖励
回复
1 回复

987 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

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:

pastedImage_3.png

pastedImage_5.png

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!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复