[cfe-dev] Issue #2 with clang-analyzer on RTEMS

Anton Korobeynikov anton at korobeynikov.info
Fri Sep 24 10:25:38 PDT 2010


>> How do you see this? E.g. how the compiler can learn about stuff like
>> sizeof(long) for your target?
>>
> Can't it use the .h files gcc already provided?
Stuff like builtin type sizes does not come from any headers. If you
do stuff like
void* p;
int a = (int)p

then, depending on size of int and void* on given platform, there
might be truncation or not.
Think about the sign of char, etc.

> We are one of the Coverity Scan program members and I don't have to teach it
> this type of information.  I point it at a compiler and it analyses
> the source.
I have no idea what Coverity is doing "inside" and how they deal with
all that stuff.

-- 
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University




More information about the cfe-dev mailing list