Subject: Re: Question regarding the array of size 0.
To: Peter Seebach <seebs@plethora.net>
From: Alfred Perlstein <bright@wintelcom.net>
List: tech-kern
Date: 03/29/2001 23:50:25
* Peter Seebach <seebs@plethora.net> [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/