]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/cp/cvt.c
PR c++/11431
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 6 Jul 2003 03:30:57 +0000 (03:30 +0000)
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 6 Jul 2003 03:30:57 +0000 (03:30 +0000)
commita681799d04240265cb90d537361feb65ae52399c
tree056d5a4f42966fc1a6672ee25eb4c64a77754dbf
parent0b743223bf126365c5a6363950188ecc4c30980f
PR c++/11431
* typeck.c (build_static_cast): Check for reference conversions
earlier.

* cp-tree.h (perform_integral_promotions): Declare.
* call.c (build_addr_func): Use decay_conversion.
(convert_arg_to_ellipsis): Likewise.  Remove misleading comment.
(convert_for_arg_passing): Use perform_integral_promotions.
* cvt.c (build_expr_type_conversion): Use decay_conversion.
(type_promotes_to): Do not return a cv-qualified type.
* decl.c (grok_reference_init): Fix formatting.
(get_atexit_node): Use decay_conversion.
(build_enumerator): Use perform_integral_promotions.
* init.c (build_vec_init): Use decay_conversion.
* semantics.c (finish_expr_stmt): Likewise.
(finish_switch_cond): Use perform_integral_promotions.
* typeck.c (default_conversion): Likewise.
(perform_integral_promotions): New function.
(build_indirect_ref): Use decay_conversion.
(build_array_ref): Use perform_integral_promotions.
(convert_arguments): Use decay_conversion.
(build_unary_op): Use perform_integral_promotions.
(build_c_cast): Use decay_conversion.
(build_modify_expr): Likewise.
(convert_for_initialization): Likewise.
* typeck2.c (build_x_arrow): Likewise.

* g++.old-deja/g++.jason/typeid1.C: Make it a compile test, not a
run test.

PR c++/11431
* g++.dg/expr/static_cast3.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68989 138bc75d-0d04-0410-961f-82ee72b054a4
12 files changed:
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/cp-tree.h
gcc/cp/cvt.c
gcc/cp/decl.c
gcc/cp/init.c
gcc/cp/semantics.c
gcc/cp/typeck.c
gcc/cp/typeck2.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/expr/static_cast3.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.jason/typeid1.C