is f().c legal? How about (&(f()))->c ?

Walter Murray walter at hpclwjm.HP.COM
Tue Jan 31 10:57:57 AEST 1989


>    I got that info from Harbinson and Steele.  I have the May Draft of ANSI,
>    but cant find the page where it mentions that.  Can anyone point me to
>    the appropriate ANSI section number?

> David Lai 

Section 3.3.3.2.  Unary & requires an lvalue.
Section 3.3.2.3.  The . operator does not require an lvalue.  If the
		  left operand is an lvalue, the result is an lvalue.
Especially, see section 3.3.2.3 of the Rationale.

By the way, the HP-UX compiler for the Series 800, which is not derived
from PCC, gets this right.

Walter Murray
HP, California Language Lab
----------



More information about the Comp.std.c mailing list