This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] #pragma pack vs. STRUCTURE_SIZE_BOUNDARY
- From: Roger Sayle <roger at eyesopen dot com>
- To: Paul Brook <paul at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 22 Oct 2006 21:32:49 -0600 (MDT)
- Subject: Re: [patch] #pragma pack vs. STRUCTURE_SIZE_BOUNDARY
Hi Paul,
On Sun, 22 Oct 2006, Paul Brook wrote:
> Given the purpose of #pragma pack is for compatibility with Win32, I think
> #pragma pack(1) act the same as __attribute__((packed)).
You've not explicitly mentioned it, but presumably this change reflects
the behaviour of the Microsoft C/C++ compiler on your new pragma-pack-4.c
testcase? Forgive me if I'm a bit slow, and that's implicit.
> 2006-10-22 Paul Brook <paul@codesourcery.com>
>
> gcc/
> * stor-layout.c (start_record_layout): maximum_field_alignment
> overrides STRUCTURE_SIZE_BOUNDARY.
>
> gcc/testsuite/
> * gcc.dg/pragma-pack-4.c: New test.
If so, this patch is OK for mainline. Thanks.
Roger
--