bool versus _Bool

Post a reply

This question is a means of preventing automated form submissions by spambots.

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is OFF
Smilies are OFF

Topic review

Expand view Topic review: bool versus _Bool

Re: bool versus _Bool

by AlainI » Thu Oct 18, 2018 12:42 pm

Using the following flag seems to solve the issue:

Code: Select all

-strong(B, bool)
Is this the right way to do it ?

bool versus _Bool

by AlainI » Thu Oct 18, 2018 8:05 am

C99 added a builtin _Bool data type and if you #include <stdbool.h>, it provides "bool" as a macro to _Bool.
But if you sue "bool" in you code, PC-Lint 1.2 will complain that you use _Bool out of typedef, which is true since this is a macro.
I am a bit puzzled, should I avoid using "bool" and use "_Bool" instead ?