[LLVMdev] LTO "bug" and Clang warnings

Krzysztof Parzyszek kparzysz at codeaurora.org
Tue Jan 8 08:29:22 PST 2013


On 1/8/2013 10:16 AM, Renato Golin wrote:
>
> The code is clearly wrong, but the compiler has no right to fix user's
> stupidity, even at that level.

It's not fixing user's stupidity.  If you don't follow language rules, 
this is what you can get.  A warning would definitely be very helpful, 
but suppressing optimizations due to this is not the right way to go.

For the cases when the user code cannot be fixed, maybe implementing an 
option like "-fpessimal-aliasing" would help (i.e. assuming that 
everything is aliased with everything).

-Krzysztof


-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, 
hosted by The Linux Foundation



More information about the llvm-dev mailing list