This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libgcc_s, Linux, and PT_GNU_EH_FRAME, and binutils

--On Tuesday, August 06, 2002 01:17:04 PM -0700 Richard Henderson <> wrote:

On Tue, Aug 06, 2002 at 11:18:49AM -0700, Mark Mitchell wrote:
The real oddity here is that "long long : 64" is aligned more strictly
than "long long" by the C compiler.
By *which* C compiler?  Yes, gcc 3.2 aligns a long long bitfield
to 64-bit, but egcs 2.91 certainly does not.
Ah.  I didn't realize that this was actually relative recent C ABI

I was using this GCC:

 gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98)

as the C compiler.

So what do we do?  Personally I'm for fixing the bug.
Blech.  I don't like that we broke the C ABI, but I'm not sure I like
breaking it again in the name of fixing it, some two years later.

I guess the fact that nobody noticed until now suggests that maybe
the problem isn't very common, which makes either decision less

If we *do* want to fix it, we need to look everywhere.  For example,
place_union_field gives the union the alignment of the type of the bit
field in the PCC_BITFIELD_TYPE_MATTERS case.  So, I think a union with
a long long bit field will get 8-byte aligned, which is weird.

And place_field gates the alignment by maximum_field_alignment -- but
not by desired_field_alignment.  Again, in the PCC_BITFIELD_TYPE_MATTERS
case, which is the usual case on x86.

Mark Mitchell      
CodeSourcery, LLC  

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]