[Bug c/44949] extend Wparentheses from & to &=

marc.glisse at normalesup dot org gcc-bugzilla@gcc.gnu.org
Sat Aug 6 20:50:00 GMT 2011


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



More information about the Gcc-bugs mailing list