[Bug c/81402] unhelpful -Wparentheses suggestion for assignment from non-zero constant

msebor at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jul 12 02:40:00 GMT 2017


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

--- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> ---
In my opinion (at least in the constant case) the warning would be more
meaningful if it pointed out the likely mistake of using assignment as opposed
to equality instead of (only) recommending how to suppress it.

In general, I think the text of a warning should focus on making the problem
clear, and suggestions for fixes should be given in the form of fix-it hints.


More information about the Gcc-bugs mailing list