diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2012-04-24 16:25:15 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2012-04-24 16:25:15 +0000 |
commit | b40e334f1fabcd0d751f8c81a3a37491e878f69f (patch) | |
tree | e6624c8acded44cfe59898448175ad6c47ed2150 /gcc/cp/cp-gimplify.c | |
parent | 5ada012290883e98d76a3ac6dcd34e56d50057e3 (diff) | |
download | gcc-b40e334f1fabcd0d751f8c81a3a37491e878f69f.zip gcc-b40e334f1fabcd0d751f8c81a3a37491e878f69f.tar.gz gcc-b40e334f1fabcd0d751f8c81a3a37491e878f69f.tar.bz2 |
re PR c++/52363 (Presence/absence of -pedantic compilation affects run-time behavior)
/cp
2012-04-24 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/52363
* call.c (tourney, perform_overload_resolution,
build_operator_new_call, build_user_type_conversion_1,
build_user_type_conversion, perform_overload_resolution,
add_template_candidate, add_template_candidate_real,
add_template_conv_candidate, add_builtin_candidates,
add_builtin_candidate, build_builtin_candidate,
add_conv_candidate, add_function_candidate, implicit_conversion,
reference_binding, build_list_conv, conditional_conversion,
add_candidates, can_convert_array, build_aggr_conv,
build_array_conv, build_complex_conv, conditional_conversion):
Add tsubst_flags_t parameter.
(joust): Likewise, use it to handle SFINAE as if pedantic.
(add_list_candidates, build_integral_nontype_arg_conv,
perform_overload_resolution, build_new_function_call,
build_operator_new_call, build_op_call_1,
build_conditional_expr_1, build_new_op_1, convert_like_real,
convert_arg_to_ellipsis, convert_default_arg,
convert_for_arg_passing, build_over_call,
build_new_method_call_1, can_convert_arg, can_convert_arg_bad,
perform_implicit_conversion_flags,
perform_direct_initialization_if_possible,
initialize_reference): Adjust.
* typeck.c (casts_away_constness, casts_away_constness_r):
Add tsubst_flags_t parameter.
(convert_arguments, check_for_casting_away_constness,
build_static_cast_1, build_ptrmemfunc, convert_for_assignment):
Adjust.
* decl.c (reshape_init_r, check_default_argument): Likewise.
* cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
* pt.c (convert_nontype_argument, check_non_deducible_conversion):
Likewise.
* init.c (build_new_1): Likewise.
* cvt.c (convert_to_reference, ocp_convert, build_type_conversion,
build_expr_type_conversion, ): Likewise.
* search.c (check_final_overrider): Likewise.
* cp-tree.h (build_user_type_conversion,
build_operator_new_call, can_convert, can_convert_arg,
can_convert_arg_bad, convert_default_arg,
convert_arg_to_ellipsis, convert_for_arg_passing):
Adjust declaration.
/testsuite
2012-04-24 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/52363
* g++.dg/cpp0x/sfinae35.C: New.
* g++.dg/cpp0x/sfinae36.C: Likewise.
From-SVN: r186774
Diffstat (limited to 'gcc/cp/cp-gimplify.c')
-rw-r--r-- | gcc/cp/cp-gimplify.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c index 416c640..c3d1f23 100644 --- a/gcc/cp/cp-gimplify.c +++ b/gcc/cp/cp-gimplify.c @@ -1273,7 +1273,8 @@ cxx_omp_clause_apply_fn (tree fn, tree arg1, tree arg2) for (parm = defparm; parm && parm != void_list_node; parm = TREE_CHAIN (parm), i++) argarray[i] = convert_default_arg (TREE_VALUE (parm), - TREE_PURPOSE (parm), fn, i); + TREE_PURPOSE (parm), fn, i, + tf_warning_or_error); t = build_call_a (fn, i, argarray); t = fold_convert (void_type_node, t); t = fold_build_cleanup_point_expr (TREE_TYPE (t), t); @@ -1306,7 +1307,7 @@ cxx_omp_clause_apply_fn (tree fn, tree arg1, tree arg2) parm = TREE_CHAIN (parm), i++) argarray[i] = convert_default_arg (TREE_VALUE (parm), TREE_PURPOSE (parm), - fn, i); + fn, i, tf_warning_or_error); t = build_call_a (fn, i, argarray); t = fold_convert (void_type_node, t); return fold_build_cleanup_point_expr (TREE_TYPE (t), t); |