diff options
author | Mark Mitchell <mark@codesourcery.com> | 2006-06-16 23:12:08 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2006-06-16 23:12:08 +0000 |
commit | 80eb9ddd1c93949c2c97ee334534d80f844f5477 (patch) | |
tree | 0b14ef2cedb7b4e4c1452420175da078ed96bb77 /gcc/cp | |
parent | 43765c8a70c0e27f277b4f1fa1adde59ff9c0f7d (diff) | |
download | gcc-80eb9ddd1c93949c2c97ee334534d80f844f5477.zip gcc-80eb9ddd1c93949c2c97ee334534d80f844f5477.tar.gz gcc-80eb9ddd1c93949c2c97ee334534d80f844f5477.tar.bz2 |
re PR c++/27979 (conversion check confused by enum bitfields)
PR c++/27979
* call.c (standard_conversion): Strip cv-qualifiers from bitfield
types.
PR c++/27979
* g++.dg/expr/bitfield2.C: New test.
From-SVN: r114733
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/call.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 28e1709..35001a0 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,9 @@ 2006-06-16 Mark Mitchell <mark@codesourcery.com> + PR c++/27979 + * call.c (standard_conversion): Strip cv-qualifiers from bitfield + types. + PR c++/27884 * decl.c (have_extern_spec): Remove. (start_decl): Do not check have_extern_spec. diff --git a/gcc/cp/call.c b/gcc/cp/call.c index cd82732..970fce7 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -632,7 +632,7 @@ standard_conversion (tree to, tree from, tree expr, bool c_cast_p, tree bitfield_type; bitfield_type = is_bitfield_expr_with_lowered_type (expr); if (bitfield_type) - from = bitfield_type; + from = strip_top_quals (bitfield_type); } conv = build_conv (ck_rvalue, from, conv); } |