diff options
Diffstat (limited to 'gcc/cp/ChangeLog')
-rw-r--r-- | gcc/cp/ChangeLog | 247 |
1 files changed, 247 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index f96c2643059..b7df0d56782 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,250 @@ +2013-04-15 Jason Merrill <jason@redhat.com> + + * pt.c (tsubst) [DECLTYPE_TYPE]: Use tsubst_copy_and_build. + + PR c++/52748 + * pt.c (tsubst) [DECLTYPE_TYPE]: If ~id is an expression + rather than a destructor name, it isn't an unqualified-name. + (tsubst_copy_and_build): Pass down decltype_flag to operator + handling code, too. + + PR c++/56388 + * semantics.c (insert_capture_proxy): Just use index 1 in the + stmt_list_stack. + +2013-04-12 Jakub Jelinek <jakub@redhat.com> + + * error.c (cp_print_error_function, + print_instantiation_partial_context_line, + maybe_print_constexpr_context): Colorize locus strings. + +2013-04-11 Jason Merrill <jason@redhat.com> + + PR c++/52748 + * parser.c (complain_flags): New. + (cp_parser_postfix_expression): Use it. + (cp_parser_unary_expression): Likewise. + (cp_parser_binary_expression): Likewise. + (cp_parser_assignment_expression): Likewise. + (cp_parser_expression): Likewise. + (cp_parser_postfix_open_square_expression): Take decltype_p. + (cp_parser_builtin_offsetof): Adjust. + (cp_convert_range_for): Pass complain to finish_unary_op_expr. + * decl2.c (grok_array_decl): Add decltype_p parm. + * cp-tree.h: Adjust prototype. + * semantics.c (finish_unary_op_expr): Add complain parm. + +2013-04-11 Jakub Jelinek <jakub@redhat.com> + + PR c++/56895 + * call.c (null_ptr_cst_p): Call fold_non_dependent_expr_sfinae before + calling maybe_constant_value for C++98. + +2013-04-11 Jason Merrill <jason@redhat.com> + + PR c++/56901 + * semantics.c (lambda_capture_field_type, lambda_proxy_type): + Strip references before checking WILDCARD_TYPE_P. + +2013-04-11 Paolo Carlini <paolo.carlini@oracle.com> + + * call.c (build_conditional_expr_1, build_over_call): Protect + error calls with complain & tf_error. + * typeck.c (finish_class_member_access_expr, cp_build_binary_op, + build_x_unary_op, cp_build_unary_op, cp_build_compound_expr, + build_ptrmemfunc): Likewise. + (lookup_destructor): Take tsubst_flags_t parameter, adjust. + + * cvt.c (warn_ref_binding): Rename to diagnose_ref_binding. + (convert_to_reference): Adjust. + +2013-04-11 Jason Merrill <jason@redhat.com> + + * pt.c (tsubst_copy) [VAR_DECL]: Don't call tsubst for + local variables, look them up instead. + (tsubst_decl) [VAR_DECL]: Remove handling for anonymous union + proxies and substitution in unevaluated context. + (tsubst_expr) [OMP_FOR]: Instantiate OMP_FOR_PRE_BODY + before the iterators. + + PR c++/23055 + * pt.c (uses_deducible_template_parms): New. + (deducible_array_bound, deducible_expression): New. + (deducible_template_args): New. + (unify_one_argument): Call uses_deducible_template_parms. + +2013-04-11 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/56913 + * typeck2.c (build_m_component_ref): Protect error calls with + (complain & tf_error). + +2013-04-11 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/54216 + * parser.c (cp_parser_enum_specifier): Check for empty + anonymous enums and anonymous scoped enums. + +2013-04-10 Jakub Jelinek <jakub@redhat.com> + + PR c++/56895 + * typeck.c (cp_build_binary_op): Call fold_non_dependent_expr_sfinae + first before calling maybe_constant_value for warn_for_div_by_zero + or invalid shift count warning purposes. + +2013-04-09 Jason Merrill <jason@redhat.com> + + PR c++/25466 + * rtti.c (build_typeid): Check the address of the argument + rather than looking for an INDIRECT_REF. + +2013-04-04 Jason Merrill <jason@redhat.com> + + PR c++/56838 + PR c++/17232 + * typeck2.c (abstract_virtuals_error_sfinae): Disable + complete_type again. + +2013-04-08 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/56871 + * decl.c (validate_constexpr_redeclaration): Allow an explicit + specialization to be different wrt the constexpr specifier. + +2013-04-06 Jason Merrill <jason@redhat.com> + + * parser.c (cp_parser_std_attribute): Treat [[noreturn]] like GNU + noreturn attribute. + +2013-04-05 Ed Smith-Rowland <3dw4rd@verizon.net> + + * parser.c (cp_parser_ref_qualifier_seq_opt): Move to + cp_parser_ref_qualifier_opt. Error if more than one ref-qual found. + +2013-04-03 Jason Merrill <jason@redhat.com> + + * cp-tree.h (FUNCTION_OR_METHOD_TYPE_CHECK): Remove. + (TYPE_RAISES_EXCEPTIONS): Use FUNC_OR_METHOD_CHECK instead. + (FUNCTION_REF_QUALIFIED, FUNCTION_RVALUE_QUALIFIED): Likewise. + + * mangle.c (write_type): When writing a function type with + function-cv-quals, don't add the unqualified type as a + substitution candidate. + +2013-04-03 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/56815 + * typeck.c (cp_build_unary_op): Change -Wpointer-arith permerror to + pedwarn. + +2013-04-03 Jakub Jelinek <jakub@redhat.com> + + PR debug/56819 + * tree.c (strip_typedefs): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT + from args to new_args. + (strip_typedefs_expr): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT from t to + r instead of doing {S,G}ET_NON_DEFAULT_TEMPLATE_ARGS_COUNT. + +2013-04-02 Jason Merrill <jason@redhat.com> + + PR c++/56821 + * mangle.c (write_function_type): Mangle ref-qualifier. + (write_nested_name): Likewise. + (canonicalize_for_substitution): Preserve ref-qualifier. + (write_type): Likewise. + + PR c++/34949 + * decl.c (begin_destructor_body): Clobber the object in a cleanup. + +2013-04-02 Paolo Carlini <paolo.carlini@oracle.com> + + * friend.c (do_friend): Use COMPLETE_OR_OPEN_TYPE_P. + * pt.c (find_parameter_packs_r): Use TYPE_ALIAS_P and TYPE_TI_ARGS. + (for_each_template_parm_r): Use TYPE_TI_ARGS. + +2013-04-02 Paolo Carlini <paolo.carlini@oracle.com> + + * cp-tree.h (TAGGED_TYPE_P): Remove. + (IS_OVERLOAD_TYPE): Rename to OVERLOAD_TYPE_P, adjust. + (TYPE_ANONYMOUS_P): Adjust. + * call.c (build_new_op_1): Likewise. + * class.c (find_abi_tags_r): Likewise. + * decl.c (warn_misplaced_attr_for_class_type, start_decl, + type_is_deprecated): Likewise. + * decl2.c (grokfield, min_vis_r): Likewise. + * pt.c (get_template_info): Likewise. + * tree.c (handle_abi_tag_attribute): Likewise. + +2013-04-01 Jason Merrill <jason@redhat.com> + + * semantics.c (maybe_constant_value): Check + instantiation_dependent_expression_p. + * pt.c (build_non_dependent_expr): Don't check it here. + + PR c++/56772 + * init.c (build_new): Don't try to process an array initializer + at template definition time. + + PR c++/56793 + * typeck.c (finish_class_member_access_expr): Handle enum scope. + + PR c++/56794 + * parser.c (cp_parser_range_for): Don't try to do auto deduction + in a template if the type of the range is incomplete. + + * call.c (add_function_candidate): Take the address of 'this' here. + (build_over_call): And here. + (build_new_method_call_1, build_op_call_1): Not here. + (build_user_type_conversion_1): Or here. + (add_candidates): Adjust. + + * cxx-pretty-print.h (pp_cxx_cv_qualifiers): New. + * class.c (same_signature_p): Use type_memfn_quals. + * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Use + FUNCTION_OR_METHOD_TYPE_CHECK. + * error.c (dump_type_suffix): Add padding before cv-qualifiers. + * pt.c (unify): Use static_fn_type. + +2013-04-01 Bronek Kozicki <b.kozicki@gmail.com> + Jason Merrill <jason@redhat.com> + + Implement N2439 (ref-qualifiers for 'this') + * cp-tree.h (FUNCTION_REF_QUALIFIED): New. + (FUNCTION_RVALUE_QUALIFIED): New. + (FUNCTION_OR_METHOD_TYPE_CHECK): New. + (cpp0x_warn_str): Add CPP0X_REF_QUALIFIER. + (cp_ref_qualifier): New enum. + (cp_declarator): Add ref_qualifier. + * parser.c (cp_parser_ref_qualifier_seq_opt): New. + (cp_parser_direct_declarator): Use it. + (make_call_declarator): Adjust. + (cp_parser_lambda_declarator_opt): Adjust. + * call.c (add_function_candidate): Handle ref-qualifier overload + resolution semantics. + (standard_conversion): Adjust. + * class.c (add_method, same_signature_p): Compare ref-qualifiers. + * decl.c (grokdeclarator): Handle ref-qualifiers. + (grokfndecl): Check for invalid ref-qualifiers. + (static_fn_type, revert_static_member_fn): Adjust. + * decl2.c (build_memfn_type): Handle ref-qualifiers. + (check_classfn): Check them. + (cp_reconstruct_complex_type): Retain them. + * error.c (dump_ref_qualifier): New. + (dump_type_suffix, dump_function_decl): Use it. + (maybe_warn_cpp0x): Handle CPP0X_REF_QUALIFIER. + * pt.c (tsubst, tsubst_function_type): Instantiate ref-quals. + (unify): Retain them. + * tree.c (cp_check_qualified_type): New. + (cp_build_qualified_type_real): Keep exception spec and ref-qual. + (build_ref_qualified_type): New. + (strip_typedefs, build_exception_variant): Keep ref-qualifier. + (cp_build_type_attribute_variant): Keep ref-qualifier. + * typeck.c (merge_types): Keep ref-qualifier. + (structural_comptypes): Compare ref-qualifier. + (type_memfn_rqual): New. + (apply_memfn_quals): Take ref-qual argument. + * typeck2.c (build_m_component_ref): Check ref-qualifier. + 2013-04-01 Paolo Carlini <paolo.carlini@oracle.com> * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): Remove. |