This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: ABI bug: PR middle-end/22275
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Michael Matz <matz at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 13 Feb 2006 14:58:08 -0800
- Subject: Re: ABI bug: PR middle-end/22275
- References: <Pine.LNX.4.58.0601311706380.627@wotan.suse.de>
Michael Matz wrote:
(Would you please use "diff -p" in future to generate your patches?)
Thank you very much for persevering with this issue!
I have stared at this patch for a while, trying to find bugs. I can't
find any, and you've done a lot of testing, so this patch is OK for
mainline and for 4.1.
I think you could make the layout_decl changes a bit tidier (and perhaps
any future changes less error-prone) by having a "packed_p" variable,
which woul be true if DECL_PACKED && !zero_bitfield. Something like:
bool packed_p = DECL_PACKED (decl);
...
if (...) {
zero_bitfield = true;
packed_p = false;
}
Then, all uses of DECL_PACKED would instead check packed_p, which would
eliminate the need to remember the zero_bitfield case. Would you please
make that cleanup for the mainline? (There's no need to apply it to
4.1, and I don't think we want any additional risk there.) That change
is pre-approved.
Would you please also update the extend.texi documentation on both
mainline and the 4.1 branch? Both the attribute and #pragma
documentation should be updated. In the section on "Structure-Packing
Pragmas", I would suggest adding "(other than zero-width bitfields)"
after "alignment of members". Similarly, add "(other than zero-width
bitfields)" after "each member" in the "packed" type attribute
definition. Those documentation changes are also pre-approved.
Thanks again,
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713