ABI bug: PR middle-end/22275
Mark Mitchell
mark@codesourcery.com
Mon Feb 13 22:58:00 GMT 2006
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
More information about the Gcc-patches
mailing list