diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-04-25 03:33:38 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-04-25 03:33:38 +0000 |
commit | 661c81f5a36317e31464612bb17af55448ceba09 (patch) | |
tree | 9cb7bd0eab657259542747a3841de9e35c66cd77 /gcc/cp/tree.c | |
parent | 1f0f6278ed53a28b8462fa80c8aa2c67596cd4af (diff) | |
download | gcc-661c81f5a36317e31464612bb17af55448ceba09.tar.gz |
PR c++/27292
* typeck.c (decay_conversion): Don't adjust bitfield types.
(perform_integral_promotions): Treat bitfield enums as enums, not
as short integer types.
* tree.c (rvalue): Convert bitfields to their correct types.
PR c++/27292
* g++.dg/conversion/bitfield1.C: New test.
* g++.dg/conversion/bitfield2.C: Likewise.
* g++.dg/conversion/bitfield3.C: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113240 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r-- | gcc/cp/tree.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index d58b5b350dd..a956205a136 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -371,7 +371,9 @@ rvalue (tree expr) tree type; if (real_lvalue_p (expr)) { - type = TREE_TYPE (expr); + type = is_bitfield_expr_with_lowered_type (expr); + if (!type) + type = TREE_TYPE (expr); /* [basic.lval] Non-class rvalues always have cv-unqualified types. */ |