[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 22:01:23 PDT 2009


On Oct 22, 2009, at 9:49 PM, 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.
>
> 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)?

Until someone actually adds the warning, I like my fix better.  A PR  
is less useful than something that works today :)

-Chris



More information about the llvm-commits mailing list