On Tue, 01 Jun 2010 21:24:24 +0200, Dimitry Andric wrote:
> On 2010-06-01 21:14, Tim van der Molen wrote:
> > It seems gcc parses the += statement wrongly: "a += b == c" should be
> > interpreted as something like "(a = a + b) == c", but instead gcc seems
> > to interpret it as "a = (a + b == c)".
> 
> Yes, those are the C precedence rules.  "==" goes before any assignment
> operator, such as "=" or "+=".
> 
> In case of doubt, use parentheses.

Ah, yes, of course... Apologies for bothering the list with this public
display of stupidity.

Reply via email to