[llvm-commits] [llvm-gcc-4.2] r84829 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

Chris Lattner clattner at apple.com
Thu Oct 22 14:28:14 PDT 2009


On Oct 22, 2009, at 9:33 AM, Duncan Sands wrote:

> Hi Chris,
>
>> The two fixes take a different approach (as far as I understand  
>> it).  The major difference is that I want the warning from  
>> instcombine when you do this in C:
>> void foo() {.}
>> ... foo(4);  ...
>
> gcc doesn't warn about this, even gcc-4.4, so why should llvm-gcc?   
> And if you
> really want llvm-gcc to warn about it, why not add the logic for  
> that to the
> C frontend?

This warning is most useful at LTO time.  I agree that the front-end  
should also catch this in reasonable situations within a translation  
unit, even though GCC doesn't.

-Chris




More information about the llvm-commits mailing list