Expression sequencing query (better test)
C Compiler ProjectDebbie Coutant
c at hpdsd.UUCP
Tue Oct 21 10:05:20 AEST 1986
There is a new operator in the proposed ANSI C standard that forces
expression grouping, it is the unary plus operator. The unary plus is
only useful for expressions that involve >1 uses of the same operator,
for example: a+b+c
With the unary plus operator a+b+c can be forced to be evaluated as
(a+b)+c using the following: +(a+b) + c
By ANSI's definition this will force (a+b) to be evaluated first.
Looks like somebody thought of the order-of-evaluation problem and
attempted to 'fix' it in the ANSI proposal already.
More information about the Comp.lang.c
mailing list