From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4A5BF452.1090502@tecmav.com> Date: Tue, 14 Jul 2009 04:58:26 +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: <37a4205e0ebcee3f0fd82131999a1e5d@quanstro.net> In-Reply-To: <37a4205e0ebcee3f0fd82131999a1e5d@quanstro.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [9fans] C compiler question Topicbox-Message-UUID: 1e98bf42-ead5-11e9-9d60-3106f5b1d025 erik quanstrom wrote: >>8c silently accept the above definition and sizeof(U) is 100. ??? >>The sources which include the definition of "NeverDefined" are >>regularly compiled too and sizeof(U) = 100 + sizeof(NeverDefined). >> >> >> > >i think the issue is that there isn't currently a distinction >between this > > typedef struct A A; > struct A { > int expand[0]; > }; > >which is perfectly legal and this > > typedef struct U U; > typedef struct A A; > struct A { > U; > }; > > Yes, but in my example - sorry - "NeverDefined" doesn't mean "declared and defined elsewhere (or not)" but "not declared .and. not defined". No doubt this should be a fatal error, but 8c accepts. What's my mistake ? adriano