This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/44949] extend Wparentheses from & to &=
- From: "marc.glisse at normalesup dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 6 Aug 2011 20:49:45 +0000
- Subject: [Bug c/44949] extend Wparentheses from & to &=
- Auto-submitted: auto-generated
- References: <bug-44949-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44949
--- Comment #1 from Marc Glisse <marc.glisse at normalesup dot org> 2011-08-06 20:49:40 UTC ---
Created attachment 24935
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24935
hack
It is an easy enough hack to call the Wparentheses code for &= and others (the
warning says "&" instead of "&=", it isn't a clean patch) so I can test on real
code. And it seems painful. It warns on code like: a |= b & c; where it is
quite clear we could never intend (a|=b)&c;. Restricting the warning to the
case where the result of the expression is used should improve things, except
that I don't know how to access that information...