This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Too many warnings.
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.