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

Duncan Sands baldrick at free.fr
Thu Oct 22 21:49:29 PDT 2009


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.

so would you be happy with Rafael's fix (assuming it works correctly)
plus a new PR asking for llvm-gcc to emit a warning in the C case (to
be implemented in the C frontend)?

Ciao,

Duncan.



More information about the llvm-commits mailing list