]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR c++/30274 (bool bit-field: wrong increment and decremenet)
authorMark Mitchell <mark@codesourcery.com>
Sun, 11 Mar 2007 03:07:59 +0000 (03:07 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Sun, 11 Mar 2007 03:07:59 +0000 (03:07 +0000)
commitf9aa54d3c5c8b4993678c52b2c4d2ee2f7bdabaf
treedb5f9072513ff237834cbce6b263a110d6ef3658
parenteae920410eba880ef056809d8dea2393233b4d58
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
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/cp-tree.h
gcc/cp/pt.c
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/expr/bitfield3.C [new file with mode: 0644]
gcc/testsuite/g++.dg/expr/bitfield4.C [new file with mode: 0644]
gcc/testsuite/g++.dg/expr/bitfield5.C [new file with mode: 0644]
gcc/testsuite/g++.dg/expr/bitfield6.C [new file with mode: 0644]