Order of Evaluation (plus ?'s)

Doug Gwyn gwyn at smoke.BRL.MIL
Sun Nov 19 19:57:12 AEST 1989


In article <13871 at orstcs.CS.ORST.EDU> bailey at jacobs.CS.ORST.EDU.UUCP (Kirk Bailey) writes:
-I'm curious about the fate of the changed floating point evaluation
-constraints which were a part of some of the intermediate dpANSI "C" documents;
-the idea being that the programmer could be assured of a fixed evaluation
-order without requiring the use of temps.  The current doc's I have seem to
-no longer mention this (or the synchronization aspect of unary '+')?

Unary + is no longer the way to do this.  Use parentheses instead.

-On an unrelated front:  Is it conforming practice to cast the value returned
-from a function call to void when the function returns a struct or union?
-Granted that a nice compiler will allow this, I can't find anything explicit
-about it in the std...

If it is allowed by the grammar and does not violate Constraints or
Semantics, then it is allowed in a strictly conforming program.



More information about the Comp.std.c mailing list