From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4A5C8F93.6090603@tecmav.com> Date: Tue, 14 Jul 2009 16:00:51 +0200 From: Adriano Verardo User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.13) Gecko/20080213 MIME-Version: 1.0 To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [9fans] C compiler question Topicbox-Message-UUID: 1fbd0c7a-ead5-11e9-9d60-3106f5b1d025 erik quanstrom wrote: >>Yes, but in my example - sorry - "NeverDefined" doesn't mean "declared and >>defined elsewhere (or not)" but "not declared .and. not defined". >> >> > >true enough. the patch i sent still rejects your construct. >i'd still be interested to hear a perspective of someone with >more experience with the c compiler. > >- erik > > > > > The point is how to compute the offset(s) of the last field at compile / run time. 8c should reject not defined (named only) types, as *nix compilers do. I think that it could be possible to allow the expansion of structs by a final struct field but this, in my opinion, would imply portability problems and in general more error prone code. I prefer to have only the tricky but standard "char x[0]" tails. Your patch will be included in the next distribution CD ? adriano