OSDN Git Service

PR c++/42137
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
index 520262e..72d7832 100644 (file)
@@ -1,3 +1,80 @@
+2009-11-24  Jason Merrill  <jason@redhat.com>
+
+       PR c++/42137
+       * parser.c (cp_parser_mem_initializer_id): Pass typename_type to
+       cp_parser_class_name.
+       (cp_parser_unqualified_id): Same, rather than class_type.
+
+       PR c++/11764
+       * parser.c (cp_parser_expression_statement): Give helpful error
+       for constructor name used as type.
+
+       * pt.c (determine_specialization): Give helpful error about missing
+       "template<>".
+
+2009-11-23  Jakub Jelinek  <jakub@redhat.com>
+
+       PR middle-end/42095
+       * tree.c: Include cgraph.h.
+       (cp_fix_function_decl_p): Don't return true for same_body aliases.
+       * Make-lang.in (cp/tree.o): Depend on $(CGRAPH_H).
+
+2009-11-23  Dodji Seketeli  <dodji@redhat.com>
+
+       PR c++/14777
+       * cp-tree.def <TEMPLATE_INFO>: Declare new kind of tree
+       node.
+       * cp-tree.h (struct tree_template_info,
+       struct qualified_typedef_usage_s): New.
+       (cp_tree_node_structure_enum): add TS_CP_TEMPLATE_INFO.
+       (union lang_tree_node): Add template_info.
+       (TI_TEMPLATE, TI_ARGS, TI_TYPEDEFS_NEEDING_ACCESS_CHECKING):
+       Adjust.
+       (build_template_info): Declare.
+       (get_types_needing_access_check): Adjust return type.
+       (add_typedef_to_current_template_for_access_check): Declare.
+       * cp-objcp-common.c (cp_tree_size): Handle TEMPLATE_INFO.
+       * semantics.c (add_typedef_to_current_template_for_access_check):
+       Split from ...
+       (check_accessibility_of_qualified_id): ... here.
+       * decl.c (make_typename_type): Use it.
+       * pt.c (build_template_info): Define.
+       (check_explicit_specialization, find_parameter_packs_r,
+       push_template_decl_real, lookup_template_class,
+       for_each_template_parm_r, tsubst_decl, tsubst): Use
+       build_template_info.
+       (get_types_needing_access_check): Adjust return type.
+       (append_type_to_template_for_access_check_1): Record the
+       location of the usage point of the typedef. Adjust to TEMPLATE_INFO.
+       (append_type_to_template_for_access_check): Add new location
+       parameter. Pass it to append_type_to_template_for_access_check_1.
+       Adjust to TEMPLATE_INFO.
+       (perform_typedefs_access_check): Temporarily set input_location to
+       the usage point of the typedef we are checking access for. Adjust
+       to new TEMPLATE_INFO tree node.
+       * tree.c (bind_template_template_parm): Use build_template_info.
+       * call.c (add_template_candidate_real): Likewise.
+       * decl.c (grokfndecl): Likewise.
+       (cp_tree_node_structure): Handle TEMPLATE_INFO.
+
+2009-11-20  Jason Merrill  <jason@redhat.com>
+
+       PR c++/9050, DR 147, DR 318
+       * parser.c (cp_parser_lookup_name): If the name matches the explicit
+       class scope, we're naming the constructor.
+       (cp_parser_constructor_declarator_p): Just use cp_parser_unqualified_id
+       if we have a nested-name-specifier.
+       (cp_parser_direct_declarator): Handle getting an overload set as a
+       constructor declarator.
+       (cp_parser_unqualified_id): Avoid looking up the constructor when
+       naming the destructor.
+       (cp_parser_diagnose_invalid_type_name): Give good
+       diagnostic for improper use of constructor as template.
+       * typeck.c (finish_class_member_access_expr): Give good diagnostic
+       about calling constructor.
+
+       * error.c (dump_aggr_type): Don't print A::A for injected-class-name.
+
 2009-11-20  Simon Martin  <simartin@users.sourceforge.net>
 
        PR c++/38646