Xref: utzoo comp.lang.c:13573 comp.std.c:445 Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!mailrus!ames!nrl-cmf!cmcl2!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn ) Newsgroups: comp.lang.c,comp.std.c Subject: Re: union *func() Keywords: union, pointers, functions Message-ID: <8765@smoke.BRL.MIL> Date: 26 Oct 88 22:15:40 GMT References: <2205@arcturus> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 11 In article <2205@arcturus> evil@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 ->.)