From 80eb9ddd1c93949c2c97ee334534d80f844f5477 Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Fri, 16 Jun 2006 23:12:08 +0000 Subject: 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 --- gcc/cp/ChangeLog | 4 ++++ gcc/cp/call.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'gcc/cp') 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 + 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); } -- cgit v1.1