X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Fcp%2FChangeLog;h=981976f2821bb7495ac07b7a8fa2d635dc55a2f0;hb=917e3348c08358f07eddac9282f54cb92947ffeb;hp=cf27990a42b916276eaf0af861ddda1fb9751eb1;hpb=89eb6658b1c5087af9a9ee8c2e1413f2dbebca04;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index cf27990a42b..981976f2821 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,342 @@ +2006-01-19 Volker Reichelt + + PR c++/16829 + * decl.c (start_preparsed_function): Check default arguments + unconditionally. + * name-lookup.c (pushdecl_maybe_friend): Check default arguments + of all functions and function templates. + * parser.c (cp_parser_late_parsing_default_args): Check default + arguments. + * decl2.c (check_default_args): Set missing default arguments to + error_mark_node. + +2006-01-18 Mark Mitchell + + PR c++/25836 + * cp-tree.h (push_class_stack): New function. + (pop_class_stack): Likewise. + * class.c (class_stack_node): Add hidden field. + (pushclass): Clear it. + (push_class_stack): New function. + (pop_class_stack): Likewise. + (currently_open_class): Ignore hidden classes. + (currently_open_derived_class): Likewise. + * name-lookup.c (push_to_top_level): Call push_class_stack. + (pop_from_top_level): Call pop_class_stack. + +2006-01-18 Kazu Hirata + + * tree.c (find_tree_t, find_tree): Remove. + * cp-tree.h: Remove the prototype for find_tree. + +2006-01-18 Jakub Jelinek + + * search.c (lookup_conversions_r): Fix a pasto. + +2006-01-17 Eric Christopher + + * call.c (convert_like_real): When issuing conversion + warnings, depend on OPT_Wconversion. + * cvt.c (build_expr_type_conversion): Ditto. + +2006-01-17 Kazu Hirata + + * name-lookup.c (lookup_namespace_name): Remove. + * name-lookup.h: Remove the prototype for + lookup_namespace_name. + +2006-01-17 Jakub Jelinek + + PR c/25682 + * decl.c (compute_array_index_type): After issuing not an integral + constant-expression error, set size to 1 to avoid ICEs later on. + +2006-01-16 Ian Lance Taylor + + * parser.c: Include "cgraph.h". + (cp_parser_asm_definition): Call cgraph_add_asm_node rather than + assemble_asm. + +2006-01-16 Rafael Ávila de Espíndola + + * g++spec.c (lang_specific_spec_functions): Remove. + +2006-01-15 Gabriel Dos Reis + + * decl.c (check_initializer): Fix thinko. + +2006-01-14 Mark Mitchell + + PR c++/25663 + * parser.c (cp_parser_direct_declarator): Use cp_parser_error + instead of error. + +2006-01-13 Jason Merrill + + * pt.c (check_explicit_specialization): Use CP_DECL_CONTEXT even more. + + * name-lookup.c (set_decl_namespace): Use CP_DECL_CONTEXT. + * pt.c (check_explicit_specialization): Likewise. + +2006-01-12 Jason Merrill + + PR libstdc++/24660 + * pt.c (check_explicit_specialization): Handle namespace + association. + * name-lookup.c (set_decl_namespace): Likewise. + +2006-01-12 Nathan Sidwell + + PR c++/24824 + * class.c (handle_using_decl): Pass correct scope to + cp_emit_debug_info_for_using. + +2006-01-11 Nathan Sidwell + + PR c++/25386 + * tree.c (lvalue_p_1): Any part of a COMPONENT_REF affects + packedness. + +2006-01-06 Gabriel Dos Reis + + * parser.c (cp_parser_primary_expression): Document the grammar + for the built-in offsetof, a GNU extension. + +2006-01-04 Zdenek Dvorak + + PR c++/25632 + * init.c (constant_value_1): Unshare use of DECL_INITIAL. Fix a typo + in condition. + +2006-01-04 Chris Lattner + + * typeck2.c: update copyright to 2006 + (split_nonconstant_init_1): Set TREE_CONSTANT to true. + +2006-01-04 Mark Mitchell + + PR c++/24782 + * parser.c (cp_parser_nested_name_specifier_opt): Preserve access + checks, even when parsing tentatively. + +2006-01-04 Richard Henderson + + Merge from gomp branch. + * lex.c (handle_pragma_java_exceptions): Fix whitespace. + * parser.c (struct cp_token): Add pragma_kind. + (eof_token): Update to match. + (struct cp_lexer): Add in_pragma; rearrange next for better packing. + (cp_parser_initial_pragma): New. + (cp_lexer_new_main): Use it. Don't bother clearing + c_lex_return_raw_strings. + (cp_lexer_get_preprocessor_token): Always initialize keyword + and pragma_kind fields. Handle CPP_PRAGMA. + (cp_lexer_consume_token): Don't allow CPP_PRAGMA_EOL when + in_pragma is set. + (cp_lexer_handle_pragma): Remove. Update callers to cp_parser_pragma. + (cp_lexer_print_token) : Don't print as a string. + (cp_parser_skip_to_pragma_eol): New. + (cp_parser_error): Use it. + (cp_parser_skip_to_closing_parenthesis): Stop at CPP_PRAGMA_EOL; + rearrange with switch statement. + (cp_parser_skip_to_end_of_statement): Likewise. + (cp_parser_skip_to_end_of_block_or_statement): Likewise. + (cp_parser_skip_to_closing_brace): Likewise. + (cp_parser_skip_until_found): Likewise. + (cp_parser_statement): Add in_compound argument; update callers. + Use it to decide how to handle pragma parsing. + (cp_parser_labeled_statement): Add in_compound argument; pass + it on to cp_parser_statement. + (cp_parser_statement_seq_opt): Stop at CPP_PRAGMA_EOL. + (cp_parser_declaration_seq_opt): Likewise. + (cp_parser_parameter_declaration): Likewise. + (cp_parser_member_specification_opt): Likewise. + (cp_parser_function_definition_after_decl): Likewise. + (cp_parser_cache_group): Handle CPP_PRAGMA/CPP_PRAGMA_EOL pairs. + (cp_parser_pragma): New. + (pragma_lex): New. + +2006-01-04 Dirk Mueller + + * decl.c (finish_constructor_body): create simple + compound stmt instead of a if(1) { } construct. + +2006-01-03 Mark Mitchell + + PR c++/25492 + * name-lookup.c (push_class_level_binding): When a derived class + provides a type binding, eliminate any type binding from a base + class. + + PR c++/25625 + * repo.c (repo_emit_p): Always instantiate static data members + initialized by constant expressions, so that there values are + available. + +2006-01-02 Mark Mitchell + + PR c++/25635 + * class.c (add_method): Set TYPE_HAS_CONVERSION for classes with a + conversion operator. + * decl.c (grokdeclarator): Do not set TYPE_HAS_CONVERSION here. + + PR c++/25638 + * class.c (add_method): Never associate more than one destructor + with a single class. + + PR c++/25637 + * cp-tree.h (do_friend): Adjust prototype. + * decl.c (grokfndecl): Make funcdef_flag a bool, not an int. + (grokdeclarator): Likewise. Refine check for invalid + declarations/definitions of member functions outside of their own + class. + * friend.c (do_friend): Make funcdef_flag a bool, not an int. + + PR c++/25633 + * parser.c (cp_parser_mem_initializer_list): Check result of + cp_parser_mem_initializer against error_mark_node, not NULL_TREE. + (cp_parser_mem_initializer): Return error_mark_node for failure. + + PR c++/25634 + * parser.c (cp_parser_template_parameter_list): Call + begin_template_parm_list and end_template_parm_list here. + (cp_parser_type_parameter): Not here. + (cp_parser_template_declaration_after_export): Or here. + (cp_parser_elaborated_type_specifier): Call + cp_parser_check_template_parameters. + + * tree.c (build_target_expr_with_type): Use force_target_expr. + + * decl2.c (mark_used): Fix typo in comment. + +2006-01-02 Volker Reichelt + + * parser.c (cp_parser_using_declaration): Skip name-lookup on + invalid scope. + +2005-12-30 Gabriel Dos Reis + + * cxx-pretty-print.c (pp_cxx_constant): New. Print + string-literal in parens if input program says so. + (pp_cxx_primary_expression): Hand off constant printing to + pp_cxx_constant. + (pp_cxx_pretty_printer_init): Set pp->c_base.constant. + (pp_cxx_expression): Use pp_cxx_constant for literals. + * error.c (dump_expr): Use pp_constant for literals. + +2005-12-29 Nathan Sidwell + + * method.c (make_thunk): Don't set comdat_linkage here. + (use_thunk): Make thunk one only here, if thunk target is + DECL_ONE_ONLY. + +2005-12-26 Mark Mitchell + + PR c++/25439 + * decl.c (grokdeclarator): Remove dead code. + * ptree.c (cxx_print_xnode): Handle BASELINK. + * parser.c (make_id_declarator): Add sfk parameter. + (cp_parser_direct_declarator): Do not pass TYPE_DECLs to + make_id_declarator. + (cp_parser_declarator_id): Simplify BASELINKs here. + (cp_parser_member_declaration): Adjust calls to + make_id_declarator. + +2005-12-26 Mark Mitchell + + PR c++/23171, c++/23172, c++/25417. + * typeck.c (build_unary_op): Create temporary variables for + compound literals whose addresses are taken. + * init.c (expand_aggr_init_1): Use COMPOUND_LITERAL_P. + * decl.c (reshape_init_vector): Likewise. + (reshape_init): Give it external linkage. + (check_initializer): Use COMPOUND_LITERAL_P. + (initialize_artificial_var): Allow the initializer to be a + CONSTRUCTOR. + * call.c (make_temporary_var_for_ref_to_temp): Use + create_temporary_var. + * cp-tree.h (COMPOUND_LITERAL_P): New macro. + (rehape_init): Declare. + * typeck2.c (digest_init): Use COMPOUND_LITERAL_P. + * semantics.c (finish_compound_literal): Use reshape_init. + +2005-12-23 Mark Mitchell + + PR c++/24671 + * pt.c (instantiate_template): Handle SFINAE. + +2005-12-23 Volker Reichelt + + * decl.c (grokdeclarator): Improve diagnostic for friend + declarations of class members. + +2005-12-22 Mark Mitchell + + PR c++/25369 + * tree.c (really_overloaded_fn): Tweak comment. + * pt.c (tsubst_call_declarator_parms): Remove. + (tsubst_copy): Call mark_used on the member referenced by an + OFFSET_REF. + * semantics.c (finish_qualified_id_expr): Simplify. + * decl2.c (mark_used): Accept BASELINKs. + + PR c++/25364 + * typeck.c (build_unary_op): Pass DECLs not names to + build_offset_refs. + * init.c (build_offset_ref): Do not do name lookup. Do not call + mark_used. + * call.c (build_call): Simplify and tidy. + * semantics.c (finish_qualified_id_expr): Call mark_used. + +2005-12-22 Volker Reichelt + + PR c++/23333 + * parser.c (cp_parser_pure_specifier): Check for PURE_ZERO to + identify a single '0'. + +2005-12-20 Mark Mitchell + + PR c++/21228 + * decl.c (use_eh_spec_block): New function. + (store_parm_decls): Use it. + (finish_function): Likewise. + +2005-12-19 Mark Mitchell + + PR c++/24278 + * init.c (expand_member_init): Print messages about baseclasses + using %T rather than %D. + + PR c++/24915 + * class.c (add_method): Do not treat templates as identical unless + their return types are the same. + +2005-12-12 Mark Mitchell + + PR c++/25300 + * tree.c (build_qualified_name): Return error_mark_node for + erroneous input. + +2005-12-10 Mark Mitchell + + PR c++/25337 + * pt.c (tsubst_copy_and_build): Permit dependent types for the + object in a class member access expression. + +2005-12-10 Terry Laurenzo + + PR java/9861 + * mangle.c (write_bare_function_type): Mangle return type for + methods of Java classes + +2005-12-08 Théodore Papadopoulo + + * call.c (build_conditional_expr): Print types in error messages. + +2005-12-07 Volker Reichelt + + * expr.c (cxx_expand_expr): Call gcc_unreachable instead of abort. + 2005-12-07 Volker Reichelt * cp-gimplify.c (gimplify_cp_loop): Use fold_build3. @@ -46,9 +385,9 @@ 2005-12-02 Gabriel Dos Reis * parser.c (cp_lexer_new_main): Usr GGC_RESIZEVEC instead of - ggc_realloc. + ggc_realloc. (cp_parser_template_argument_list): Use XRESIZEVEC instead of - xrealloc. + xrealloc. * class.c (pushclass): Likewise. 2005-12-02 Gabriel Dos Reis @@ -66,7 +405,7 @@ (cp_parser_template_argument_list): Use XNEWVEC, nto xmalloc. (cp_parser_sizeof_operand): Likewise. * repo.c (open_repo_file, open_repo_file): Likewise. - + 2005-12-01 Gabriel Dos Reis * parser.c (cp_parser_make_typename_type): Call make_typename_type @@ -86,7 +425,7 @@ 2005-11-30 Jason Merrill PR c++/21123 - * cp-gimplify.c (cp_genericize_r): Don't dereference invisible reference + * cp-gimplify.c (cp_genericize_r): Don't dereference invisible reference parms in a thunk. 2005-11-30 Ben Elliston @@ -151,7 +490,7 @@ PR c++/21667 * typeck.c (build_array_ref): Avoid code duplicate. Use common - C/C++ diagnostic function warn_array_subscript_with_type_char. + C/C++ diagnostic function warn_array_subscript_with_type_char. 2005-11-21 Gabriel Dos Reis @@ -177,7 +516,7 @@ PR c++/8355 * decl.c (grokfndecl): Set up DECL_TEMPLATE_INFO before calling set_decl_namespace. - * name-lookup.c (set_decl_namespace): + * name-lookup.c (set_decl_namespace): 2005-11-18 Mike Stump @@ -245,7 +584,7 @@ * parser.c (cp_token): Add ambiguous_p. (cp_lexer_get_preprocessor_token): Set it. (cp_parser_diagnose_invalid_type_name): Avoid duplicate messages - when a qualified name uses an invalid scope. + when a qualified name uses an invalid scope. (cp_parser_primary_expression): Print ambiguous candidates. (cp_parser_type_parameter): Adjust comment to reflect new parameter name for cp_parser_lookup_name. @@ -258,7 +597,7 @@ when a lookup is ambiguous. (cp_parser_lookup_name_simple): Adjust comment to reflect new parameter name for cp_parser_lookup_name. - + 2005-11-12 Jakub Jelinek PR c++/24780 @@ -280,7 +619,7 @@ 2005-11-08 Jason Merrill PR c++/21123 - * method.c (use_thunk): Use build_cplus_new instead of + * method.c (use_thunk): Use build_cplus_new instead of force_target_expr. 2005-11-06 Jason Merrill @@ -308,7 +647,7 @@ (build_base_field): Adjust call. (layout_class_type): Likewise. Maintain sizeof_biggest_empty_class. - + 2005-11-05 Kazu Hirata * decl2.c, init.c, typeck.c: Fix comment typos. @@ -369,7 +708,7 @@ PR c++/24569 * pt.c (instantiate_decl): Use cp_finish_decl, not - finish_static_data_member_decl. + finish_static_data_member_decl. 2005-10-28 Andrew Pinski @@ -396,13 +735,13 @@ * decl.c (start_decl): Check that the decl is an error_mark_node before getting the type. Remove the check for the decl's type being an - error_mark_node. + error_mark_node. 2005-10-21 Mark Mitchell PR c++/24260 * parser.c (cp_parser_init_declarator): Pass attributes to - grokfield. + grokfield. 2005-10-20 Mark Mitchell @@ -482,7 +821,7 @@ PR c++/22173 * typeck.c (check_template_keyword): Fix thinko. - + 2005-10-16 Andrew Pinski PR c++/23959 @@ -505,7 +844,7 @@ build_qualified_name. (cp_parser_id_expression): Default *template_p to template_keyword_p. Check for invalid uses of the template - keyword. + keyword. (cp_parser_postfix_expression): Eliminate special handling for qualified names. Adjust call to cp_parser_primary_expression. (cp_parser_postfix_dot_deref_expression): Adjust call to @@ -514,21 +853,21 @@ (cp_parser_template_argument): Adjust use of cp_parser_primary_expression. Remove call to finish_qualified_id_expr. - (cp_parser_lookup_name): Use build_qualified_name. + (cp_parser_lookup_name): Use build_qualified_name. * pt.c (tsubst): Use build_qualified_name. (tsubst_qualified_id): Likewise. Adjust call to finish_qualified_id_expr. (tsubst_copy): Use build_qualified_name. (tsubst_copy_and_build): Adjusts call to finish_id_expression and - finish_class_member_access_expr. + finish_class_member_access_expr. * semantics.c (finish_non_static_data_member): Use build_qualified_name. (finish_qualified_id_expr): Add template_p and template_arg_p - parameters. + parameters. (finish_id_expression): Remove qualifiying_class parameter. Add template_p, done, address_p, and template_arg_p. Use build_qualified_name. Adjust calls to - finish_class_member_acess_expr. + finish_class_member_acess_expr. * tree.c (build_qualified_name): New function. * typeck.c (check_template_keyword): New function. (finish_class_member_access_expr): Add template_p argument. Check @@ -576,7 +915,7 @@ * call.c (build_new_method_call): Correct pretty-printing of destructor names. * pt.c (tsubst_qualified_id): Recognize invalid uses of "~T" as an - identifier. + identifier. PR c++/23694 * decl.c (start_method): Return error_mark_node for errors. @@ -640,7 +979,7 @@ PR c++/24052 * error.c (dump_expr): Pass LABEL_DECL to dump_decl. Print - an ADDR_EXPR of a LABEL_DECL as &&. + an ADDR_EXPR of a LABEL_DECL as &&. 2005-10-12 Nathan Sidwell @@ -762,7 +1101,7 @@ treat forward declarations of classes as templates just because we're processing_template_decl. * pt.c (tsubst_decl): Clear DECL_TEMPLATE_INFO for friend - functions. + functions. 2005-09-26 Jason Merrill @@ -861,7 +1200,7 @@ PR c++/16171 * mangle.c (find_substitution): Do not use special substitutions for identifiers not in std::. - + 2005-09-13 Mark Mitchell PR c++/23839 @@ -872,7 +1211,7 @@ PR c++/23842 * pt.c (tsubst_default_argument): Do treat default argument - expressions as occurring in the context of the function called. + expressions as occurring in the context of the function called. 2005-09-12 Mark Mitchell @@ -1198,7 +1537,7 @@ PR c++/8271 * pt.c (unify) : Check this-pointer cv-qualifiers explicitly. - + 2005-08-12 Nathan Sidwell PR c++/21799 @@ -1286,7 +1625,7 @@ 2005-07-27 Devang Patel * name-lookup.c (pushtag): Do no set DECL_IGNORED_P bit. - + 2005-07-25 Ian Lance Taylor * ptree.c (cxx_print_identifier): Print a leading space if the @@ -1324,7 +1663,7 @@ * semantics.c (perform_koenig_lookup): For dependent calls, just return the set of functions we've found so far. Later, it will be augmented by those found through argument-dependent lookup. - * name-lookup.c (lookup_arg_dependent): Implement DR 164 by removing + * name-lookup.c (lookup_arg_dependent): Implement DR 164 by removing the optimization that skips namespaces where the functions were originally found. @@ -1431,7 +1770,7 @@ * cp-tree.h (comp_ptr_ttypes_const): Declare. * typeck.c (comp_ptr_ttypes_const): Give it external linkage. Return bool. - + 2005-07-12 Volker Reichelt Nathan Sidwell @@ -1459,9 +1798,9 @@ * cp-tree (init_shadowed_var_for_decl): Add prototype. 2005-07-08 Daniel Berlin - + * Make-lang.in: Add gt-cp-lang.h. - (cp-lang.o): Ditto. + (cp-lang.o): Ditto. * class.c (create_vtable_ptr): Stop setting DECL_ASSEMBLER_NAME on the field. * config-lang.in: Add cp-lang.c to gtfiles. @@ -1480,7 +1819,7 @@ * decl.c (duplicate_decls): Update for new/updated structures. (poplevel): Use SET_DECL_SHADOWED_FOR_VAR. * decl2.c (start_static_initialization_or_destruction): Deal with - priority. + priority. * pt.c (tsubst_decl): Check TS_DECL_WRTL before doing SET_DECL_RTL. * tree.c (handle_init_priority_attribute): Handle priority. @@ -1505,7 +1844,7 @@ * Makefile.in (class.o, decl2.o): Adjust dependencies. * class.c: Include tree-dump.h. * decl2.c: Include tree-dump.h. - + 2005-07-02 Gabriel Dos Reis * dump.c: Use dump_string_field. @@ -1536,8 +1875,8 @@ typeck2.c: Use '+' flag instead of %J, cp_error_at, cp_warning_at or cp_pedwarn_at. Mark up some diagnostic strings with N_. -2005-06-30 Daniel Berlin - +2005-06-30 Daniel Berlin + * decl.c (require_complete_types_for_parms): Call relayout_decl instead of layout_decl. @@ -3396,4 +3735,3 @@ PR middle-end/17544 * decl.c (finish_function): Fix comment. Annotate the compiler generated return with the current file name and line 0. -