[Bug ipa/84628] attribute(warning/error) functions should not be merged together
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Mar 1 07:10:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84628
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Jay from comment #3)
> The original case said something about "localalias" in the error, so aliases
> don't seem to address it. I can dig that up probably.
>
> Shouldn't it warn for:
> if (0)
> banned_function()
> ?
>
> I believe we want it to.
> You know, strive for equal warnings/errors w/ or w/o optimization, but I
> know that is impossible in general, because optimization==analysis.
The documentation is explicit here though:
" call to such a function is not eliminated through dead code elimination or
other optimizations"
More information about the Gcc-bugs
mailing list