------- Comment #5 from mmitchel at gcc dot gnu dot org 2006-05-19 03:01 ------- Subject: Bug 27506
Author: mmitchel Date: Fri May 19 03:01:14 2006 New Revision: 113902 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113902 Log: 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. Added: trunk/gcc/testsuite/g++.dg/conversion/bitfield5.C trunk/gcc/testsuite/g++.dg/conversion/bitfield6.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/call.c trunk/gcc/cp/cp-tree.h trunk/gcc/cp/except.c trunk/gcc/cp/init.c trunk/gcc/cp/tree.c trunk/gcc/cp/typeck.c trunk/gcc/cp/typeck2.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27506