This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C ABI: struct/union inconsistency
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: "tim at hollebeek dot com" <tim at hollebeek dot com>, "David S. Miller" <davem at redhat dot com>, "gdr at integrable-solutions dot net" <gdr at integrable-solutions dot net>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Sat, 28 Sep 2002 13:04:30 -0700
- Subject: Re: C ABI: struct/union inconsistency
struct foo {
#ifdef SMP
long long count;
long lock;
#endif
};
Here, attribute((nopadding)) would leave foo with size 12,
instead of the required size 16 when SMP is defined.
Ah, good point.
I hate it when I think I'm clever and then turn out not to be.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com