Right, and this is what I got from our compiler people:
# But that's not parentheses for the expression, but belong
# to the if-statement. The background for the existence of
# the warning is to ensure that 'if (x = expr)' was not a
# mistyped 'if (x == expr)'. As with many warnings it's simply a
# style-preference, if you don't want it, don't enable it.
#
# (Or, if you do enable it to catch typos, then writing 'if ((x =
# expr))' is the way to silence it in a particular case, as would
# be the full form of what actually happen in the abstract machine:
# 'if ( (x = expr) != 0 )' )
So, that’s two people talking nonsense to me in five minutes to
me. Makes me cranky.
Best,
Matě
Yes, it is bogus, but the point of clearing compiler warnings is
not to fight with compiler about your opinions, but to clear them
so that some actual valid ones are not lost. I can give you there
some #pragma to switch off that warning, but it seems even more
silly to me.
Matěj