From owner-freebsd-hackers Thu Mar 29 23:50:31 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 3ABA537B71F for ; Thu, 29 Mar 2001 23:50:28 -0800 (PST) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id f2U7oPJ13302; Thu, 29 Mar 2001 23:50:25 -0800 (PST) Date: Thu, 29 Mar 2001 23:50:25 -0800 From: Alfred Perlstein To: Peter Seebach Cc: Todd Whitesel , tech-kern@netbsd.org, freebsd-hackers@FreeBSD.ORG Subject: Re: Question regarding the array of size 0. Message-ID: <20010329235022.W9431@fw.wintelcom.net> References: <200103300647.WAA25263@shell17.ba.best.com> <200103300749.f2U7n8810171@guild.plethora.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200103300749.f2U7n8810171@guild.plethora.net>; from seebs@plethora.net on Fri, Mar 30, 2001 at 01:49:07AM -0600 X-all-your-base: are belong to us. Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Peter Seebach [010329 23:49] wrote: > In message <200103300647.WAA25263@shell17.ba.best.com>, Todd Whitesel writes: > >Just put a 1-element array at the end of your header struct, and account for > >it when you work out how much extra space to allocate. C memory layout rules > >guarantee that this usage will have the desired effect. > > Nope, not portable. The implementation is allowed to bust you for > overstepping the bounds of the array. :) > > The only portable solution is the new feature in C99. Which new feature? -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] Daemon News Magazine in your snail-mail! http://magazine.daemonnews.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message