Too many warnings.

Göran Uddeborg uddeborg@carmen.se
Wed Jul 7 09:30:00 GMT 1999


craig@jcb-sc.com wrote:
> The point is not that it is common, rather that the *purpose* of `=' is
> to perform a "side effect", i.e. of modifying one of its operands.
[snip]
> `&&' does not modify its operands, so, as the only zero-level operator in
> a statement, it is entirely appropriate that gcc warn about the statement
> having, at its zero level anyway, no effect.

Ok.

Alexandre Oliva <oliva@dcc.unicamp.br> pointed out

  i++ ? j=84 : 0

does not give a warning.  The same argument you use regarding `&&'
could be applied to `?:' here, couldn't it?  So it is still a bit
inconsistent, isn't it?

However, all this is not a big deal.


More information about the Gcc-bugs mailing list