Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

functions returning structures and addressability

1 view
Skip to first unread message

Mike Caplinger

unread,
Jul 1, 1986, 10:59:54 AM7/1/86
to
Probably an old question, but is the code

struct foo {
int x, y;
};

struct foo f();

{
...
... = f().x;
}

legal C or not? The Apollo C compiler accepts it, the Sun PCC rejects
it with a "must be addressable" message. Does ANSI C say anything about
this?

Please respond to me, I don't read this group.

Mike Caplinger
mi...@bellcore.arpa
ihnp4!bambi!mike

0 new messages