aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/pt.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2007-03-11 03:07:59 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2007-03-11 03:07:59 +0000
commitf9aa54d3c5c8b4993678c52b2c4d2ee2f7bdabaf (patch)
treedb5f9072513ff237834cbce6b263a110d6ef3658 /gcc/cp/pt.c
parenteae920410eba880ef056809d8dea2393233b4d58 (diff)
downloadgcc-f9aa54d3c5c8b4993678c52b2c4d2ee2f7bdabaf.zip
gcc-f9aa54d3c5c8b4993678c52b2c4d2ee2f7bdabaf.tar.gz
gcc-f9aa54d3c5c8b4993678c52b2c4d2ee2f7bdabaf.tar.bz2
re PR c++/30274 (bool bit-field: wrong increment and decremenet)
PR c++/30274 * cp-tree.h (unlowered_expr_type): New function. * typeck.c (is_bitfield_expr_with_lowered_type): Handle COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR. (unlowered_expr_type): New function. (build_unary_op): Disallow predecrements of bool bitfields. * call.c (build_conditional_expr): Use unlowered_expr_type. * pt.c (type_unification_real): Likewise. PR c++/30274 * g++.dg/expr/bitfield3.C: New test. * g++.dg/expr/bitfield4.C: Likewise. * g++.dg/expr/bitfield5.C: Likewise. * g++.dg/expr/bitfield6.C: Likewise. From-SVN: r122813
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r--gcc/cp/pt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index bf82f8c..f947da2 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -11260,7 +11260,7 @@ type_unification_real (tree tparms,
return 1;
continue;
}
- arg = TREE_TYPE (arg);
+ arg = unlowered_expr_type (arg);
if (arg == error_mark_node)
return 1;
}