[Bug c++/62182] New warning wished: operator== and "equality comparison result unused [-Wunused-comparison]"/-Wunsed-value

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Apr 16 06:05:00 GMT 2015


--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
(In reply to Arnaud Bienner from comment #3)
> One thing that doesn't work is turning on this warning using
> -Wunused-comparison parameter. But surprisingly, turning it off with
> -Wno-unused-comparison (when -Wunused or -Wall is used) works. Not sure what
> I'm missing here.

Because the emit_side_effect_warnings calls are guarded by warn_unused_value.

More information about the Gcc-bugs mailing list