From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Tue, 21 Dec 2004 01:33:24 +0000 Subject: Re: udev compile problem: udevd Message-Id: <1103592804.5435.78.camel@localhost.localdomain> List-Id: References: <41C70E8B.5030506@2wire.ch> In-Reply-To: <41C70E8B.5030506@2wire.ch> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Mon, 2004-12-20 at 18:29 -0500, Dave Dodge wrote: > On Mon, Dec 20, 2004 at 09:17:39PM +0100, Kay Sievers wrote: > > A variable sized array is not a pointer! You will get a different > > sizeof(), which may cause problems. > > Beware that gcc does not conform to C99 in regards to the size of a > structure containing a flexible array. For example: > > struct foo{ int i; char c; char arr[]; }; > > gcc-3.4.2/i386 reports sizeof(struct foo) as 8 and offsetof(struct foo,arr) > as 5; but C99 requires those values to be the same. More here: > > http://gcc.gnu.org/gcc-3.4/c99status.html > http://gcc.gnu.org/ml/gcc/2002-05/msg02844.html Interesting. Thanks for pointing this out. Kay ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel