]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/cp/tree.c
re PR c++/27471 (ICE within build_c_cast cp/typeck.c:5434)
authorMark Mitchell <mark@codesourcery.com>
Fri, 19 May 2006 03:01:14 +0000 (03:01 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Fri, 19 May 2006 03:01:14 +0000 (03:01 +0000)
commit41990f964687332cd2ea2ad59a02c18ed499db6c
treee4b7d562777fd7a64677150037b1ea3eaa0694ff
parent84e2e37098ecd0a1085501dade4348e33fe5a695
re PR c++/27471 (ICE within build_c_cast cp/typeck.c:5434)

PR c++/27471
PR c++/27506
* typeck.c (decay_conversion): Convert bitfields to their declared
types here.  Improve documentation.  Avoid use of cp_convert.
(default_conversion): Make it static.  Perform integral promotions
before lvalue-to-rvalue, function-to-pointer, and array-to-pointer
conversions.
* init.c (build_init): Remove.
(expand_default_init): Do not call rvalue.
* call.c (null_ptr_cst_p): Robustify.
(build_conditional_expr): Tidy.
* except.c (build_throw): Do not perform lvalue-to-rvalue
conversion on operand before initializing temporary.
* tree.c (convert.h): Include it.
(convert_bitfield_to_declared_type): Use convert_to_integer, not
cp_convert.
(rvalue): Don't convert bitfields to their declared type here.
* cp-tree.h (build_init): Remove.
(default_conversion): Likewise.
* typeck2.c (build_m_component_ref): Do not perform
lvalue-to-rvalue, function-to-pointer, or array-to-pointer
conversions here.  Correct error message.
PR c++/27471
PR c++/27506
* g++.dg/conversion/bitfield5.C: New test.
* g++.dg/conversion/bitfield6.C: New test.

From-SVN: r113902
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/cp-tree.h
gcc/cp/except.c
gcc/cp/init.c
gcc/cp/tree.c
gcc/cp/typeck.c
gcc/cp/typeck2.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/conversion/bitfield5.C [new file with mode: 0644]
gcc/testsuite/g++.dg/conversion/bitfield6.C [new file with mode: 0644]