https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62182
--- 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.