re PR c++/22132 (Wrong code: upcasting a const class pointer to struct the class…
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
Showing
gcc/testsuite/g++.dg/expr/cast4.C
0 → 100644
Please
register
or
sign in
to comment