This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/81402] unhelpful -Wparentheses suggestion for assignment from non-zero constant
- From: "msebor at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 12 Jul 2017 02:39:57 +0000
- Subject: [Bug c/81402] unhelpful -Wparentheses suggestion for assignment from non-zero constant
- Auto-submitted: auto-generated
- References: <bug-81402-4@http.gcc.gnu.org/bugzilla/>
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.