* call.c (struct conversion): Add base_p. (convert_like): Add c_cast_p argument. (convert_like_with_conversion): Likewise. (build_conv): Clear base_p. (standard_conversion): Set it, for derived-to-base conversions. (convert_like_real): Add c_cast_p parameter. Handle pointer conversions directly rather than relying on ocp_convert. (perform_direct_initialization_if_possible): Add c_cast_p parameter. * cp-tree.h (perform_direct_initialization_if_possible): Change prototype. (convert_member_func_to_ptr): New function. * typeck.c (check_for_casting_away_constness): Add diag_fn parameter. (build_static_cast_1): New function, split out from ... (build_static_cast): ... here. Use build_static_cast_1. (build_reinterpret_cast_1): New function, split out from ... (build_reinterpret_cast): ... here. Use build_reinterpret_cast_1. (build_const_cast_1): New function, split out from ... (build_const_cast): ... here. Use build_const_cast_1. (build_c_cast): Rewrite to use build_const_cast_1, build_static_cast_1, and build_reinterpret_cast_1. (convert_member_func_to_ptr): New function. * g++.dg/conversion/reinterpret1.C: Adjust error markers. * g++.dg/conversion/const2.C: New test. * g++.dg/expr/reinterpret2.C: New test. * g++.dg/expr/reinterpret3.C: New test. * g++.dg/expr/cast2.C: New test. * g++.dg/expr/copy1.C: New test. * g++.dg/other/conversion1.C: Change error message. * g++.dg/parse/comma1.C: Use __extension__ to allow casts from function pointers to void *. * g++.old-deja/g++.mike/p10148.C: Likewise. From-SVN: r89300
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
anew1.C | Loading commit data... | |
anew2.C | Loading commit data... | |
anew3.C | Loading commit data... | |
anew4.C | Loading commit data... | |
assign1.C | Loading commit data... | |
call1.C | Loading commit data... | |
call2.C | Loading commit data... | |
cast1.C | Loading commit data... | |
cast2.C | Loading commit data... | |
comma1.C | Loading commit data... | |
cond1.C | Loading commit data... | |
cond2.C | Loading commit data... | |
cond3.C | Loading commit data... | |
cond4.C | Loading commit data... | |
cond6.C | Loading commit data... | |
copy1.C | Loading commit data... | |
crash-1.C | Loading commit data... | |
crash2.C | Loading commit data... | |
dtor1.C | Loading commit data... | |
dtor2.C | Loading commit data... | |
dtor3.C | Loading commit data... | |
enum1.C | Loading commit data... | |
for1.C | Loading commit data... | |
for2.C | Loading commit data... | |
incomplete1.C | Loading commit data... | |
lval1.C | Loading commit data... | |
member-of-incomplete-type-1.C | Loading commit data... | |
pmf-1.C | Loading commit data... | |
ptrmem1.C | Loading commit data... | |
ptrmem4.C | Loading commit data... | |
ptrmem5.C | Loading commit data... | |
sizeof1.C | Loading commit data... | |
sizeof2.C | Loading commit data... | |
sizeof3.C | Loading commit data... | |
static_cast1.C | Loading commit data... | |
static_cast2.C | Loading commit data... | |
static_cast3.C | Loading commit data... | |
static_cast4.C | Loading commit data... | |
static_cast5.C | Loading commit data... |