Committed: fix regression and FAILs with "[PATCH] Don't ignore packed on char bitfields (4.0 regression)"
Adam Nemet
anemet@caviumnetworks.com
Sun Jan 25 19:37:00 GMT 2009
Hans-Peter Nilsson writes:
> You should have made sure to test on a target which has packed
> layout by default, as well as a target with #undef PCC_BITFIELD_TYPE_MATTERS.
You're right. I am very sorry.
> This patch caused pr17112-1.c to regress for cris-elf, and many
> of the new tests FAIL, i.e.:
>
> Running /tmp/hpautotest-gcc1/gcc/gcc/testsuite/gcc.dg/dg.exp ...
> FAIL: gcc.dg/bitfld-15.c (test for warnings, line 10)
> FAIL: gcc.dg/bitfld-17.c (test for warnings, line 9)
> ...
> FAIL: gcc.dg/pr17112-1.c (test for warnings, line 9)
>
> and
>
> Running /tmp/hpautotest-gcc1/gcc/gcc/testsuite/g++.dg/dg.exp ...
> ...
> FAIL: g++.dg/ext/bitfield2.C (test for warnings, line 6)
> FAIL: g++.dg/ext/bitfield4.C (test for warnings, line 5)
>
> 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.
Thanks very much for fixing this and I am glad beside the breakage my patch
did at least something good for CRIS.
Let me know if you need help with what H.J. has just reported.
Adam
More information about the Gcc-patches
mailing list