[LLVMdev] updated code size comparison

John Regehr regehr at cs.utah.edu
Wed Jan 20 19:17:14 PST 2010

> clang warns and doesn't treat the usual declaration of memset as the C
> library memset if size_t is wrong; gcc apparently doesn't care.

Eli-- I looked at this code a bit more closely and it seems to me that (in 
this particular case, by luck) the gcc strategy of ignoring the problem is 
OK.  Clang wants size_t to be an unsigned int, whereas in these files, 
size_t is an unsigned long.  I can't think of any observable difference 
between these two types on x86-clang.

Anyway this doesn't form an argument that clang should relax its rules, 
but it does indicate that gcc is probably not doing anything too silly.


More information about the llvm-dev mailing list