re PR c++/65558 (crash using __attribute__((__abi_tag__)) on anonymous inline namespace)
[gcc.git] / gcc / cp / ChangeLog
index d5b3cd8ad43b998389e48322fdd2182c5cd566c5..4ba45d72c6acda156a3a406dcf94bfc392c18351 100644 (file)
@@ -1,3 +1,335 @@
+2015-03-25  Marek Polacek  <polacek@redhat.com>
+
+       PR c++/65558
+       * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
+       on an anonymous namespace.
+
+2015-03-25  Marek Polacek  <polacek@redhat.com>
+
+       PR c++/61670
+       * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
+
+2015-03-24  Jason Merrill  <jason@redhat.com>
+
+       PR c++/65046
+       * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
+       * parser.c (cp_parser_namespace_definition): Don't set it.
+       * name-lookup.c (handle_namespace_attrs): Check
+       DECL_NAMESPACE_ASSOCIATIONS instead.
+
+       PR c++/65498
+       * pt.c (get_mostly_instantiated_function_type): Just return the
+       type of the partially instantiated template in DECL_TI_TEMPLATE.
+
+2015-03-20  Marek Polacek  <polacek@redhat.com>
+
+       PR c++/65398
+       * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
+       A[i + j].
+
+2015-03-20  Marek Polacek  <polacek@redhat.com>
+
+       PR c++/65072
+       * typeck.c (lookup_anon_field): Make sure we're dealing with the main
+       variant.
+
+2015-03-19  Jason Merrill  <jason@redhat.com>
+
+       PR c++/65046
+       Automatically propagate ABI tags to variables and functions
+       from their (return) type.
+       * class.c (check_tag): Handle variables and functions.
+       (mark_or_check_attr_tags): Split out from find_abi_tags_r.
+       (mark_or_check_tags): Likewise.
+       (mark_abi_tags): Use it.  Rename from mark_type_abi_tags.
+       (check_abi_tags): Add single argument overload for decls.
+       Handle inheriting tags for decls.
+       * mangle.c (write_mangled_name): Call it.
+       (mangle_return_type_p): Split out from write_encoding.
+       (unmangled_name_p): Split out from write_mangled_name.
+       (write_mangled_name): Ignore abi_tag on namespace.
+       * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
+       * parser.c (cp_parser_namespace_definition): Set it.
+       * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
+       about abi_tag attribute on non-inline namespace.
+       * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
+       (handle_abi_tag_attribute): Allow tags on variables.
+
+2015-03-19  Jakub Jelinek  <jakub@redhat.com>
+
+       * decl2.c (cplus_decl_attributes): Also add "omp declare target"
+       attribute for DECL_EXTERNAL VAR_DECLs.
+
+2015-03-18  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/65340
+       * call.c (build_over_call): Pass the tsubst_flags_t argument to
+       mark_used.
+       * decl2.c (mark_used): Inline the require_deduced_type call and
+       guard the error call.
+
+2015-03-16  Jason Merrill  <jason@redhat.com>
+
+       PR c++/65061
+       * parser.c (cp_parser_template_name): Call strip_using_decl.
+
+2015-03-16  Marek Polacek  <polacek@redhat.com>
+
+       DR 1688
+       PR c++/65327
+       * decl.c (grokdeclarator): Allow volatile and constexpr together.
+
+2015-03-12  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/65323
+       * decl.c (check_default_argument): Don't call
+       maybe_warn_zero_as_null_pointer_constant.
+
+2015-03-11  Aldy Hernandez  <aldyh@redhat.com>
+
+       * cp-gimplify.c (simple_empty_class_p): New.
+       * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR.  Abstract
+       the code for empty class copies into simple_empty_class_p, and
+       adapt it to handle COMPOUND_EXPRs.
+
+2015-03-10  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/65370
+       * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
+       only if the location of newdecl doesn't match the location of olddecl.
+
+2015-03-10  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/65127
+       * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
+       is not a PARM_DECL.
+
+2015-03-10  Jason Merrill  <jason@redhat.com>
+
+       PR c++/65333
+       DR 1558
+       * pt.c (dependent_type_p_r): Check both class and alias template args.
+
+2015-03-10  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c/65120
+       * parser.c (cp_parser_binary_expression): Check for tcc_comparison
+       before preparing arguments to warn_logical_not_parentheses.
+       Use maybe_constant_value on rhs.
+
+2015-03-09  Jason Merrill  <jason@redhat.com>
+
+       PR c++/65339
+       * call.c: Don't call maybe_resolve_dummy when calling a constructor.
+
+2015-03-09  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c/65120
+       * parser.c (cp_parser_binary_expression): Don't warn for
+       !!x == y or !b == y where b is bool.
+
+2015-03-06  Aldy Hernandez  <aldyh@redhat.com>
+
+       * ptree.c (cxx_print_lambda_node): New.
+       (cxx_print_xnode): Handle LAMBDA_EXPR.
+
+2015-03-03  Aldy Hernandez  <aldyh@redhat.com>
+
+       PR c++/65295
+       * constexpr.c (cxx_eval_constant_expression): Remove assert in
+       RESULT_DECL handling.
+
+2015-02-26  Marek Polacek  <polacek@redhat.com>
+
+       PR c++/65202
+       * constexpr.c (cxx_eval_constant_expression): Don't evaluate
+       a RETURN_EXPR if its operand is null.
+
+2015-02-25  Jason Merrill  <jason@redhat.com>
+
+       PR c++/65209
+       * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
+       DECL_COMDAT.
+       (constrain_visibility_for_template): Handle reference arguments.
+
+       PR debug/58315
+       * decl.c (start_preparsed_function): Use create_artificial_label
+       for cdtor_label.
+
+2015-02-17  Paolo Carlini  <paolo.carlini@oracle.com>
+           Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/65075
+       * constexpr.c (check_constexpr_bind_expr_vars): Allow
+       implicit typedefs for lambda types.
+
+2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/60894
+       * decl.c (lookup_and_check_tag): Use strip_using_decl.
+
+2015-02-13  Jason Merrill  <jason@redhat.com>
+
+       PR c++/65054
+       * pt.c (template_args_equal): Look through conversions here.
+       * tree.c (cp_tree_equal): Not here.
+
+2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/60211
+       * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
+       pragma_external context.
+
+2015-02-13  Jason Merrill  <jason@redhat.com>
+
+       PR c++/65051
+       * call.c (reference_binding): Don't look for bad conversion
+       if TO is incomplete.
+
+2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/64970
+       * decl.c (make_typename_type): Pass tsubst_flags_t argument
+       to lookup_template_class.
+
+2015-02-13  Jakub Jelinek  <jakub@redhat.com>
+
+       PR ipa/65034
+       * decl.c (start_preparsed_function): Use void_type_node instead
+       of NULL_TREE as LABEL_DECL type.
+
+2015-02-12  Jason Merrill  <jason@redhat.com>
+
+       PR c++/64898
+       * mangle.c (write_mangled_name): Fix test for variable template
+       instantiation.
+
+       * decl.c (begin_destructor_body): Condition clobber on
+       -flifetime-dse.
+
+2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
+
+       PR c++/64959
+       * parser.c (lookup_literal_operator): Return all candidates.
+       (cp_parser_userdef_char_literal): Simplify error handling.
+       (cp_parser_userdef_numeric_literal):  Pass tf_warning_or_error.
+       (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
+       Also give higher priority to standard string UDL operator.
+
+2015-02-12  Jakub Jelinek  <jakub@redhat.com>
+
+       PR debug/55541
+       * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
+       * decl.c (poplevel): If functionbody, try not to create an extra
+       BLOCK for function body and use subblocks as that, if it is non-NULL
+       and doesn't have siblings.  Set BLOCK_OUTER_CURLY_BRACE_P flag.
+       (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
+
+       PR sanitizer/64984
+       * except.c (check_noexcept_r): Return NULL for internal
+       calls.
+
+2015-02-10  Jason Merrill  <jason@redhat.com>
+
+       PR c++/64994
+       * constexpr.c (cxx_eval_call_expression): Walk the clone list.
+
+2015-02-10  Jan Hubicka  <hubicka@ucw.cz>
+
+       PR ipa/64982
+       * method.c (use_thunk): Do not check for stdarg thunks.
+
+2015-02-06  Jason Merrill  <jason@redhat.com>
+
+       PR c++/64899
+       * init.c (build_vec_init): Handle default-initialized array with
+       constexpr default constructor.
+
+2015-02-04  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c/64824
+       PR c/64868
+       * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
+
+2015-02-03  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/64877
+       * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
+       for generated expressions.
+
+2015-02-02  Ville Voutilainen  <ville.voutilainen@gmail.com>
+
+       PR c++/64901
+       * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
+       DECL_OVERRIDE_P.
+
+2015-02-02  Jason Merrill  <jason@redhat.com>
+
+       * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
+
+2015-01-30  Joseph Myers  <joseph@codesourcery.com>
+
+       * class.c, except.c, parser.c, pt.c: All callers of fatal_error
+       changed to pass input_location as first argument.
+
+2015-01-29  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/64717
+       * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
+       into SAVE_EXPR.
+
+2015-01-29  Jason Merrill  <jason@redhat.com>
+
+       PR c++/49508
+       * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
+       erroneous return statement.
+
+       PR c++/64521
+       * repo.c (repo_emit_p): It's OK for a clone to be extern at this
+       point.
+
+2015-01-27  Caroline Tice  <cmtice@google.com>
+
+       Committing VTV Cywin/Ming patch for Patrick Wollgast
+       * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
+       check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
+
+2015-01-27  Jason Merrill  <jason@redhat.com>
+
+       PR c++/58597
+       * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
+       current_function_decl.
+
+       PR c++/63889
+       * pt.c (finish_template_variable): Move from semantics.c.
+       Handle multiple template arg levels.  Handle coercion here.
+       (lookup_template_variable): Not here.
+
+2015-01-23  Jason Merrill  <jason@redhat.com>
+
+       PR c++/64314
+       PR c++/57510
+       * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
+       that has been completely split out.
+
+       PR c++/64701
+       * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
+       statement codes.
+
+       PR c++/64727
+       * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
+       of CONST_DECL.
+
+2015-01-21  Jason Merrill  <jason@redhat.com>
+
+       PR c++/64603
+       * constexpr.c (cxx_eval_constant_expression): Only shortcut
+       constant CONSTRUCTORs.
+
+       PR c++/64647
+       * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
+       give a hard error in a template instantiation.
+
 2015-01-21  Richard Biener  <rguenther@suse.de>
 
        PR middle-end/64313