re PR c++/10931 (valid conversion static_cast<const unsigned int&>(lvalue-of-type...
authorMark Mitchell <mark@codesourcery.com>
Thu, 26 Jun 2003 00:07:09 +0000 (00:07 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Thu, 26 Jun 2003 00:07:09 +0000 (00:07 +0000)
commit3fe18f1d4722d2cc202978537ec28ba3668e5cc8
tree281a1acd47d7c8c8c2b28917010ced8fb26b4b98
parent22c7c85ebc1408ab528f400094e5dc513e51dcdc
re PR c++/10931 (valid conversion static_cast<const unsigned int&>(lvalue-of-type-int) is rejected)

PR c++/10931
* g++.dg/expr/static_cast1.C: New test.

PR c++/10931
* call.c (convert_like): Pass issue_conversion_warnings.
(convert_like_with_context): Likewise.
(convert_like_real): Add issue_conversion_warnings parameter.
(perform_direct_initialization_if_possible): New function.
* cp-tree.h (perform_direct_initialization_if_possible): Declare it.
* typeck.c (check_for_casting_away_constness): New function.
(build_static_cast): Rewrite.

From-SVN: r68506
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/cp-tree.h
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/expr/static_cast1.C [new file with mode: 0644]