]> gcc.gnu.org Git - gcc.git/commit
re PR c++/22132 (Wrong code: upcasting a const class pointer to struct the class...
authorMark Mitchell <mark@codesourcery.com>
Fri, 15 Jul 2005 16:10:05 +0000 (16:10 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Fri, 15 Jul 2005 16:10:05 +0000 (16:10 +0000)
commit34b5375faef75cab6ecda04f161e5b81f662b2cb
tree59867dcc10601c3cce82c828262ad523c4dfee3a
parente27d6202c07dbc70172733fcf6e79cb2ffe9a56c
re PR c++/22132 (Wrong code: upcasting a const class pointer to struct the class derives from (C/old-style cast))

PR c++/22132
* call.c (implicit_conversion): Add c_cast_p parameter.
(standard_conversion): Likewise.  Allow conversions between
differently-qualified pointer types when performing a C-style
cast.
(add_function_candidate): Adjust callee.
(build_builtin_candidate): Likewise.
(build_user_type_conversion_1): Likewise.
(conditional_conversion): Likewise.
(can_convert_arg): Likewise.
(can_convert_arg_bad): Likewise.
(perform_implicit_conversion): Likewise.
* cp-tree.h (comp_ptr_ttypes_const): Declare.
* typeck.c (comp_ptr_ttypes_const): Give it external linkage.
Return bool.

PR c++/22132
* g++.dg/expr/cast4.C: New test.

From-SVN: r102059
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/cp-tree.h
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/expr/cast4.C [new file with mode: 0644]
This page took 0.059206 seconds and 5 git commands to generate.