This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Committed: fix regression and FAILs with "[PATCH] Don't ignore packed on char bitfields (4.0 regression)"
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- Cc: anemet at caviumnetworks dot com, iant at google dot com, gcc-patches at gcc dot gnu dot org, nathan at codesourcery dot com
- Date: Sun, 25 Jan 2009 10:38:14 -0800
- Subject: Re: Committed: fix regression and FAILs with "[PATCH] Don't ignore packed on char bitfields (4.0 regression)"
- References: <18808.8028.906784.542142@ropi.home> <200901251212.n0PCCCXb015908@ignucius.se.axis.com>
On Sun, Jan 25, 2009 at 4:12 AM, Hans-Peter Nilsson
<hans-peter.nilsson@axis.com> wrote:
>
> The fix is trivial, as in the patch below. It's also obvious
> for the new FAILs, but perhaps the regression,
> gcc.dg/pr17112-1.c is a surprise. Since I think that warning is
> bogus for a default-packed target(*), I'm happy with this
> change, and since at least one maintainer seems to agree, I'm
> all too eager to consider it obvious as well. Though CC:ing
> Nathan, as he introduced the warning.
>
> *) See PR38457, which I think your patch solves for the
> bit-field case. (The attribute isn't ignored, it just doesn't
> affect the layout.) As a bonus, got rid of all the bogus fp-bit
> warnings! Still have warnings for non-bitfields, though.
>
> Committed.
>
> testsuite:
> * gcc.dg/bitfld-15.c: Gate warning on target
> pcc_bitfield_type_matters.
> * gcc.dg/bitfld-17.c, g++.dg/ext/bitfield2.C,
> g++.dg/ext/bitfield4.C: Likewise.
> * gcc.dg/pr17112-1.c: Don't expect a warning for the packed
> bitfield for any target.
This patch caused:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38970
--
H.J.