Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site bambi.UUCP Path: utzoo!watmath!clyde!burl!ulysses!gamma!epsilon!zeta!sabre!petrus!magic!science!bambi!mike From: mike@bambi.UUCP (Mike Caplinger) Newsgroups: net.lang.c Subject: functions returning structures and addressability Message-ID: <484@bambi.UUCP> Date: Tue, 1-Jul-86 10:59:54 EDT Article-I.D.: bambi.484 Posted: Tue Jul 1 10:59:54 1986 Date-Received: Thu, 3-Jul-86 00:18:58 EDT Distribution: net Organization: Bell Communications Research Inc., Morristown, NJ Lines: 22 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 mike@bellcore.arpa ihnp4!bambi!mike