--- Comment #4 from jakub at gcc dot gnu dot org 2010-08-20 16:02 ---
I think we certainly don't want to warn for = +, or =/**/+, so if anything,
there could be a warning for = token immediately followed by a token that makes
a valid = token (i.e. the same file, same line, column 1 above
--- Comment #3 from redi at gcc dot gnu dot org 2010-08-20 15:36 ---
Yes, "if (b = 2)" is valid and -Wparentheses warns about that.
(In reply to comment #0)
> It would be nice if future version could at least throw a warning.
Obviously it can't be anything *more* than a warning.
N.B.
--- Comment #2 from schwab at linux-m68k dot org 2010-08-20 15:35 ---
There is a lot of normal valid C we warn about...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45358
--- Comment #1 from jakub at gcc dot gnu dot org 2010-08-20 15:23 ---
=+ in x =+ y; isn't one token, but two, it is the same as if you write
x = + y ;
And, unary + is standard C unary operator:
The result of the unary + operator is the value of its (promoted) operand. The
integer promoti