Non-standard int types - how to define

PC-lint Plus User Discussion
Post Reply
JWalker

Non-standard int types - how to define

Post by JWalker »

Hello,

My compiler implements non-standard int types: __int24 and __uint24. These types represent 24-bit values. What is the way to define such types?

Ivan
jbezem

Re: Non-standard int types - how to define

Post by jbezem »

I think your best option is to make Lint believe it is 32 bits wide, by declaring
+d__int24="int32_t"
+d__uint24="uint32_t"
(Assuming you have those types, otherwise use the appropriate types on your machine.)

Also look at section 14.6 if the sizeof operator is used in preprocessor conditionals. You may want something like
-pp_sizeof(__int24, 3)

--Johan
Post Reply