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

--- Comment #4 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Arnaud Bienner from comment #3)
> Created attachment 35324 [details]
> unused-comparison warning

You need testcases, and to run the testsuite. See point 4 at:
https://gcc.gnu.org/wiki/GettingStarted#Basics:_Contributing_to_GCC_in_10_easy_steps

> 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.

That is very weird. I don't see anything wrong in your patch about this.

Nonetheless, please add the warning to c-family/c.opt not to common.opt since
it is a C/C++ warning.

Also watch out for the formatting (too long lines, incorrect indentation, etc.)
See point 6 in the link above.

> The patch would just be a first step: the next step would be to also raise
> this warning in the case of a "==" operator overloading in C++ (which seems
> to be the case that doesn't raise a warning currently). Not sure yet how to
> do this.

It is more than ok to do one patch per step. Try to get the first patch right
and committed, then worry about the next.

Reply via email to