union *func()
Doug Gwyn
gwyn at smoke.BRL.MIL
Thu Oct 27 08:15:40 AEST 1988
In article <2205 at arcturus> evil at arcturus.UUCP (Wade Guthrie) writes:
>Is the following code portable, strictly conforming, etc.
> a = function()->member;
There are probably implementations that don't support this.
However, in ANSI C functions can return (rvalue) structures.
Since the function value is not an lvalue, neither will the
result of the member-of operator be an lvalue. Thus,
sfunc().member = a;
is invalid. (There should be no such problem with structure
pointers and ->.)
More information about the Comp.lang.c
mailing list