PC-lint Plus User Discussion
2 posts • Page 1 of 1
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?