https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67279

--- Comment #2 from Vittorio Zecca <zeccav at gmail dot com> ---
UB = undefined behaviour?
Why then it is only signaled if "static" attribute is requested?
This is accepted:"int dec_1 = 1 << 31;"
Isn't UB as well if it is not static?
I believe gcc should deliver a warning, and then a "runtime error"
message at runtime.
In other words codes that compile with gcc should still compile with
-fsanitize=undefined
This example comes from wine and it is annoying to recompile the codes
that exhibit
this error message.
Also, the message is misleading, it should say that the initializer is
undefined.

Reply via email to