How to enable bool type keyword in .c file

PC-lint Plus User Discussion
Post Reply
How to enable bool t

How to enable bool type keyword in .c file

Post by How to enable bool t » Thu Dec 05, 2019 8:02 pm

I would like to use the type "bool" in C, but it is not recognized because it does not exist in standard C and comes from C++. I cannot use the .cpp extension instead to get "bool" because C++ does not allow conversion of void pointer to other pointers like C and it gives errors. I tried putting "typedef signed short bool;" in a header file and using the -header option to include it in every module, but messages then say "type 'bool' (aka 'short')" instead of just "type 'bool'". Is there an alternative way to just enable the C++ bool keyword in C?

Tam

Re: How to enable bool type keyword in .c file

Post by Tam » Tue Dec 10, 2019 7:55 pm

Have you tried using:

Code: Select all

+rw(bool)

Post Reply