Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!henry From: henry@utzoo.UUCP (Henry Spencer) Newsgroups: net.lang.c Subject: Re: Unions and structures Message-ID: <5103@utzoo.UUCP> Date: Mon, 25-Feb-85 13:00:40 EST Article-I.D.: utzoo.5103 Posted: Mon Feb 25 13:00:40 1985 Date-Received: Mon, 25-Feb-85 13:00:40 EST References: <8333@brl-tgr.ARPA> Organization: U of Toronto Zoology Lines: 21 > 1) "structure reference must be addressable" This one sounds like an out-and-out compiler bug, probably arising because struct-returning functions were a very late addition to C. > 2) "no automatic aggregate initialization" Automatic aggregate initialization is definitely in ANSI C. > ... I'm also a little hacked that the compiler blows off > register declarations for unions even when all members are the same > size and fit in a register... As you note later, this is a compiler problem. It's not a trivial thing to fix in some compilers, though, because there are deeply-ingrained assumptions that unions are memory objects. Yes, it would be nice, but the odds that a large percentage of implementors will make the effort are poor. Some will, but not enough that you could count on it. -- Henry Spencer @ U of Toronto Zoology {allegra,ihnp4,linus,decvax}!utzoo!henry