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: [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
--


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