This is the mail archive of the gcc-patches@gcc.gnu.org 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: Fix g++.dg/abi/empty6.C failure for BIGGEST_ALIGNMENT <= 32targets


On Tue, 2003-06-03 at 10:45, Joern Rennecke wrote:
> 
> -- 
> --------------------------
> SuperH (UK) Ltd.
> 2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX
> T:+44 1454 465658
> ----
> 

> SH1..SH4 has a BIGGEST_ALIGNEMNT of 32 bit, so if a class definition
> does not demand a larger alignment, an offset of 32 bit
> gets split into a DECL_FIELD_OFFSET of 4 bytes
> and a DECL_FIELD_BIT_OFFSET of 0 bits.
> Thus, DECL_FIELD_OFFSET and byte_position are the same for field a
> in struct B of g++.dg/abi/empty6.C , so no warning about ABI compliance
> is emitted.
> This can be simply rectified by aligning B to something larger than 32 bit.
> 
> 2003-06-03  J"orn Rennecke <joern.rennecke@superh.com>
> 
> 	* g++.dg/abi/empty6.C (B): Request alignment of 8 bytes.

OK -- but put this justification into a comment in the code.

Thanks!

-- Mark


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