Xref: utzoo comp.lang.c:13616 comp.std.c:456 Path: utzoo!yunexus!geac!syntron!jtsv16!uunet!seismo!sundc!pitstop!sun!oliveb!felix!arcturus!evil From: evil@arcturus.UUCP (Wade Guthrie) Newsgroups: comp.lang.c,comp.std.c Subject: union *func() Keywords: union, pointers, functions Message-ID: <2205@arcturus> Date: 25 Oct 88 17:58:58 GMT Article-I.D.: arcturus.2205 Organization: Rockwell International, Anaheim, CA Lines: 34 Is the following code portable, strictly conforming, etc. a = function()->member; as in something like the following (really simplified) code: union yowza { int i; float f; char *c; }; union yowza *yikes() /* actually, I pass the type here */ { static union yowza fubar; fubar.i = 6; /* and I make the assignment based on the type */ return (&fubar); } main() { union yowza *yikes(); int j; . . . j = yikes()->i; } It works on (shudder) a VAX running VMS, and for this reason, I suspect it is not portable -- can anyone help? Wade Guthrie Rockwell International Anaheim, CA (Rockwell doesn't necessarily believe / stand by what I'm saying; how could they when *I* don't even know what I'm talking about???)