diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-06-06 23:01:45 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-06-06 23:01:45 +0000 |
commit | c4698a21964cdc07e1b0c5397cc9417ead7e6797 (patch) | |
tree | f33c10cac813a9df3728ad7933a633ef664460ab /gcc/cp/semantics.c | |
parent | b37a3600665c8e3ff0510f3b804774ad2bdd30ee (diff) | |
download | gcc-c4698a21964cdc07e1b0c5397cc9417ead7e6797.tar.gz |
/cp
2012-06-06 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/53567
* typeck.c (cp_perform_integral_promotions): New, like
perform_integral_promotions but also takes a tsubst_flags_t parameter.
(pointer_diff): Add tsubst_flags_t parameter.
(decay_conversion, cp_default_conversion, cp_build_array_ref,
cp_build_binary_op, cp_build_unary_op, build_static_cast_1,
build_reinterpret_cast_1, cp_build_modify_expr,
convert_for_assignment): Adjust.
* optimize.c (build_delete_destructor_body): Adjust.
* init.c (expand_virtual_init, expand_default_init, build_new_1,
build_new, build_vec_delete_1, build_vec_init, build_delete): Adjust.
(construct_virtual_base): Adjust LOOKUP_COMPLAIN -> 0.
* class.c (build_base_path): Adjust.
* decl.c (compute_array_index_type, finish_destructor_body): Likewise.
* method.c (synthesized_method_walk): Adjust flag and complain.
* rtti.c (ifnonnull): Add tsubst_flags_t parameter.
(build_typeid, build_dynamic_cast_1): Adjust.
* except.c (initialize_handler_parm): Likewise.
* typeck2.c (process_init_constructor_record): Likewise.
* pt.c (tsubst_friend_class): Don't change flags.
* semantics.c (finish_goto_stmt, handle_omp_for_class_iterator,
finish_static_assert): Likewise.
* parser.c (cp_parser_lookup_name): Just pass 0 as flags to
lookup_name_real.
* call.c (build_op_delete_call): Add tsubst_flags_t parameter.
(convert_like_real, convert_arg_to_ellipsis, convert_for_arg_passing):
Adjust.
(standard_conversion): Adjust LOOKUP_COMPLAIN -> 0.
(implicit_conversion): Mask out tf_error with a FIXME.
(build_user_type_conversion_1, build_new_op_1, build_over_call): Use
complain & tf_error instead of flags & LOOKUP_COMPLAIN.
* cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
build_up_reference, convert_to_reference, cp_convert,
cp_convert_and_check, ocp_convert, convert_force): Add tsubst_flags_t
parameter.
(convert_to_reference, ocp_convert): Use complain & tf_error instead
of flags & LOOKUP_COMPLAIN.
(convert_force): Adjust LOOKUP_COMPLAIN -> 0.
* name-lookup.c (identifier_type_value_1, lookup_qualified_name,
lookup_name_real, lookup_function_nonclass, lookup_name,
lookup_name_prefer_type): Adjust LOOKUP_COMPLAIN -> 0.
* cp-tree.h: Adjust prototypes; remove LOOKUP_COMPLAIN.
/testsuite
2012-06-06 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/53567
* g++.dg/cpp0x/alias-decl-19.C: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188283 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r-- | gcc/cp/semantics.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 4334d4c0916..7769bbaa36f 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -564,7 +564,8 @@ finish_goto_stmt (tree destination) destination = mark_rvalue_use (destination); if (!processing_template_decl) { - destination = cp_convert (ptr_type_node, destination); + destination = cp_convert (ptr_type_node, destination, + tf_warning_or_error); if (error_operand_p (destination)) return NULL_TREE; } @@ -4526,7 +4527,8 @@ handle_omp_for_class_iterator (int i, location_t locus, tree declv, tree initv, if (error_operand_p (iter_incr)) return true; incr = TREE_OPERAND (rhs, 1); - incr = cp_convert (TREE_TYPE (diff), incr); + incr = cp_convert (TREE_TYPE (diff), incr, + tf_warning_or_error); if (TREE_CODE (rhs) == MINUS_EXPR) { incr = build1 (NEGATE_EXPR, TREE_TYPE (diff), incr); @@ -4581,7 +4583,7 @@ handle_omp_for_class_iterator (int i, location_t locus, tree declv, tree initv, return true; } - incr = cp_convert (TREE_TYPE (diff), incr); + incr = cp_convert (TREE_TYPE (diff), incr, tf_warning_or_error); for (c = clauses; c ; c = OMP_CLAUSE_CHAIN (c)) if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_LASTPRIVATE && OMP_CLAUSE_DECL (c) == iter) @@ -5130,7 +5132,7 @@ finish_static_assert (tree condition, tree message, location_t location, /* Fold the expression and convert it to a boolean value. */ condition = fold_non_dependent_expr (condition); - condition = cp_convert (boolean_type_node, condition); + condition = cp_convert (boolean_type_node, condition, tf_warning_or_error); condition = maybe_constant_value (condition); if (TREE_CODE (condition) == INTEGER_CST && !integer_zerop (condition)) |