Order of Evaluation (plus ?'s)

Henry Spencer henry at utzoo.uucp
Sun Nov 19 10:27:16 AEST 1989


In article <13871 at orstcs.CS.ORST.EDU> bailey at jacobs.CS.ORST.EDU.UUCP (Kirk Bailey) writes:
>...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 '+')?

Look very carefully at the wording about parentheses.  Compilers are now
required to consider parentheses as mandating order of evaluation, not
just grouping.  (I personally liked unary plus better, but...)

>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?

The Constraints section of 3.3.4 contains an exception that makes it legal
to cast anything to void.
-- 
A bit of tolerance is worth a  |     Henry Spencer at U of Toronto Zoology
megabyte of flaming.           | uunet!attcan!utzoo!henry henry at zoo.toronto.edu



More information about the Comp.std.c mailing list