[net.unix-wizards] Excuse me, but...

chris.umcp-cs@UDel-Relay (03/05/83)

From:  Chris Torek <chris.umcp-cs@UDel-Relay>

Just what is it that the C compiler is or isn't doing that it
should or shouldn't do?  I gather it has something to do with
floating point and optimization.  Well, I won't say what the
compiler SHOULD do, but since the C book says that evaluation
order is not defined, I WILL say that the programmer should NOT
assume that the compiler WON'T fold constants and/or rearrange
expressions.

If you want constants combined, use ``bc''.  If you don't, use
temporary variables.  But don't blame the compiler for doing (or
not doing) something that the C book says it might do.