From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: <19f6168fb6b109424ddbb1d276d62e6b@brasstown.quanstro.net> Date: Sun, 1 Jul 2012 23:32:12 +0100 Message-ID: From: Charles Forsyth To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=14dae947310baf6da004c3cc4046 Subject: Re: [9fans] cc nit? Topicbox-Message-UUID: a0b2c11a-ead7-11e9-9d60-3106f5b1d025 --14dae947310baf6da004c3cc4046 Content-Type: text/plain; charset=UTF-8 Yes, I was assuming the same approach as for the existing void data declaration, that the structure is given a nominal size, for just the reasons you give. (That's what gcc seems to do.) On 1 July 2012 23:22, Comeau At9Fans wrote: > Many compilers do just that, however, that said, unless the compiler is > prepared for it, since it effectively yields a struct of zero size which > normally is a no-go, it could produce bugs involving sizeof, initializers, > pointer addition et al, even some divisions by zero if the compiler is > making certain assumptions already, unless it already can have zero length > objects of this nature for some other reasons. --14dae947310baf6da004c3cc4046 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Yes, I was assuming the same approach as for the existing void data declara= tion, that the structure is given a nominal size,
for just the reasons = you give. =C2=A0(That's what gcc seems to do.)

On 1 July 2012 23:22, Comeau At9Fans <comeauat9fans@gmail.com>= ; wrote:
Many compilers do just that, however, that said, unless the compiler is pre= pared for it, since it effectively yields a struct of zero size which norma= lly is a no-go, it could produce bugs involving sizeof, initializers, point= er addition et al, even some divisions by zero if the compiler is making ce= rtain assumptions already, unless it already can have zero length objects o= f this nature for some other reasons.

--14dae947310baf6da004c3cc4046--