[Bug c/60018] Bogus conversion warning with optimization flag -O1

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Feb 3 16:48:00 GMT 2014


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60018

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
The issue is that at -O0 conversion_warning gets (fn3(), 0) || 0 and doesn't
call unsafe_conversion_p on it, while on -O fold_binary folds away the || 0
part and conversion_warning sees COMPOUND_EXPR, it then calls
unsafe_conversion_p on it.

I guess nothing for 4.9 now we're in stage4.



More information about the Gcc-bugs mailing list