diff options
author | kan <kan@FreeBSD.org> | 2003-07-11 03:40:53 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2003-07-11 03:40:53 +0000 |
commit | b2a8872fbe1ec1c49094559ac7b78e6ea4ab7180 (patch) | |
tree | f6b0610f4a17fd26aa234354f050080f789861a4 /contrib/gcc/cp/ChangeLog | |
parent | 52e69d78eee5612ac195e0701a5cebe40d1ab0e1 (diff) | |
download | FreeBSD-src-b2a8872fbe1ec1c49094559ac7b78e6ea4ab7180.zip FreeBSD-src-b2a8872fbe1ec1c49094559ac7b78e6ea4ab7180.tar.gz |
Gcc 3.3.1-pre as of 2003-07-11.
Diffstat (limited to 'contrib/gcc/cp/ChangeLog')
-rw-r--r-- | contrib/gcc/cp/ChangeLog | 3913 |
1 files changed, 3637 insertions, 276 deletions
diff --git a/contrib/gcc/cp/ChangeLog b/contrib/gcc/cp/ChangeLog index 2fd119a..58bd155 100644 --- a/contrib/gcc/cp/ChangeLog +++ b/contrib/gcc/cp/ChangeLog @@ -1,20 +1,1173 @@ -2003-02-05 Release Manager +2003-07-09 Mark Mitchell <mark@codesourcery.com> - * GCC 3.2.2 Released. + PR c++/10032 + * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are + still errors. -2003-02-03 Mark Mitchell <mark@codesourcery.com> + PR c++/10527 + * error.c (decl_to_string): Do not print default argument + expressions. + +2003-07-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + PR c++/10849 + * decl2.c (handle_class_head_apparent_template): New function. + * cp-tree.h (handle_class_head_apparent_template): Add declaration. + * parse.y (class_head_defn): Use it. + * search.c (type_access_control): Revert my 2003-05-25 change. + +2003-07-06 Mark Mitchell <mark@codesourcery.com> + + PR c++/11236 + * cvt.c (convert_to_void): Treat an overloaded function like + "((void) 0)" after issuing a diagnostic. + + PR c++/11345 + * search.c (lookup_base_r): Remove is_non_public and + within_current_scope parameters. Remove other dead code. + (lookup_base): Adjust call to lookup_base_r. + (adjust_result_of_qualified_name_lookup): Improve comment. + * semantics.c (finish_call_expr): Use maybe_dummy_object. + +2003-07-05 Mark Mitchell <mark@codesourcery.com> + + PR c++/11431 + * typeck.c (build_static_cast): Check for reference conversions + earlier. + +2003-07-01 Mark Mitchell <mark@codesourcery.com> + + PR c++/6949 + * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local + classes. + +2003-07-01 Mark Mitchell <mark@codesourcery.com> + + * call.c (resolve_scoped_fn_name): Return error_mark_node for + erroneous cases. + + PR c++/11137 + * decl2.c (generate_ctor_or_dtor_function): Tolerate a + non-existant ssdf_decls array. + (finish_file): Call generator_ctor_or_dtor_function when there are + static constructors or destructors and no other static + initializations. + + PR c++/11149 + * call.c (resolve_scoped_fn_name): Check that the qualifying scope + is a class type. + +2003-07-01 Mark Mitchell <mark@codesourcery.com> + + PR c++/9559 + * decl2.c (grokfield): Do not build NOP_EXPRs around the + error_mark_node. + +2003-06-30 Giovanni Bajo <giovannibajo@libero.it> + + * mangle.c (write_expression): Exit gracefully when trying to + mangle a CALL_EXPR. + +2003-06-30 Giovanni Bajo <giovannibajo@libero.it> + + PR c++/11106 + * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a + USING_DECL, instead of print_tree_identifier. + +2003-06-27 Mark Mitchell <mark@codesourcery.com> + + PR c++/10468 + * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly. + + PR c++/10796 + * decl.c (finish_enum): Implement DR377. + + * decl.c (cp_finish_decl): Don't make variables with reference + type readonly while they are being initialized. + +2003-06-26 Mark Mitchell <mark@codesourcery.com> + + PR c++/11332 + * typeck.c (build_static_cast): Avoid returning expressions with + reference type. + +2003-06-25 Mark Mitchell <mark@codesourcery.com> + + PR c++/10990 + * search.c (lookup_base_r): Rely on accessible_p, rather than + trying to emulate that logic here. + + PR c++/10931 + * call.c (convert_like): Pass issue_conversion_warnings. + (convert_like_with_context): Likewise. + (convert_like_real): Add issue_conversion_warnings parameter. + (perform_direct_initialization_if_possible): New function. + * cp-tree.h (perform_direct_initialization_if_possible): Declare it. + * typeck.c (check_for_casting_away_constness): New function. + (build_static_cast): Rewrite. - PR C++/7129 - * operators.def: Add <?= and >?=. +2003-06-23 Mark Mitchell <mark@codesourcery.com> + + PR c++/5754 + * parse.y (structsp): Improve error handling of invalid nested + template classes. + +2003-06-23 Jakub Jelinek <jakub@redhat.com> + + * mangle.c: Include ggc.h, gt-cp-mangle.h. + (mangle_conv_op_name_for_type): Use htab_create_ggc instead of + htab_create. + * config-lang.in (gtfiles): Add cp/mangle.c. + * Make-lang.in (gt-cp-mangle.h): Depend on s-gtype. + (cp/mangle.o): Depend on gt-cp-mangle.h. + +2003-06-23 Jakub Jelinek <jakub@redhat.com> + + * mangle.c (hash_type): val is the TREE_LIST itself, not a pointer + to it. + +2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net> + + PR c++/10784 + * call.c (joust): Warn about choosing conversion sequence only if + -Wconversion. -2003-01-28 Christian Cornelssen <ccorn@cs.tu-berlin.de> +2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net> + + PR c++/10864 + * call.c (op_error): Tidy. + * error.c (dump_expr): Properly format 'T()' when T is an + aggregate type. + +2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net> + + PR c++/10915 + * decl.c (grok_op_properties): Warn possible confusing conversion + only if -Wconversion. + +2003-06-20 Mark Mitchell <mark@codesourcery.com> + + PR c++/10845 + * pt.c (try_class_unification): Correct handling of member class + templates. + +2003-06-19 Mark Mitchell <mark@codesourcery.com> + + PR c++/10939 + * Make-lang.in (decl.o): Depend on input.h. + * decl.c (input.h): Include it. + (cp_finish_decl): Revert previous change: + 2003-06-19 Mark Mitchell <mark@codesourcery.com> + * decl.c (cp_finish_decl): Remove support for RESULT_DECLs. + Don't check building_stmt_tree. + * pt.c (tsubst_decl): Do not try to substitute into non-dependent + functions. + + PR c++/9649 + * cp-tree.h (pushdecl_class_level): Change prototype. + (push_class_level_binding): Likewise. + * decl.c (add_binding): Reject duplicate static data members. + (pushdecl_class_level): Return a value indicating whether or not + the binding was valid. + (push_class_level_binding): Likewise. + * semantics.c (finish_member_declaration): Don't keep invalid + declarations. + +2003-06-19 Mark Mitchell <mark@codesourcery.com> + + PR c++/11041 + * call.c (initialize_reference): Do not use cp_finish_decl to emit + temporary variables. + * cp-tree.h (static_aggregates): Declare. + (pushdecl_top_level_and_finish): Likewise. + * decl.c (pushdecl_top_level_1): New function. + (pushdecl_top_level): Use it. + (pushdecl_top_level_and_finish): New function. + (initialize_local_var): Remove redundant code. + (cp_finish_decl): Remove support for RESULT_DECLs. Don't check + building_stmt_tree. + * decl.h (static_aggregates): Remove. + * decl2.c (get_guard): Use pushdecl_top_level_and_finish. + * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish. + (tinfo_base_init): Likewise. + +2003-06-19 Matt Austern <austern@apple.com> + + PR c++/11228 + * init.c (build_zero_init): Assert that number of array elements + is an integer constant. + (build_default_init) Don't use build_zero_init for arrays with + variable number of elements. + +2003-06-17 Mark Mitchell <mark@codesourcery.com> + + * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format + string again. + +2003-06-17 Mark Mitchell <mark@codesourcery.com> + + * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format + string. + +2003-06-17 Jason Merrill <jason@redhat.com> + + PR c++/10929 + * decl.c (grokfndecl): Don't mark a function inline for + -finline-functions if it isn't defined. + +2003-06-17 Mark Mitchell <mark@codesourcery.com> + + PR c++/10712 + * class.c (handle_using_decl): Robustify. + + PR c++/11105 + * cp-tree.h (DECL_CONV_FN_TYPE): New method. + * decl.c (lookup_name_real): Backport conversion operator code + from mainline. + * mangle.c (struct globals): Remove internal_mangling_p. + (write_unqualified_name): Use DECL_CONV_FN_TYPE. + (write_template_parm): Don't write out the level number. + (conv_type_names): New variable. + (hash_type): New function. + (compare_type): Likewise. + (mangle_conv_op_name_for_type): Don't try to mangle conversion + operator names. + * search.c (lookup_conversion_operator): New function. + (lookup_fnfields_1): Use it. + +2003-06-12 Mark Mitchell <mark@codesourcery.com> + + PR c++/10635 + * typeck.c (build_c_cast): Check that the destination type is + complete. + +2003-06-10 Jason Merrill <jason@redhat.com> + + PR c++/10968 + * pt.c (mark_decl_instantiated): Clear DECL_COMDAT. + +2003-06-09 Zack Weinberg <zack@codesourcery.com> + + PR 8861 + * mangle.c (write_real_cst): New function. Implement + ABI-compliant mangling of floating-point literals when + -fabi-version>=2; provide backward compatibility with 3.3 when + -fabi-version=1 (with warning). Clarify commentary. + (write_template_arg_literal): Use write_real_cst. + +2003-06-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + PR c++/11039 + * decl2.c (handle_class_head): Remove implicitness in typename + appeared as elaborated type specifier in declaration. + +2003-06-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + PR c++/10940 + * pt.c (check_explicit_specialization): Check for 'static' + earlier. + +2003-05-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + PR c++/10956 + * pt.c (instantiate_decl): Don't use full template arguments if + we are dealing with specializations. + +2003-05-29 Gabriel Dos Reis <gdr@integrable-solutions.net> + + * decl.c (ENABLE_CHECKING_SCOPES): New macro. + (binding_depth): Unconditionally define. + (is_class_level): Likewise. + (indent): Likewise. Take an indenting parameter. + (push_binding_level): Remove conditional definittion. + (pop_binding_level): Likewise. + (suspend_binding_level): Likewise. + (resume_binding_level): Likewise. + (pushlevel): Likewise. + (pushlevel_class): Likewise. + (poplevel_class): Likewise. + (pop_everything): Likewise. + +2003-05-27 Gabriel Dos Reis <gdr@integrable-solutions.net> + + * decl.c (global_scope_p): New macro. + (pop_binding_level): Use it. + (suspend_binding_level): Likewise. + (global_bindings_p): Likewise. + (print_other_binding_stack): Likewise. + (print_binding_stack): Likewise. + (maybe_push_to_top_level): Likewise. + (pushdecl_namespace_level): Likewise. + (start_decl): Likewise. + (cp_finish_decl): Likewise. + (start_function): Likewise. + (cxx_init_decl_processing): Don't refer to global_binding_level. + (global_binding_level): Remove. + +2003-05-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + PR c++/10849 + * search.c (type_access_control): Don't check access when + processing_specialization. + +2003-05-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + PR c++/10682 + * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to + check for implicitly created typedef to an enum. + +2003-05-20 Gabriel Dos Reis <gdr@integrable-solutions.net> + + * decl.c (free_binding_entry): Fix thinko. + +2003-05-19 Gabriel Dos Reis <gdr@integrable-solutions.net> + + * cp-tree.h (struct binding_entry_s): New datatype. + (binding_table): Declare. + (binding_entry): Likewise. + (bt_foreach_proc): Likewise. + (binding_table_foreach): Likewise. + (binding_table_find): Likewise. + (cxx_remember_type_decls): Likewise. + (CLASSTYPE_TAGS): Remove. + (CLASSTYPE_NESTED_UDTS): New macro. + (struct lang_type_class): Remove tags field. Add nested_types. + * decl.c (ENTRY_INDEX): New macro. + (free_binding_entry): New free list. + (binding_entry_make): New function. + (binding_entry_free): Likewise. + (struct binding_table_s): New datatype. + (SCOPE_DEFAULT_HT_SIZE): New macro. + (CLASS_SCOPE_HT_SIZE): Likewise. + (NAMESPACE_ORDINARY_HT_SIZE): Likewise. + (NAMESPACE_STD_HT_SIZE): Likewise. + (GLOBAL_SCOPE_HT_SIZE): Likewise. + (binding_table_construct): New function. + (binding_table_free): Likewise. + (binding_table_new): Likewise. + (binding_table_expand): Likewise. + (binding_table_insert): Likewise. + (binding_table_find): Likewise. + (binding_table_find_anon_type): Likewise. + (binding_table_reverse_maybe_remap): Likewise. + (binding_table_remove_anonymous_types): Likewise. + (binding_table_foreach): Likewise. + (struct cp_binding_level): Remove tags field. Add type_decls. + (pop_binding_level): Free binding_entries if possible. + (kept_level_p): Tidy. + (poplevel): Remove unused variable tags. + (bt_print_entry): New function. + (print_binding_level): Use it. + (push_namespace): Construct binding table. + (maybe_process_template_type_declaration): Tidy. + (pushtag): Likewise. + (clear_anon_tags): Likewise. + (cxx_remember_type_decls): New function. + (lookup_tag): Tidy. + (lookup_tag_reverse): Likewise. + (cxx_init_decl_processing): Construct binding_table for the global + scope. + (store_parm_decls): Remove pointless code. + (gettags): Remove. + (storetags): Likewise. + * class.c (unreverse_member_declarations): Don't touch + CLASSTYPE_TAGS. + (pushclass): Remember CLASSTYPE_NESTED_UTDS. + * pt.c (instantiate_class_template): Remove reference to + CLASSTYPE_TAGS. Remeber CLASSTYPE_NESTED_UTDS. + (bt_instantiate_type_proc): New function. + (do_type_instantiation): Use it. + * search.c (lookup_field_r): Use binding_table_find. + * semantics.c (begin_class_definition): Remove reference to + CLASSTYPE_TAGS. Nullify CLASSTYPE_NESTED_UTDS. + +2003-05-15 Jason Merrill <jason@redhat.com> + + PR c++/5388 + * call.c (conditional_conversion): Don't consider implicit + conversions if T2 is a base of T1. + * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean. + (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise. + + PR c++/10661 + * pt.c (instantiate_class_template): Also instantiate our + enclosing class. + +2003-05-13 Release Manager + + * GCC 3.3 Released. + +2003-05-02 Richard Henderson <rth@redhat.com> + + PR c++/10570 + * cfns.gperf: Comment out POSIX thread cancellation points, + plus abort and raise. + * cfns.h: Regenerate. + +2003-05-01 Mark Mitchell <mark@codesourcery.com> + + * decl2.c (comdat_linkage): Don't externalize explicit + instantiations. + +2003-04-29 Mark Mitchell <mark@codesourcery.com> + + PR c++/10551 + * pt.c (mark_decl_instantiated): Defer all explicit instantiations + that have not yet been written out. + + PR c++/10549 + * class.c (layout_class_type): Mark overlong bitfields as having + the maximum size permitted by their type, after layout. + +2003-04-29 Mark Mitchell <mark@codesourcery.com> + + PR c++/10527 + * error.c (dump_expr): Correctly handling of NEW_EXPR.4 + +2003-04-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + * lang-options.h: Fix typo. + +2003-04-29 Mark Mitchell <mark@codesourcery.com> + + PR c++/10515 + * cp-tree.h (lookup_field_1): Declare it. + * search.c (lookup_field_1): Make it public. + * decl.c (reshape_init): Handle designated initializers. + +2003-04-29 Mark Mitchell <mark@codesourcery.com> + + * decl.c (maybe_commonize_var): Further tweak support for systems + without weak symbols. + +2003-04-27 Mark Mitchell <mark@codesourcery.com> + + * decl.c (maybe_commonize_var): Fix thinko in last patch. + + PR c++/10506 + * method.c (use_thunk): Decrement immediate_size_expand. + + PR c++/10503 + * cp-tree.h (DECL_VAR_MARKED_P): New macro. + (DECL_MAYBE_TEMPLATE): Remove. + * class.c (fixed_type_or_null): Avoid infinite recursion. + +2003-04-27 Mark Mitchell <mark@codesourcery.com> + + * decl.c (maybe_commonize_var): Make the code match the comments. + * pt.c (instantiate_decl): Move call to import_export_decl. + +2003-04-25 Mark Mitchell <mark@codesourcery.com> + + * decl2.c (finish_file): Don't call import_export_decl for + functions that are not defined. + (handle_class_head): Robustify. + * pt.c (instantiate_decl): Do not call cp_finish_decl for + variables that are not defined. + +2003-04-23 Mark Mitchell <mark@codesourcery.com> + + PR c++/10471 + * call.c (build_cxx_call): Robustify. + +2003-04-23 Mark Mitchell <mark@codesourcery.com> + + PR c++/10451 + * decl.c (grokdeclarator): Correct logic for "mutable" errors. + +2003-04-22 Mark Mitchell <mark@codesourcery.com> + + PR c++/10446 + * search.c (lookup_fnfields_1): Handle empty slots in the method + vector. + +2003-04-22 Mark Mitchell <mark@codesourcery.com> + + PR c++/10428 + * decl.c (check_elaborated_type_specifier): New function, split + out from ... + (xref_tag): ... here. Use the new function in more places. + +2003-04-21 Mark Mitchell <mark@codesourcery.com> + + * call.c (build_over_call): Use build_cxx_call. + (build_cxx_call): New method, split out of build_over_call. + * cp-tree.h (language_function): Add can_throw. + (build_cxx_call): Declare it. + * decl.c (finish_function): If a function does not contain any + calls to functions that can throw an exception, indicate that + fact. + * decl2.c (mark_used): Do not defer the instantiation of + functions, if the current function does not throw. + * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones. + * pt.c (instantiate_decl): Make sure import_export_decl is called + before emitting things. + * rtti.c (throw_bad_cast): Use build_cxx_call. + (build_dynamic_cast_1): Likewise. + * typeck.c (build_function_call): Likewise. + +2003-04-21 Nathan Sidwell <nathan@codesourcery.com> + + PR c++/9881 + * typeck.c (build_unary_op): Fold all COMPONENT_REF addr + expressions. Reverts my 2002-08-08 patch. + +2003-04-20 Nathan Sidwell <nathan@codesourcery.com> + + PR c++/10405 + * search.c (lookup_field_1): Final scan goes backwards for + types, forwards for non-types. + +2003-04-15 Jason Merrill <jason@redhat.com> + + * decl2.c (mark_used): Don't instantiate anything if + skip_evaluation. + +2003-04-15 Mark Mitchell <mark@codesourcery.com> + + * init.c (build_new_1): Use nullexp instead of null_node to avoid + unwanted macro expansion. + +2003-04-14 Ziemowit Laski <zlaski@apple.com> + + * tree.c (build_cplus_array_type_1): Do not call + uses_template_parms() on a NULL index_type. + +2003-04-14 Andreas Schwab <schwab@suse.de> + + * init.c (build_new_1): Test use_cookie instead of cookie_size to + avoid code-gen bug on ia64. + +2003-04-13 Mark Mitchell <mark@codesourcery.com> + + PR c++/10300 + * init.c (build_new_1): Correct logic for checking whether the + return value from the allocation function was zero. + +2003-03-31 Mark Mitchell <mark@codesourcery.com> + + PR c++/10278 + * spew.c (yyerror): Avoid crashing at all costs. + +2003-03-31 Jason Merrill <jason@redhat.com> + + PR java/10145 + * class.c (check_field_decl): Don't set DECL_ALIGN. + +2003-03-30 Mark Mitchell <mark@codesourcery.com> + + PR c++/7647 + * search.c (lookup_field_1): Add want_type parameter. + (lookup_field_r): Adjust call to lookup_field_1. + +2003-03-28 Jason Merrill <jason@redhat.com> + + PR c++/10245 + * cvt.c (force_rvalue): New fn. + * call.c (build_conditional_expr): Use it. + * cp-tree.h: Declare it. + +2003-03-28 Nathan Sidwell <nathan@codesourcery.com> + + PR c++/10047 + * decl2.c (finish_file): Don't warn about explicitly instantiated + inline decls. + +2003-03-27 Nathan Sidwell <nathan@codesourcery.com> + + PR c++/10158 + * spew.c (snarf_method):Set DECL_INITIALIZED_IN_CLASS for + members. + * pt.c (instantiate_decl): Only reduce the template args for + friends that are not defined in class. + +2003-03-24 Nathan Sidwell <nathan@codesourcery.com> + + PR c++/9898, PR c++/383, DR 322 + * pt.c (maybe_adjust_types_for_deduction) [DEDUCE_CONV]: Look + through reference types on both PARM and ARG. + + PR c++/10199 + * call.c (build_method_call): Deal with LOOKUP_EXPR. + * semantics.c (finish_object_call_expr): Use build_method_call + when in a template decl. + +2003-03-23 Mark Mitchell <mark@codesourcery.com> + + PR c++/7086 + * semantics.c (genrtl_named_return_value): Adjust calls to + put_var_into_stack. + * typeck.c (cxx_mark_addressable): Likewise. + +2003-03-20 Mark Mitchell <mark@codesourcery.com> + + PR c++/6412 + * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope + friends. + * cp/pt.c (instantiate_class_template): Fix formatting. + +2003-03-19 Jason Merrill <jason@redhat.com> + + PR c++/8316, c++/9315, c++/10136 + * call.c (joust): Improve wording. + +2003-03-18 Roger Sayle <roger@eyesopen.com> + + PR c++/10031 + * decl.c (duplicate_decls): Use the new type when prototyping + anticipated decls, even when the types match. This defines the + exception list for the built-in function. + +2003-03-17 Jason Merrill <jason@redhat.com> + + PR c++/10091 + * typeck.c (build_class_member_access_expr): Compare + TYPE_MAIN_VARIANTs. + + * decl.c (finish_function): Don't skip a block. + + PR c++/9993 + * decl.c (finish_function): Only allow the NRVO to use variables + declared at function scope. + +2003-03-17 Nathan Sidwell <nathan@codesourcery.com> + + PR c++/9629 + * cp-tree.h (struct language_function): Add in_base_initializer. + (in_base_initializer): define it. + (expand_member_init): Remove INIT param. + * init.c (expand_member_init): Remove INIT param, return the member. + (emit_mem_initializers): Set in_base_initializer. + * class.c (build_base_path): Check in_base_initializer. + * parse.y (begin_member_init): New reduction. + (member_init): Use it. + * pt.c (tsubst_initializer_list): Set in_base_initializer. + +2003-03-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + PR c++/6440 + * pt.c (maybe_process_partial_specialization): Handle + member class template when enclosing class template is + explicit specialized. + (most_general_template): Stop looking when DECL is already + specialized. + +2003-03-13 Jason Merrill <jason@redhat.com> + + PR c++/9420 + * search.c (lookup_conversions): Call complete_type here. + * call.c (implicit_conversion): Not here. + +2003-03-13 Jason Merrill <jason@redhat.com> + + PR c++/9336 + * decl2.c (lookup_arg_dependent): Handle error_mark_node. + +2003-03-13 Mark Mitchell <mark@codesourcery.com> + + * decl2.c (do_nonmember_using_decl): Correct handling of + simultaneous type/non-type bindings. + +2003-03-13 Mark Mitchell <mark@codesourcery.com> + + * call.c (initialize_reference): Remove bogus assertion. + * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09. + +2003-03-12 Andrew Lewycky <andrew@mxc.ca> + + PR c++/7050 + * expr.c (cxx_expand_expr): Return const0_rtx for throw + expressions. + +2003-03-11 Mark Mitchell <mark@codesourcery.com> + + PR c++/9474 + * decl2.c (do_nonmember_using_decl): Do not call duplicate decls + to merge old and new declarations. + +2003-03-11 Mark Mitchell <mark@codesourcery.com> + + PR c++/9924 + * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins. + +2003-03-11 Jason Merrill <jason@redhat.com> + + PR c++/9820 + * search.c (lookup_member): Fix handling of functions in a class + being defined. + +2003-03-11 Mark Mitchell <mark@codesourcery.com> + + PR c++/8700 + * call.c (print_z_candidates): Avoid printing duplicates. + +2003-03-11 Jason Merrill <jason@redhat.com> + + PR c++/8660 + * decl2.c (check_classfn): A member template only matches a + member template. + +2003-03-10 Devang Patel <dpatel@apple.com> + + PR c++/9394 + * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWITCH_TAKES_ARG. + +2003-03-10 Jason Merrill <jason@redhat.com> + + PR c++/9798 + * decl.c (push_using_directive): Push before recursing. + + PR c++/9868 + * call.c (resolve_scoped_fn_name): Handle the case of a function + pointer member. + * init.c (build_offset_ref): Handle getting a FIELD_DECL for NAME. + + * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this' + argument in the pointer-to-member case. + +2003-03-09 Mark Mitchell <mark@codesourcery.com> + + PR c++/9373 + * cp-lang.c (cxx_get_alias_set): Use alias set zero for + pointers to member functions. + + PR c++/8534 + * decl.c (build_ptrmemfunc_type): Do not allow default arugments + in pointer-to-member-function types. + +2003-03-09 Mark Mitchell <mark@codesourcery.com> + + PR c++/9912 + * cp-tree.h (is_ancestor): New function. + * decl2.c (is_namespace_ancestor): Rename to ... + (is_ancestor): ... this. + (namespace_ancestor): Use it. + (set_decl_namespace): Likewise. + (handle_class_head): Check for invalid class definitions. + +2003-03-10 Gabriel Dos Reis <gdr@integrable-solutions.net> + + Compile-time improvement: 2/n. + * cp-tree.h (struct cxx_binding): New datatype; + (struct lang_identifier): Use it. + (LOCAL_BINDING_P): Adjust definition. + (INHERITED_VALUE_BINDING_P): Likewise. + (BINDING_SCOPE): Likewise. + (BINDING_HAS_LEVEL_P): Likewise. + (BINDING_VALUE): Likewise. + (BINDING_TYPE): Likewise. + (IDENTIFIER_VALUE): Likewise. + (struct tree_binding): Remove. + (TS_CP_BINDING): Likewise. + ((union lang_tree_node): Remove field "binding". + (cxx_binding_clear): New macro. + (binding_for_name): Adjust return type. + (qualified_lookup_using_namespace): Adjust prototype. + (lookup_using_namespace): Adjust prototype. + (cxx_scope_find_binding_for_name): Declare. + * cp-tree.def: Remove CPLUS_BINDING definition. + * parse.y (parse_scoped_id): Don't type-abuse of 'id'. Allocate + temporary cxx_binding on stack. Simplify. + * decl.c (push_binding): Adjust local variable type. + (add_binding): Likewise. + (push_class_binding): Likewise. + (pop_binding): Likewise. + (poplevel): Likewise. + (poplevel_class): Likewise. + (free_bindings): Adjust type. + (find_binding): Adjust return type, add a third parameter. Remove + non-useful assertion now that we use static typing. + (cxx_scope_find_binding_for_name): New function. + (binding_for_name): Use it. Adjust local variable type. Simplify. + (namespace_binding): Simplify. + (set_namespace_binding): Likewise. + (set_identifier_type_value_with_scope): Adjust local variable type. + (lookup_tag): Don't type-abuse of local variable 'old'. + (lookup_namespace_name): Likewise. Allocate binding on stack. + (select_decl): Adjust prototype. + (unqualified_namespace_lookup): Allocate binding on stack. + Don't type-abuse of local variable 'val'. + (lookup_name_real): Likewise. + (maybe_inject_for_scope_var): Adjust local variable type. + (cp_tree_node_structure): Remove CPLUS_BINDING case label. + (namespace_binding): Adjust logic, simplify. + (BINDING_LEVEL): Adjust definition. + (push_class_level_binding): Adjust local variable type. + (struct cxx_saved_binding): Adjust field 'binding' type. + * decl2.c (ambiguous_decl): Adjust prototype. + (lookup_using_namespace): Adjust local variable type. + (qualified_lookup_using_namespace): Catch type error and correct + ensueing logic error. + (do_nonmember_using_decl): Adjust local variable type. Allocate + temporary cxx_binding on stack. + (do_toplevel_using_decl): Adjust local variable type. + * ptree.c (cxx_print_cxx_binding): New function. + (cxx_print_identifier): Use it. + (cxx_print_xnode): Delete CPLUS_BINDING case label. + +2003-03-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + PR c++/9970 + * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual + functions. + +2003-03-07 Matt Austern <austern@apple.com> + + * cp-tree.h (struct lang_type_class): add field for key method + (cp_global_trees): rename dynamic_classes to keyed_classes + (key_method): add definition + * class.c (finish_struct_1): compute class's key method, and add + the class to keyed_classes list if there is no key method. + * decl.c (finish_function): add class to keyed_classes list if we + see a definition of the class's key method. + * pt.c (instantiate_class_template): add template specialization + of a dynamic class to keyed_classes list. + * decl2.c (key_method): remove + (finish_file): iterate only through keyed_classes list when + deciding whether to emit vtables, remove class from its list after + we do the emission. + +2003-03-08 Mark Mitchell <mark@codesourcery.com> + + PR c++/9809 + * call.c (add_function_candidate): Skip builtin fuctions that have + not yet been declared. + +2003-03-07 Mark Mitchell <mark@codesourcery.com> + + * call.c (reference_binding): Remove REF_IS_VAR parameter. + (implicit_conversion): Adjust call to reference_binding. + (make_temporary_var_for_ref_to_type): Add TYPE parameter. + (initialize_reference): Adjust handling for references bound to + rvalues. + * cp-tree.h (make_temporary_var_for_ref_to_temp): Change + prototype. + (real_non_cast_lvalue_p): New method. + * cvt.c (build_up_reference): Adjust use of + make_temporary_var_for_ref_to_temp. + * tree.c (real_non_cast_lvalue_p): New method. + +2003-03-06 Mark Mitchell <mark@codesourcery.com> + + * call.c (merge_conversion_sequences): New function. + (build_conv): Set ICS_USER_FLAG for USER_CONVs. + (convert_class_to_reference): Correct handling of second + standard conversion sequence in a user-defined conversion + sequence. + (build_user_type_conversion_1): Use merge_conversion_sequences. + * cp-tree.def: Add comments for CONV nodes. + +2003-03-06 Mark Mitchell <mark@codesourcery.com> + + PR c++/9965 + * call.c (reference_binding): Add ref_is_var parameter. + (implicit_conversion): Adjust call to reference_binding. + (initialize_reference): Likewise. + + PR c++/9400 + * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL + PARM_DECLs. + +2003-03-06 Mark Mitchell <mark@codesourcery.com> + + PR c++/9791 + * class.c (get_basefndecls): Use lookup_fnfields_1. + +2003-03-02 Matt Austern <austern@apple.com> + + * decl.c (cp_binding_level): Add static_decls varray member. + (add_decl_to_level): Add static/inline namespace scope + declarations to static_decls array. + (wrapup_global_for_namespace): Pass static_decls only, instead of + all decls, to wrapup_global_declarations/check_global_declarations. + (push_namespace): Initialize static_decls for ordinary namespaces. + (cxx_init_decl_processing): Initialize static_decls for global + namespace. + +2003-03-05 Mark Mitchell <mark@codesourcery.com> + + * class.c (end_of_class): Correct thinko. + +2003-03-04 Gabriel Dos Reis <gdr@integrable-solutions.net> + + * cp-tree.h (cxx_saved_binding): Declare. + (struct saved_scope): Adjust type of field 'old_binding'. + * decl.c (cxx_saved_binding_make): New macro. + (struct cxx_saved_binding): Define. + (store_bindings): Adjust prototype. Use cxx_saved_binding to save + C++ bindings. + (maybe_push_to_top_level): Adjust local variable type. + (pop_from_top_level): Likewise. + +2003-03-03 Jason Merrill <jason@redhat.com> + + * decl.c (finish_enum): Do set the type in a template. Simplify. + * pt.c (tsubst_enum, tsubst_copy): Revert last patch. + +2003-03-03 Mark Mitchell <mark@codesourcery.com> + + PR c++/9878 + * call.c (convert_class_to_reference): Correct conversion + sequences. + (reference_binding): Add ref_bound_directly_to_rvalue_p parameter. + (implicit_conversion): Adjust call to reference_binding. + (add_candidate): Change type of candidates parameter. + (add_function_candidate): Likewise. + (add_conv_candidate): Likewise. + (build_builtin_candidate): Likewise. + (add_builtin_candidate): Likewise. + (add_builtin_candidates): Likewise. + (add_template_candidate_real): Likewise. + (add_template_candidate): Likewise. + (add_template_conv_candidate): Likewise. + (build_user_type_conversion_1): Adjust accordingly. + (build_object_call): Likewise. + (build_conditional_expr): Likewise. + (add_candidates): Likewise. + (build_new_op): Likewise. + (convert_like_real): Use USER_CONV_CAND. Use build_nop. + (build_new_method_call): Adjust calls to add_function_candidate. + (make_temporary_var_for_ref_to_temp): New function. + (initialize_reference): Add decl parameter. + * class.c (build_rtti_vtbl_entries): Use build_address and + build_nop. + * cp-tree.h (initialize_reference): Change prototype. + (make_temporary_var_for_ref_to_temp): New function. + (build_type_conversion): Change prototype. + (build_address): New function. + (build_nop): Likewise. + * cvt.c (cp_convert_to_pointer): Adjust call to + build_type_conversion. Avoid indicating redundant NOP_EXPRs. + Use build_nop. + (convert_to_pointer_force): Use build_nop. + (build_up_reference): Use make_temporary_var_for_ref_to_temp. + (convert_to_reference): Adjust call to build_type_conversion. + (ocp_convert): Likewise. + (build_type_conversion): Remove for_sure parameter. + * decl.c (grok_reference_init): Use initialize_reference. + * typeck.c (build_address): New function. + (build_nop): Likewise. + (build_unary_op): Use them. + (build_ptrmemfunc): Tidy slightly. + (convert_for_initialization): Adjust call to + initialize_reference. + * typeck2.c (store_init_value): Remove #if 0'd code. + +2003-03-02 Ashif Harji <asharji@uwaterloo.ca> + + * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to + invoke an external cpp during compilation. + +2003-02-28 Mark Mitchell <mark@codesourcery.com> + + PR c++/9892 + * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when + instantiating it. + +2003-02-28 Mark Mitchell <mark@codesourcery.com> + + PR c++/9879 + * cp-tree.h (build_zero_init): Add parameter. + * decl.c (cp_finish_decl): Adjust call. + * init.c (build_zero_init): Add nelts parameter. Adjust recursive + calls. + (build_default_init): Add nelts parameter. Adjust calls to + build_zero_init. + (build_new_1): Adjust call to build_default_init. + * typeck2.c (process_init_constructor): Adjust call to build_zero_init. + +2003-02-27 Devang Patel <dpatel@apple.com> + + * decl.c (finish_enum): Merge two 'for' loops. Copy value node if required. + Postpone enum setting for template decls. + (build_enumerator): Delay copying value node until finish_enum (). Remove + #if 0'ed code. + * pt.c (tsubst_enum): Set TREE_TYPE and copy value node. + (tsubst_copy): Add check for enum type. + + +2003-02-25 Mark Mitchell <mark@codesourcery.com> + + PR c++/9829 + * decl.c (grokdeclarator): Handle SCOPE_REFs whose second argument + is a NAMESPACE_DECL. + +2003-02-24 Gabriel Dos Reis <gdr@integrable-solutions.net> + + * decl.c (add_binding): Time TV_NAME_LOOKUP. + (push_class_binding): Likewise. + (set_namespace_binding): Likewise. + +2003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + PR c++/9602 + * typeck2.c (abstract_virtuals_error): Don't check when we + are processing a template. + +2003-02-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + PR c++/7982 + * decl.c (warn_about_implicit_typename_lookup): Handle TYPEOF_TYPE. + +2003-02-21 Mark Mitchell <mark@codesourcery.com> + + PR c++/9749 + * decl.c (grokdeclarator): Do not allow parameters with variably + modified types. + + PR c++/9727 + * decl2.c (push_scope): Don't pushclass for non-class types. + (pop_scope): Don't popclass either. + + PR c++/8906 + * decl.c (lookup_name_real): Use IMPLICIT_TYPENAME_P. + * decl2.c (handle_class_head): Check it. + + PR c++/8724 + * call.c (build_method_call): Make sure that the type destroyed in + an explicit destructor call is complete. + +2003-02-20 Mark Mitchell <mark@codesourcery.com> + + PR c++/9729 + * mangle.c (mangle_conv_op_name_for_type): Issue an error message + when the G++ 3.2 ABI prevents correct compilation. + +2003-02-18 Mark Mitchell <mark@codesourcery.com> + + PR c++/9704 + * class.c (layout_class_type): In the 3.2 ABI, take into account + trailing bit fields when computing CLASSTYPE_SIZE_UNIT. + +2003-02-18 Matt Austern <austern@apple.com> + + * cp/cp-lang.c: Change lang hooks so that final_write_globals does + nothing for C++. + * cp/decl.c (wrapup_globals_for_namespace): Remove special + handling of global namespace. + +2003-02-18 Jason Merrill <jason@redhat.com> + + PR c++/9623 + * decl.c (reshape_init): Don't mess with initializer labels. + +2003-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + PR c++/9459 + * error.c (dump_type_prefix): Handle TYPEOF_TYPE. + (dump_type_suffix): Likewise. + +2003-02-17 Michael Elizabeth Chastain <mec@shout.net> + + PR debug/9717 + * class.c (build_base_field): Mark fields for base classes with + DECL_IGNORED_P. + +2003-02-13 Andrew Pinski <pinskia@physics.uc.edu> + + * decl.c: (define_label): Fix warning for return 0 instead of NULL. + +2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net> + + * Make-lang.in (cp/decl2.o): Add dependency on timevar.h + * decl2.c: Include "timevar.h". + (namespace_ancestor): Time name lookup. + (add_using_namespace): Likewise. + (lookup_using_namespace): Likewise. + (qualified_lookup_using_namespace): Likewise. + (decl_namespace): Likewise. + (lookup_arg_dependent): Likewise. + * lex.c (do_identifier): Likewise. + (do_scoped_id): Likewise. + * pt.c (lookup_template_class): Likewise. + +2003-02-12 Gabriel Dos Reis <gdr@integrable-solutions.net> + + * decl.c (define_label): Don't forget to pop TV_NAME_LOOKUP. + +2003-02-11 Gabriel Dos Reis <gdr@integrable-solutions.net> + + * decl.c: Include "timevar.h". + (poplevel): Time name lookup. + (find_binding): Likewise. + (push_namespace): Likewise. + (pop_nested_namespace): Likewise. + (store_bindings): Likewise. + (maybe_push_to_top_level): Likewise. + (pop_from_top_level): Likewise. + (push_local_name): Likewise. + (pushtag): Likewise. + (pushdecl): Likewise. + (pushdecl_with_scope): Likewise. + (pushdecl_namespace_level): Likewise. + (pushdecl_top_level): Likewise. + (pushdecl_class_level): Likewise. + (push_class_level_binding): Likewise. + (push_using_decl): Likewise. + (push_using_directive): Likewise. + (push_overloaded_decl): Likewise. + (lookup_label): Likewise. + (define_label): Likewise. + (lookup_tag): Likewise. + (lookup_tag_reverse): Likewise. + (lookup_namespace_name): Likewise. + (select_decl): Likewise. + (unqualified_namespace_lookup): Likewise. + (lookup_name_real): Likewise. + (lookup_name_current_level): Likewise. + (lookup_type_current_level): Likewise. + (maybe_inject_for_scope_var): Likewise. + (xref_tag): Likewise. + + * Make-lang.in (cp/decl.o): Add dependency on timevar.h + +2003-02-03 Mark Mitchell <mark@codesourcery.com> + + PR c++/7129 + * operators.def: Add <?= and >?=. + +2003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + PR c++/8849 + * error.c (dump_expr): Handle BASELINK. + * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL. + +2003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + PR c++/9453 + * friend.c (is_friend): Always accept when SUPPLICANT is still + a TEMPLATE_DECL. + * pt.c (push_access_scope_real): Call push_to_top_level for + function in namespace scope. + (push_access_scope): Remove ARGS argument, all caller adjusted. + (pop_access_scope): Call pop_from_top_level for function in + namespace scope. + (regenerate_decl_from_template): Use push_access_scope_real. + +2003-01-29 Nathan Sidwell <nathan@codesourcery.com> + + PR c++/9437 + * pt.c (unify): Don't unify '*T' with 'U C::*'. + +2003-01-27 Jeffrey D. Oldham <oldham@codesourcery.com> + + PR c++/47 + * cp-tree.h (lookup_nested_field): Add declaration. + * decl.c (lookup_name_real): Call lookup_nested_field. + * search.c (lookup_nested_field): Add function. + +2003-01-26 Christian Cornelssen <ccorn@cs.tu-berlin.de> * Make-lang.in (c++.install-common, c++.install-man) - (c++.uninstall): Prepend $(DESTDIR) to destination paths - in all (un)installation commands. + (c++.uninstall): Prepend $(DESTDIR) to destination paths in + all (un)installation commands. (c++.install-common): Rewrite $(LN) commands to support DESTDIR with "ln" as well as with "ln -s". +2003-01-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * decl2.c (check_classfn): Fix uninitialized warning. + 2003-01-22 Mark Mitchell <mark@codesourcery.com> PR c++/9328 @@ -22,20 +1175,145 @@ function; it doesn't make sense to try to print its type. * semantics.c (finish_typeof): Issue errors about invalid uses. -2003-01-21 Jeffrey D. Oldham <oldham@codesourcery.com> +2003-01-22 Josef Zlomek <zlomekj@suse.cz> - PR c++/47 - * cp-tree.h (lookup_nested_field): Add declaration. - * decl.c (lookup_name_real): Call lookup_nested_field. - * search.c (lookup_nested_field): Add function. + PR/9386, PR/8801 + 2002-12-27 Mark Mitchell <mark@codesourcery.com> + * typeck.c (build_class_member_access_expr): Fix anonymous union + handling. + +2003-01-17 Jason Merrill <jason@redhat.com> + + PR c++/9167, c++/9358 + * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE. + +2003-01-17 Jason Merrill <jason@redhat.com> + + PR c++/9342 + * call.c (build_conditional_expr): Always do lvalue-rvalue + conversion. + +2003-01-16 Jason Merrill <jason@redhat.com> + + PR c++/8564 + * init.c (build_vec_init): Re-add maxindex parm. + (perform_member_init, build_aggr_init): Pass it. + (build_new_1): Pass it. Use an incomplete array type for full_type. + * typeck.c (build_modify_expr): Pass it. + * cp-tree.h: Adjust. + +2003-01-13 Jason Merrill <jason@redhat.com> + + PR c++/8748 + * class.c (build_base_path): Take the address before calling save_expr. + + * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if + all the ambiguous conversions are bad. + + * class.c (maybe_warn_about_overly_private_class): Don't stop + searching when we find a nonprivate method. + +2003-01-09 Jakub Jelinek <jakub@redhat.com> + + * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs. + +2003-01-09 Jakub Jelinek <jakub@redhat.com> + + * decl.c (start_decl): Don't set DECL_COMMON for __thread variables. + +2003-01-07 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + PR c++/9030 + * decl.c (make_typename_type): Check access only when tf_error. + (make_unbound_class_template): Likewise. + * pt.c (saved_access_scope): New variable. + (push_access_scope_real): New function. + (push_access_scope): Likewise. + (pop_access_scope): Likewise. + (tsubst_default_argument): Use them. + (instantiate_template): Likewise. + (regenerate_decl_from_template): Likewise. + (instantiate_decl): Likewise. + (get_mostly_instantiated_function_type): Likewise. + +2003-01-06 Mark Mitchell <mark@codesourcery.com> + + PR c++/9165 + * decl2.c (build_cleanup): Mark the object as used. + +2003-01-03 Nathan Sidwell <nathan@codesourcery.com> + + PR c++/45, c++/3784 + * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be + the same too. + +2002-12-30 Nathan Sidwell <nathan@codesourcery.com> + + PR c++/9054 + * class.c (layout_class_type): Set DECL_CONTEXT of type for base. + * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types. 2002-12-26 Nathan Sidwell <nathan@codesourcery.com> - PR c++/8503 - Remove DR 295 implementation. - * pt.c (check_cv_quals_for_unify): Disable function & method cases. - * tree.c (cp_build_qualified_type_real): Likewise. Don't warn - about ignoring volatile qualifiers. + PR c++/4803 + * decl2.c (mark_used): Defer inline functions. + (finish_file): Merge deferred_fns loops. Check all used + inline functions have a definition. + * method.c (make_thunk): Thunks are not inline. + + PR c++/5116, c++/764 + * call.c (build_new_op): Make sure template class operands are + instantiated. + +2002-12-24 Nathan Sidwell <nathan@codesourcery.com> + + PR C++/7964 + * cp-tree.h (resolve_scoped_fn_name): Prototype. + * call.c (resolve_scoped_fn_name): New function. Deal with + more template expansion. Broken out of ... + * parse.y (parse_finish_call_expr): ... here. Call it. + * decl2.c (build_expr_from_tree, CALL_EXPR): Use + resolve_scoped_fn_name and build_call_from_tree. + + PR c++/9053 + * decl.c (duplicate_decls): Templates may be disambiguated by + return type. + + PR c++/8702 + * decl2.c (check_classfn): Use lookup_fnfield_1. List all + conversion operators on failure. + +2002-12-22 Nathan Sidwell <nathan@codesourcery.com> + + PR c++/8572 + * cp-tree.h (grokoptypename): Add SCOPE parameter. + * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type + if in a template scope. + * parse.y (unoperator): Return the scope. + (operator_name): Adjust grokoptypename call. + +2002-12-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t. + * decl.c (make_unbound_class_template): Adjust. Check for tf_error. + * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error. + +2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + PR c++/8099 + * friend.c (make_friend_class): Allow partial specialization + when declaration is not a template friend. + +2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + PR c++/3663 + * pt.c (lookup_template_class): Copy TREE_PRIVATE and + TREE_PROTECTED to created decl nodes. + +2002-12-18 Mark Mitchell <mark@codesourcery.com> + + * class.c (build_base_field): Do not set DECL_PACKED on the + FIELD_DECL. 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> @@ -49,46 +1327,94 @@ * pt.c (convert_template_argument): Fix type or template template parameter decision logic. -2002-12-13 Joe Buck <jbuck@synopsys.com> - - * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for - anonymous structs. - 2002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net> - - PR C++/8031 + + PR C++/8031 * cvt.c (convert_to_pointer_force): Don't try comparing against erronous type. +2002-12-13 Geoffrey Keating <geoffk@apple.com> + + * cp-tree.h: Have the multiple-include guards around + the entire file. + 2002-12-10 Mark Mitchell <mark@codesourcery.com> PR c++/8372 * pt.c (tsubst_copy): Handle destructor names more correctly. +2002-12-10 Matt Austern <austern@apple.com> + + * cp-tree.h: get rid of needs_virtual_reinit bit. + +2002-12-09 Mark Mitchell <mark@codesourcery.com> + + * NEWS: Document removal of in-class initialization extension for + static data members of non-arithmetic, non-enumeration type. + * decl.c (check_static_variable_definition): Do not allow that + extension. + * decl2.c (grokfield): Do not call digest_init when processing + templates. + 2002-12-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * error.c (dump_expr): Fix format specifier warning. +2002-12-04 Geoffrey Keating <geoffk@apple.com> + + * class.c (finish_struct_1): Correct comment. + * cp-tree.c (DECL_SORTED_FIELDS): Likewise. + 2002-12-04 Gabriel Dos Reis <gdr@integrable-solutions.net> PR C++/8799 * error.c (dump_expr): Don't ever try to dump a non-existent - expression. + expression. + +2002-12-03 Jason Merrill <jason@redhat.com> + + PR c++/8674 + * call.c (build_over_call): Check specifically for TARGET_EXPR + when eliding. + + PR c++/8461, c++/8625 + * call.c (convert_for_arg_passing): Don't mess with error_mark_node. + (cp_convert_parm_for_inlining): Remove. + * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING): + Remove. + * cp-tree.h (ADDR_IS_INVISIREF): Remove. + * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code. + + * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on + an ambiguous conversion. + +2002-12-03 Mark Mitchell <mark@codesourcery.com> + + PR c++/8688 + * decl.c (reshape_init): Handle erroneous initializers. 2002-12-02 Mark Mitchell <mark@codesourcery.com> + PR c++/8720 + * spew.c (remove_last_token): Make sure that last_chunk is set + correctly. + PR c++/8615 * error.c (dump_expr): Handle character constants with TREE_OVERFLOW set. +2002-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + DR 180 + * decl.c (grokdeclarator): Require class-key for all friend class. + Output the correct type and context in the error message. + 2002-12-01 Mark Mitchell <mark@codesourcery.com> PR c++/5919 * pt.c (unify): Use variably_modified_type_p to test validity of template argument types. -2002-12-01 Mark Mitchell <mark@codesourcery.com> - PR c++/8727 * cp-tree.h (lang_type_class): Add typeinfo_var. (CLASSTYPE_TYPEINFO_VAR): New macro. @@ -106,41 +1432,204 @@ c_size_type_node. * decl2.c (coerce_new_type): Likewise. * except.c (do_allocate_exception): Likewise. - * typeck.c (c_sizeof): Likewise. - (c_sizeof_nowarn): Likewise. 2002-11-30 Mark Mitchell <mark@codesourcery.com> + PR c++/8227 + * decl.c (layout_var_decl): Deal gracefully with erroneous types. + (check_initializer): Validate the type of the initialized + variable, even if the initializer is absent. + * typeck.c (cp_type_quals): Deal gracefully with erroneous types. + PR c++/8214 * typeck.c (convert_for_assignment): Do not use decl_constant_value on the operand. -2002-11-19 Release Manager + PR c++/8511 + * pt.c (instantiate_decl): Handle template friends defined outside + of the class correctly. + +2002-11-29 Joe Buck <jbuck@synopsys.com> - * GCC 3.2.1 Released. + * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for + anonymous structs. -2002-11-19 Release Manager +2002-11-29 Mark Mitchell <mark@codesourcery.com> - * GCC 3.2.1 Released. + * class.c (walk_subobject_offsets): Recur on binfos as well as on + types. + (layout_nonempty_base_or_field): Pass it a binfo when processing a + base class. + (layout_empty_base): Likewise. + (build_base_field): Likewise. -2002-11-18 Release Manager +2002-11-27 Mark Mitchell <mark@codesourcery.com> - * GCC 3.2.1 Released. + * class.c (build_base_field): Make sure we get the canonical base + when descending through primary bases. -2002-11-11 Nathan Sidwell <nathan@codesourcery.com> +2002-11-26 Geoffrey Keating <geoffk@apple.com> - PR c++/7788 - * rtti.c (unemitted_tinfo_decl_p): Check it has a field. + * decl.c (check_initializer): Don't error on initialisation of + a scalar with a brace-enclosed expression. + +2002-11-26 Nathan Sidwell <nathan@codesourcery.com> -2002-11-02 Zack Weinberg <zack@codesourcery.com> + * cp-tree.h (DECL_LANG_FLAG_4): Document more uses. + (template_parms_equal): Remove prototype. + * typeck.c (buuld_indirect_ref): Reformat. + +2002-11-25 Mark Mitchell <mark@codesourcery.com> + + * tree.c (cp_build_qualified_type_real): Correct handling of + array types. + * class.c (walk_subobject_offsets): Fix thinko. + (build_base_field): Record offsets of empty bases in primary + virtual bases. + (layout_class_type): Record offsets of empty bases in fields. + + * search.c (is_subobject_of_p_1): Fix thinko. + (lookup_field_queue_p): Likewise. + +2002-11-24 Mark Mitchell <mark@codesourcery.com> + + * class.c (layout_class_type): Reuse tail padding when laying out + virtual bases. + +2002-11-22 Mark Mitchell <mark@codesourcery.com> + + * rtti.c (qualifier_flags): Fix thinko. + +2002-11-21 Glen Nakamura <glen@imodulo.com> + + PR c++/8342 + * typeck.c (get_member_function_from_ptrfunc): Make sure that a + SAVE_EXPR for instance_ptr doesn't get evaluated first inside one + of the branches of a COND_EXPR. + +2002-11-19 Mark Mitchell <mark@codesourcery.com> + + * pt.c (for_each_template_parm): Free allocated memory. + * search.c (is_subobject_of_p_1): New function. + (is_subobject_of_p): Avoid walking virtual bases multiple times. + +2002-11-19 Jason Thorpe <thorpej@wasabisystems.com> + + * g++spec.c (lang_specific_spec_functions): New. + +2002-11-15 Kazu Hirata <kazu@cs.umass.edu> + + * ChangeLog: Follow spelling conventions. + * class.c: Likewise. + * decl2.c: Likewise. + +2002-11-14 Zack Weinberg <zack@codesourcery.com> + + * search.c (dfs_push_decls): Do not try to reorder elements + 3..n of method_vec if method_vec has only two elements. + Reverse order of two tests to avoid accessing unallocated + memory. + +2002-11-14 Mark Mitchell <mark@codesourcery.com> + + * class.c (dfs_find_final_overrider): Adjust so that the most + derived object is a binfo, rather than a class type. + (find_final_overrider): Likewise. + (add_vcall_offset_vtbl_entries_1): Simplify accordingly. + (add_vcall_offset): Likewise. + +2002-11-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + PR c++/8389 + * pt.c (instantiate_template): Push class scope for member + functions. + (get_mostly_instantiated_function_type): Likewise. Don't call + tsubst on context. Remove CONTEXTP and TPARMSP parameters. + * cp-tree.h (get_mostly_instantiated_function_type): Adjust. + * mangle.c (write_encoding, write_unqualified_name): Adjust. + +2002-11-07 Mark Mitchell <mark@codesourcery.com> + + * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of + vcall offfsets. Split out ... + (add_vcall_offset): ... new function. + + PR c++/8338 + * pt.c (for_each_template_parm): Add htab parameter. + (process_partial_specialization): Adjust call. + (push_template_decl_real): Likewise. + (pair_fn_data): Add visited. + (for_each_template_parm_r): Avoid walking duplicates more than + once. + (uses_template_parms): Adjust call to for_each_template_parm. + +2002-11-07 Mark Mitchell <mark@codesourcery.com> + + * class.c (add_implicitly_declared_members): Put implicitly + declared functions at the end of TYPE_METHODs when -fabi-version + is at least 2. + +2002-11-05 Geoffrey Keating <geoffk@apple.com> + + * decl2.c (finish_file): Correct spelling. + +2002-11-03 Mark Mitchell <mark@codesourcery.com> + + * call.c (build_special_member_call): Do not try to lookup VTTs by + name. + * class.c (vtbl_init_data): Add generate_vcall_entries. + (get_vtable_decl): Do not look up virtual tables by name. + (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P. + (set_primary_base): Do not set CLASSTYPE_RTTI. + (determine_primary_base): Likewise. + (get_matching_virtual): Remove. + (get_vcall_index): New function. + (update_vtable_entry_for_fn): Do not try to use virtual thunks + when they are not required. Assign vcall indices at this point. + (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT. + Do update dynamic_classes. + (build_vtt): Do not add VTTs to the symbol table. + (build_ctor_vtbl_group): Likewise. + (build_vtbl_initializer): Simplify handling of vcall indices. + (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets + for the most derived class. + (add_vcall_offset_vtbl_entries_1): But do not actually add them to + the vtable. + * cp-tree.h (dynamic_classes): New macro. + (lang_type_class): Remove rtti. Add vtables. Add vcall_indices. + (CLASSTYPE_RTTI): Remove. + (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove. + (CLASSTYPE_VCALL_INDICES): New macro. + (CLASSTYPE_VTABLES): Likewise. + (BV_USE_VCALL_INDEX_P): Remove. + (build_vtable_path): Remove. + * decl2.c (finish_vtable_vardecl): Remove. + (key_method): Remove #if 0'd code. + (finish_vtable_vardecl): Rename to ... + (maybe_emit_vtables): ... this. + (finish_file): Use it. + * search.c (look_for_overrides_here): Update comment. + +2002-11-01 Zack Weinberg <zack@codesourcery.com> PR c/7353 redux * decl2.c (grokfield): Reject TYPE_DECLs with initializers. -2002-11-01 Gabriel Dos Reis <gdr@integrable-solutions.net> +2002-10-30 Jason Merrill <jason@redhat.com> - PR C++/2521 - * typeck.c (build_x_unary_op): Handle pointer-to-member. + PR c++/8186 + * cp-tree.h (ADDR_IS_INVISIREF): New macro. + * call.c (convert_for_arg_passing): Set it. + * except.c (stabilize_throw_expr): Recurse for such an arg. + +2002-10-31 Mark Mitchell <mark@codesourcery.com> + + * cp-tree.h (lang_decl_flags): Remove init_priority. + (lang_decl): Add delta. + (GLOBAL_INIT_PRIORITY): Remove. + (THUNK_DELTA): Revise definition. + * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY. + * dump.c (cp_dump_tree): Don't dump it. 2002-10-30 Mark Mitchell <mark@codesourcery.com> @@ -150,6 +1639,25 @@ PR c++/8149 * decl.c (make_typename_type): Issue errors about invalid results. +2002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + Core issue 287, PR c++/7639 + * cp-tree.h (lang_type_class): Add decl_list field. + (CLASSTYPE_DECL_LIST): New macro. + (maybe_add_class_template_decl_list): Add declaration. + * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST. + (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST. + (maybe_add_class_template_decl_list): New function. + (add_implicitly_declared_members): Use it. + * decl.c (maybe_process_template_type_declaration): Likewise. + (pushtag): Likewise. + * friend.c (add_friend): Likewise. + (make_friend_class): Likewise. + * semantics.c (finish_member_declaration): Likewise. + (begin_class_definition): Initialize CLASSTYPE_DECL_LIST. + * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST + to process members and friends in the order of declaration. + 2002-10-29 Mark Mitchell <mark@codesourcery.com> PR c++/8287 @@ -157,28 +1665,45 @@ when returning from a destructor here. (finish_function_body): Rather than here. - * semantics.c (finish_alignof): Call complete_type before calling - c_alignof. - * decl2.c (build_expr_from_tree): Use - finish_sizeof/finish_alignof. - -2002-10-10 Jim Wilson <wilson@redhat.com> - - * decl.c (duplicate_decls): Don't call decl_attributes. - 2002-10-25 Zack Weinberg <zack@codesourcery.com> - PR middle-end/6994 - * cp-lang.c (cp_var_mod_type_p): New: C++ hook for - variably_modified_type_p. - * cp-tree.h: Remove prototype of variably_modified_type_p. - * tree.c (variably_modified_type_p): Remove; now implemented - in language-independent code. - PR c++/7266 * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a SCOPE_REF is not null before dereferencing it. +2002-10-25 Mark Mitchell <mark@codesourcery.com> + + * call.c (build_over_call): Use DECL_CONTEXT, not + DECL_VIRTUAL_CONTEXT. + * class.c (modify_vtable_entry): Don't mess with + DECL_VIRTUAL_CONTEXT. + (set_vindex): Remove. + (set_primary_base): Remove vfuns_p parameter. + (determine_primary_base): Likewise. + (modify_all_vtables): Likewise. + (layout_class_type): Likewise. Adjust calls to other functions + accordingly. + (finish_struct_1): Adjust calls to modified functions. Set + DECL_VINDEX here. + * cp-tree.h (lang_type_class): Remove vsize. + (CLASSTYPE_VSIZE): Remove. + (lang_decl): Remove thunks. + (DECL_THUNKS): Adjust. + (DECL_VIRTUAL_CONTEXT): Remove. + (duplicate_decls): Don't copy it. + * pt.c (build_template_decl): Don't set it. + (tsubst_decl): Likewise. + * typeck.c (expand_ptrmemfunc_cst): Don't use it. + + * class.c (build_vtbl_initializer): Don't use build_vtable_entry. + (build_vtable_entry): Remove. + * cp-tree.h (BINFO_VIRTUALS): Expand documentation. + (lang_decl): Add thunks. + (DECL_THUNKS): New macro. + * decl.c (duplicate_decls): Copy it. + * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS. + * semantics.c (emit_associated_thunks): Simplify. + 2002-10-24 David Edelsohn <edelsohn@gnu.org> PR c++/7228 @@ -191,14 +1716,19 @@ * typeck2.c (process_init_constructor): Remove redundant check for existence of lang_type structure. +2002-10-24 Mark Mitchell <mark@codesourcery.com> + + * class.c (end_of_base): New method. + (end_of_class): Use it. Check indirect virtual bases. + + * class.c (check_field_decls): Fix typo. + 2002-10-23 Mark Mitchell <mark@codesourcery.com> PR c++/8067 * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and related variables. -2002-10-23 Mark Mitchell <mark@codesourcery.com> - PR c++/7679 * spew.c (next_token): Do not return an endless stream of END_OF_SAVED_INPUT tokens. @@ -206,24 +1736,39 @@ the cached token stream. (snarf_defarg): Likewise. +2002-10-23 Zack Weinberg <zack@codesourcery.com> + + * cp-lang.c (cp_var_mod_type_p): New: C++ hook for + variably_modified_type_p. + * cp-tree.h: Remove prototype of variably_modified_type_p. + * tree.c (variably_modified_type_p): Remove; now implemented + in language-independent code. + 2002-10-22 Mark Mitchell <mark@codesourcery.com> PR c++/6579 * spew.c (snarf_parenthesized_expression): New function. (snarf_block): Use it. -2002-10-21 Matthias Klose <doko@debian.org> +2002-10-22 Richard Henderson <rth@redhat.com> - * Backport, without whitespace change: - 2002-06-19 Akim Demaille <akim@epita.fr> - * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with - decl.h's TYPENAME. - * spew.c, lex.c: Adjust. - * parse.y (explicit_instantiation): Add empty action to override - the default $$ = $1 where it introduces a type clash. + * method.c (use_thunk): Always compute vcall_value; assert that + it is not zero. Use can_output_mi_thunk; use output_mi_thunk + for vcall thunks as well. 2002-10-21 Mark Mitchell <mark@codesourcery.com> + * class.c (empty_base_at_nonzero_offset_p): New function. + (layout_nonempty_base_or_field): Do not check for conflicts when + laying out a virtual base using the GCC 3.2 ABI. + (build_base_field): Correct checking for presence of empty classes + at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P. + + * class.c (include_empty_classes): Use normalize_rli. + (layout_class_type): Likewise. + + * decl.c (reshape_init): Tweak handling of character arrays. + PR c++/8218 * cp-tree.h (lang_type_class): Add contains_empty_class_p. (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro. @@ -233,55 +1778,145 @@ (finish_struct_1): Initialize it. (walk_subobject_offsets): Use it to prune searches. +2002-10-20 Mark Mitchell <mark@codesourcery.com> + + * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT. + * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with + TARGET_ASM_OUTPUT_MI_THUNK in comments. + 2002-10-18 Zack Weinberg <zack@codesourcery.com> * decl.c (start_decl): Point users of the old initialized- typedef extension at __typeof__. -2002-10-18 Nathan Sidwell <nathan@codesourcery.com> +2002-10-18 Mark Mitchell <mark@codesourcery.com> + + * Make-lang.in (method.o): Depend on TARGET_H. + * method.c (target.h): Include it. + (use_thunk): Use target hooks. Use vcall thunks, if available. + +2002-10-18 Mark Mitchell <mark@codesourcery.com> + + * class.c (base_derived_from): Make sure return value is a bool. + +2002-10-18 Mark Mitchell <mark@codesourcery.com> + + * class.c (find_final_overrider_data_s): Remove overriding_fn and + overriding_base. + (dfs_base_derived_from): New function. + (base_derived_from): Likewise. + (dfs_find_final_overrider): Use base_derived_from. + (find_final_overrider): Adjust. + +2002-10-18 Jason Merrill <jason@redhat.com> + + PR c++/8080 + * semantics.c (finish_for_cond, finish_while_cond): Don't mess + with condition decls in a template. + +2002-10-17 Nathan Sidwell <nathan@codesourcery.com> - PR c++/7676 * class.c (add_method): Compare template parms too. 2002-10-17 Mark Mitchell <mark@codesourcery.com> - * mangle.c (globals): Add entity and need_abi_warning. - (write_prefix): Likewise. - (write_template_prefix): Likewise. - (start_mangling): Add entity parameter. - (finish_mangling): Warn about names whose mangling will change. - (mangle_decl_string): Adjust. - (mangle_type_string): Likewise. - (mangle_special_for_type): Likewise. - (mangle_ctor_vtbl_for_type): Likewise. - (mangle_thunk): Likewise. - (mangle_guard_variable): Likewise. - (mangle_ref_init_variable): Likewise. - PR c++/7584 * class.c (handle_using_decl): Allow the declaration used to be from an ambiguous base. + * pt.c (convert_template_argument): Revert this change: + 2002-10-16 Mark Mitchell <mark@codesourcery.com> + * pt.c (convert_template_argument): Do not fold non-type + template rguments when inside a template. + + * init.c (expand_default_init): Handle brace-enclosed initializers + correctly. + 2002-10-16 Mark Mitchell <mark@codesourcery.com> + * mangle.c (write_expression): Correct handling of enumeration + constants. + (write_template_arg): Likewise. + * pt.c (convert_template_argument): Do not fold non-type template + arguments when inside a template. + PR c++/7478 * cvt.c (convert_to_reference): Allow references as the incoming type. - PR c++/8134 - * tree.c (zero_init_p): Always return 1. +2002-10-16 Mark Mitchell <mark@codesourcery.com> PR c++/7524 * method.c (do_build_assign_ref): Use cp_build_qualified_type, not build_qualified_type. +2002-10-15 Richard Henderson <rth@redhat.com> + + * error.c (dump_expr): Use real_to_decimal directly, and with + the new arguments. + +2002-10-15 Mark Mitchell <mark@codesourcery.com> + + * decl.c (reshape_init): Fix typo. + + * cp-tree.h (operator_name_info_t): Add arity. + * lex.c (init_operators): Initialize it. + * mangle.c (write_conversion_operator_name): New function. + (write_unqualified_name): Use it. + (write_template_args): Accept template arguments as a TREE_LIST. + (write_expression): Adjust handling of qualified names to match + specification. + +2002-10-15 Jason Merrill <jason@redhat.com> + + * call.c (call_builtin_trap): New fn. + (convert_arg_to_ellipsis): Use it. Downgrade error to warning. + (build_call): Don't set current_function_returns_abnormally outside + a function. + 2002-10-14 Mark Mitchell <mark@codesourcery.com> + * class.c (check_field_decls): Remove empty_p parameter. Instead, + clear CLASSTYPE_EMPTY_P. + (build_base_field): Likewise. + (build_base_fields): Likewise. + (check_bases_and_members): Likewise. + (create_vtbl_ptr): Likewise. + (layout_class_type): Likewise. Ensure that empty classes have + size zero when used as base classes in the 3.2 ABI. + (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and + CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p + parameter. + (is_empty_class): Correct definition when using post-3.2 ABI. + * cp-tree.h (lang_type_class): Add empty_p. + (CLASSTYPE_EMPTY_P): New macro. + +2002-10-12 Nathan Sidwell <nathan@codesourcery.com> + + * init.c (build_delete): Do not apply save_expr for arrays. + (build_vec_delete): Likewise. + +2002-10-14 Mark Mitchell <mark@codesourcery.com> + + * decl.c (layout_var_decl): Call layout_decl even for variables + whose type is an array with unspecified bounds. + PR c++/7176 * lex.c (do_identifier): Add another option for the parsing parameter. * parse.y (do_id): Use it. +2002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net> + + PRs C++/6803, C++/7721 and C++/7803 + * decl.c (grokdeclarator): Gracefully handle template-name as + decl-specifier. + +2002-10-11 Jason Molenda <jmolenda@apple.com> + + * init.c (build_field_list): Provide uses_unions_p with a default + value. + 2002-10-11 Mark Mitchell <mark@codesourcery.com> PR c++/5661 @@ -292,16 +1927,44 @@ types as template arguments. * tree.c (variably_modified_type_p): New function. -2002-10-11 Jason Molenda <jmolenda@apple.com> + * NEWS: Document removal of "new X = ..." extension. + * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on + brace-enclosed initializers. + * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro. + (initialize_local_var): Remove declaration. + (expand_static_init): Likewise. + * decl.c (next_initializable_field): New function. + (reshape_init): Likewise. + (check_initializer): Use them. Build dynamic initializer for + aggregates here too. + (initialize_local_var): Simplify, and incorporate cleanup + insertion code as well. + (destroy_local_var): Remove. + (cp_finish_decl): Tidy. + (expand_static_init): Fold checks for whether or not a variable + needs initialization into this function. Simplify. + * decl2.c (do_static_initialization): Simplify. + * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will + be done for us automatically. + (expand_default_init): Handle brace-enclosed initializers + correctly. + (expand_aggr_init_1): Remove RTL-generation code. + (build_vec_init): Remove "new X = ..." support. + * parse.y (new_initializer): Likewise. + * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on + brace-enclosed initializer. + (create_pseudo_type_info): Likewise. + * typeck2.c (store_init_value): Don't try to handle digest_init + being called more than once. + (digest_init): Tidy handling of brace-enclosed initializers. - * init.c (build_field_list): Provide uses_unions_p with a default - value. +2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> -2002-10-10 Gabriel Dos Reis <gdr@integrable-solutions.net> + * decl.c (typename_hash): Use htab_hash_pointer. - PRs C++/6803, C++/7721 and C++/7803 - * decl.c (grokdeclarator): Gracefully handle template-name as - decl-specifier. +2002-10-10 Jim Wilson <wilson@redhat.com> + + * decl.c (duplicate_decls): Don't call decl_attributes. 2002-10-09 Zack Weinberg <zack@codesourcery.com> @@ -311,6 +1974,10 @@ (cp_finish_decl): Remove special case for TYPE_DECL with initializer. (grokdeclarator): Remove redundant error for 'typedef foo = bar'. +2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * decl2.c (prune_vtable_vardecl): Delete unused function. + 2002-10-03 Mark Mitchell <mark@codesourcery.com> PR c++/7754 @@ -322,23 +1989,17 @@ 2002-10-07 Richard Henderson <rth@redhat.com> - * decl2.c: Complete reversion of c++/7754. + * decl2.c, pt.c: Revert c++/7754 fix. -2002-10-06 Roger Sayle <roger@eyesopen.com> - - PR optimization/6627 - * cp/cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition - from here, and move it to tree.h. - * cp/decl.c (cxx_init_decl_processing): If storing the vbit - in function pointers, ensure that force_align_functions_log - is atleast one. +2002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> -2002-10-04 H.J. Lu (hjl@gnu.org) + PR c++/7804 + * error.c (dump_expr) [REAL_CST]: Output in decimal format. - * pt.c (tsubst_decl, case VAR_DECL): Back out the last change. - (tsubst_expr, case DECL_STMT): Likewise. +2002-10-03 Mark Mitchell <mark@codesourcery.com> -2002-10-02 Mark Mitchell <mark@codesourcery.com> + PR c++/7931 + * pt.c (for_each_template_parm_r): Handle BASELINKs. PR c++/7754 * decl2.c (finish_anon_union): Do not expand anonymous unions when @@ -347,54 +2008,644 @@ type. Call layout_decl. (tsubst_expr, case DECL_STMT): Handle anonymous unions. +2002-10-03 Mark Mitchell <mark@codesourcery.com> + + PR c++/8006 + * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template + template parameters. + (globals): Add entity and need_abi_warning. + (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not + CLASSTYPE_TEMPLATE_INFO. + (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not + TYPE_TI_TEMPLATE. + (write_prefix): Handle typename types correctly. + (write_template_prefix): Handle template template parameters + correctly. + (start_mangling): Add entity parameter. + (finish_mangling): Warn about names whose mangling will change. + (mangle_decl_string): Adjust. + (mangle_type_string): Likewise. + (mangle_special_for_type): Likewise. + (mangle_ctor_vtbl_for_type): Likewise. + (mangle_thunk): Likewise. + (mangle_guard_variable): Likewise. + (mangle_ref_init_variable): Likewise. + 2002-10-02 Mark Mitchell <mark@codesourcery.com> PR c++/7188. - * init.c (expand_member_init): Allow a FIELD_DECL to be passed in - directly. - * pt.c (tsubst_initializer_list): Use expand_member_init. + * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two. + * cp-tree.h (emit_base_init): Rename to .... + (emit_mem_initializers): ... this. + (expand_member_init): Change prototype. + * init.c (perform_member_init): Compute explicit, rather than + requiring it as a parameter. + (sort_member_init): Rename to ... + (sort_mem_initializers): ... this. Process bases and data members + together. + (sort_base_init): Remove. + (emit_base_init): Rename to ... + (emit_mem_initializers): ... this. + (expand_aggr_vbase_init_1): Remove. + (construct_virtual_bases): Rename to ... + (construct_virtual_base): ... this. + (expand_member_init): Rework handling of base initializers. + * method.c (do_build_copy_constructor): Use + finish_mem_initializers. + * parse.y (member_init): Adjust calls to expand_member_init. + * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case. + (tsubst_initializer_list): Use expand_member_init. + * semantics.c (finish_mem_intiailizers): Simplify. + +2002-10-02 Matt Austern <austern@apple.com> + * decl.c (walk_vtables_r): Fixed typo that caused result to + never get a nonzero value. + +2002-10-02 Roger Sayle <roger@eyesopen.com> + + PR optimization/6627 + * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition + from here, and move it to tree.h. + * decl.c (cxx_init_decl_processing): If storing the vbit + in function pointers, ensure that force_align_functions_log + is atleast one. + +2002-10-02 Matt Austern <austern@apple.com> + + * class.c (check_field_decls): Changed warning about const member + variables so that it doesn't get issued for a class aggregate. + +2002-10-01 Mark Mitchell <mark@codesourcery.com> + + * decl.c (cp_finish_decl): Make sure array types are laid out, + even if the array bounds are unknown. + +2002-10-01 Steve Ellcey <sje@cup.hp.com> + + * class.c (build_vtbl_initializer): Change build_c_cast + to build1. + +2002-10-01 Mark Mitchell <mark@codesourcery.com> + + * decl.c (cp_finish_decl): Make sure array types are laid out, + even if the array bounds are unknown. + + * decl.c (cp_finish_decl): Correct check for dynamic + initialization of thread-local storage. + +2002-09-30 Nathan Sidwell <nathan@codesourcery.com> + + * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also + overloaded. + +2002-09-30 Steve Ellcey <sje@cup.hp.com> + + * class.c (build_vtbl_initializer): Add cast. + (add_vcall_offset_vtbl_entries_1): + Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset. + +2002-09-30 Mark Mitchell <mark@codesourcery.com> + + * class.c (walk_subobject_offsets): Correct the calculation of + offsets for virtual bases. Correct the counting of array + elements. + (layout_nonempty_base_or_field): Simplify. Correct the + calculation of offsets to be propagated through the binfo + hierarchy. + (build_base_field): Avoid creating a FIELD_DECL for empty bases. + Add the FIELD_DECL to TYPE_FIELDS. + (build_base_fields): Adjust accordingly. + (layout_virtual_bases): Use build_base_field. + (end_of_class): Return a tree, not an integer. + (warn_about_ambiguous_direct_bases): Rename to ... + (warn_about_ambiguous_bases): ... this. + (include_empty_classes): New function. + (layout_class_type): Create an alternative version of the type to + be used when as a base class type. Do not call + finish_record_layout until we are done laying out the class. + * cp-tree.h (lang_type_class): Remove size, size_unit. Add + as_base. + (CLASSTYPE_SIZE): Reimplement. + (CLASSTYPE_SIZE_UNIT): Likewise. + (CLASSTYPE_ALIGN): Likweise. + (CLASSTYPE_USER_ALIGN): Likewise. + (CLASSTYPE_AS_BASE): New macro. + (DECL_INITIALIZED_P): Likewise. + (extract_init): Remove prototype. + (build_forced_zero_init): Rename to ... + (build_zero_init): ... this. + (force_store_init_value): Remove. + * decl.c (obscure_complex_init): Remove. + (duplicate_decls): Copy DECL_INITIALIZED_P. + (check_initializer): Do not leave junk in DECL_INITIAL. + (cp_finish_decl): Handle zero-initialization of entities with + static storage duration. + * expr.c (extract_init): Remove. + * init.c (build_forced_zero_init): Remove. + (build_zero_init): New function. + (build_default_init): Use it. + (build_field_list): Skip FIELD_DECLs for base subobjects. + (push_base_cleanups): Likewise. + * method.c (do_build_assign_ref): Likewise. + (synthesize_exception_spec): Likewise. + * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P. + (regenerate_decl_from_template): To not set DECL_INITIAL for a + static data member whose initialization took place in its class. + (instantiate_decl): Do not pass an initializer to cp_finish_decl + in that situation. + * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects. + (dfs_unuse_fields): Likewise. + * tree.c (pod_type_p): Handle error_mark_node. + (zero_init_p): Likewise. + * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base + subobjects. + * typeck2.c (store_init_value): Remove #if 0'd code. + (force_store_init_value): Remove. + (process_init_constructor): Use build_zero_init. + +2002-09-29 Nathan Sidwell <nathan@codesourcery.com> + + PR c++/7788 + * rtti.c (unemitted_tinfo_decl_p): Check it has a field. + +2002-09-29 Kazu Hirata <kazu@cs.umass.edu> + + * cp-tree.h: Fix comment typos. + * decl.c: Likewise. + * pt.c: Likewise. + +2002-09-25 Mark Mitchell <mark@codesourcery.com> + + * cp/class.c (contains_empty_class_p): New method. + (walk_subobject_offsets): Correct computation of field offset. + (layout_empty_base): Correct placement of emtpy base classes. + (layout_class_type): Warn about ABI changes. + +2002-09-23 Mark Mitchell <mark@codesourcery.com> + + * cp/class.c (layout_virtual_bases): Do not round the size of the + type to a multiple of the alignment before laying out virtual bases. + (layout_class_type): Correct handling of bit-fields that are wider + than their type inside unions. Round the size of the type to a + even number of bytes when computing the size without virtual + bases. + * cp/cp-tree.h (abi_version_at_least): New macro. + +2002-09-21 Kazu Hirata <kazu@cs.umass.edu> + + * ChangeLog: Follow spelling conventions. + * ChangeLog.2: Likewise. + * call.c: Likewise. + * class.c: Likewise. + * cp-tree.h: Likewise. + * cvt.c: Likewise. + * decl.c: Likewise. + * decl2.c: Likewise. + * except.c: Likewise. + * friend.c: Likewise. + * g++spec.c: Likewise. + * init.c: Likewise. + * lex.c: Likewise. + * mangle.c: Likewise. + * method.c: Likewise. + * operators.def: Likewise. + * optimize.c: Likewise. + * pt.c: Likewise. + * rtti.c: Likewise. + * search.c: Likewise. + * semantics.c: Likewise. + * spew.c: Likewise. + * tree.c: Likewise. + * typeck.c: Likewise. + +2002-09-18 Devang Patel <dpatel@apple.com> + + * cp/cp-tree.h: New prototype for walk_vtabls(). + * cp/decl.c (walk_vtables_r): New function. + (struct cp_binding_level): Add new members, namespaces, + names_size and vtables. + (add_decl_to_level): Add decl in namespaces or vtables + chain, if conditions match. + (walk_vtables): New function. + (walk_namespaces_r): Travers separate namespace chain + for namespace decls. + (wrapup_globals_for_namespace): Use names_size instead + of list_length(). + * cp/decl2.c (finish_file): Use walk_vtables() instead of + walk_globals() to walk vtable decls. + +2002-09-18 Nathan Sidwell <nathan@codesourcery.com> + + * decl.c (grokdeclarator): Use assert, not internal_error. Don't + ICE with invalid pointers & references. + +2002-09-17 Zack Weinberg <zack@codesourcery.com> + + * Make-lang.in: Remove all references to the demangler. + * cxxfilt.c: Moved to binutils. + +2002-09-16 Nathan Sidwell <nathan@codesourcery.com> + + PR c++/7718 + * pt.c (tsubst_decl): Remove assert. + + Remove DR 295 implementation. + * pt.c (check_cv_quals_for_unify): Disable function & method cases. + * tree.c (cp_build_qualified_type_real): Likewise. Don't warn + about ignoring volatile qualifiers. + + * search.c (lookup_member): Correct documentation. + +2002-09-16 Geoffrey Keating <geoffk@apple.com> + + * cp-tree.h (union lang_tree_node): Add chain_next option. + +2002-09-16 Nathan Sidwell <nathan@codesourcery.com> + + * parse.y (parse_finish_call_expr): Check lookup_member result. + + PR c++/7015 + * semantic.c (finish_asm_stmt): Fix operand/output_operands + thinko. + * typeck.c (c_expand_asm_operands): Protect from error_mark_node. + +2002-09-15 Nathan Sidwell <nathan@codesourcery.com> + + PR c++/7919 + * call.c (build_over_call): Convert this pointer for fns found by + using decls. + +2002-09-15 Kazu Hirata <kazu@cs.umass.edu> + + * ChangeLog: Follow spelling conventions. + * ChangeLog.1: Likewise. + +2002-09-14 Nathan Sidwell <nathan@codesourcery.com> + + PR c++/7768 + * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P. + +2002-09-14 Kazu Hirata <kazu@cs.umass.edu> + + * error.c: Fix comment formatting. + * except.c: Likewise. + * expr.c: Likewise. + * friend.c: Likewise. + * g++spec.c: Likewise. + * init.c: Likewise. + * lex.c: Likewise. + * mangle.c: Likewise. + * method.c: Likewise. + * optimize.c: Likewise. + * pt.c: Likewise. + * rtti.c: Likewise. + * search.c: Likewise. + * semantics.c: Likewise. + * spew.c: Likewise. + * tree.c: Likewise. + * typeck.c: Likewise. + * typeck2.c: Likewise. + +2002-09-13 Matt Austern <austern@apple.com> + + PR C++/7828 + * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p. + * cp/call.c: Change call-by-const-reference mechanism to use + non_cast_lvalue_p when deciding whether the create a temporary. + We need a temporary when passing, e.g. (long) x by const ref. + +2002-09-13 Nathan Sidwell <nathan@codesourcery.com> + + * pt.c (unify, ARRAY_TYPE): Element type can be more qualified. + +2002-09-13 Kazu Hirata <kazu@cs.umass.edu> + + * decl.c: Fix comment formatting. + * decl2.c: Likewise. + +2002-09-12 Kazu Hirata <kazu@cs.umass.edu> + + * call.c: Fix comment formatting. + * class.c: Likewise. + * cp-lang.c: Likewise. + * cp-tree.h: Likewise. + * cvt.c: Likewise. + +2002-09-11 Zack Weinberg <zack@codesourcery.com> + + * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c, + and c++filt from cxxfilt.o + version.o + $(LIBDEPS). + * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with + minor adjustments (use version_string, eliminate yet another + duplicate of xmalloc) + +2002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * cp-tree.h (require_complete_eh_spec_types): Add prototype. + +2002-09-05 Jason Merrill <jason@redhat.com> + + * typeck2.c (add_exception_specifier): Only pedwarn for an + incomplete type. + (require_complete_eh_spec_types): New fn. + (cxx_incomplete_type_diagnostic): Also support pedwarning. + * typeck.c (complete_type_or_diagnostic): Likewise. + * call.c (build_call): Call require_complete_eh_spec_types. + * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting + on an incomplete type. 2002-09-04 Jakub Jelinek <jakub@redhat.com> * decl.c (start_cleanup_fn): Clear interface_only before start_function, restore it afterwards. -2002-09-01 Alexandre Oliva <aoliva@redhat.com> +2002-08-31 Jason Merrill <jason@redhat.com> - * parse.y (sizeof, alignof, typeof): New non-terminals to - increment skip_evaluation. Replace terminals with them and - decrement skip_evaluation at the end of rules using them. - * decl2.c (mark_used): Don't assemble_external if - skipping evaluation. + * cp-lang.c (cp_expr_size): Allow initialization from a + CONSTRUCTOR. -2002-08-31 Jason Merrill <jason@redhat.com> +2002-08-30 Richard Henderson <rth@redhat.com> - * cp-lang.c (cp_expr_size): Don't abort. + PR opt/7515 + * tree.c: Include target.h. + (cp_cannot_inline_tree_fn): Don't auto-inline functions that + don't bind locally. + * Makefile.in (tree.o): Update. 2002-08-27 Mark Mitchell <mark@codesourcery.com> - * cp-tree.h (warn_abi): Declare it. - * decl.c (warn_abi): Define it. - (cxx_decode_option): Set it. * class.c (layout_virtual_bases): Warn about bugs in G++ that result in incorrect object layouts. (layout_class_type): Likewise. +2002-08-24 Matt Austern <austern@apple.com> + + * tree.c (lvalue_p_1): Add argument for whether casts of lvalues + are allowable. + (real_lvalue_p): Update caller. + (lvalue_p): Ditto. + (non_cast_lvalue_or_else): New. + * tree.h: Declare it. + * typeck.c (build_unary_op): Use non_cast_lvalue_or_else. + +2002-08-22 Mark Mitchell <mark@codesourcery.com> + + * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR + and COND_EXPR specially; fix error message output. + 2002-08-22 Jason Merrill <jason@redhat.com> - PR c++/5607 - * search.c (check_final_overrider): No longer static. - * class.c (update_vtable_entry_for_fn): Call it. - * cp-tree.h: Adjust. + * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR. + * semantics.c (nullify_returns_r): Likewise. - * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define. - (cp_expr_size): New fn. - * call.c (convert_arg_to_ellipsis): Promote non-POD warning to error. - * typeck.c (build_modify_expr): Don't use save_expr on an lvalue. +2002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net> + + Fix PR/7621 + * typeck.c (finish_class_member_access_expr): Diagnose cases where + name lookup finds nothing. + +2002-08-15 Jason Merrill <jason@redhat.com> + + * semantics.c (finish_then_clause): Remove redundant assignment. + (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the + extra binding level outside the if/switch statement. + (finish_while_cond, finish_for_cond): Rewrite complex condition + into the loop body. + +2002-08-15 Alexandre Oliva <aoliva@redhat.com> + + * parse.y (sizeof, alignof, typeof): New non-terminals to + increment skip_evaluation. Replace terminals with them and + decrement skip_evaluation at the end of rules using them. + * decl2.c (mark_used): Don't assemble_external if + skipping evaluation. + +2002-08-15 Gabriel Dos Reis <gdr@nerim.net> + + Fix PR/7504 + * parse.y (parse_finish_call_expr): Handle incomplete + type used to name a scope. + +2002-08-15 Nathan Sidwell <nathan@codesourcery.com> + + PR c++/7598 + * typeck.c (build_unary_op): Fold offsetof idiom. Fixes + regression caused by my 2002-08-08 patch. + +2002-08-13 Mark Mitchell <mark@codesourcery.com> + + * decl.c (pushdecl_class_level): Honor requests to bind names to + OVERLOADs. + +2002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * decl2.c (build_call_from_tree): Fix uninitialized variable. + * parse.y (parse_finish_call_expr): Likewise. + * repo.c (old_args, old_dir, old_main): Const-ify. + +2002-08-11 Gabriel Dos Reis <gdr@nerim.net> + + * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE + + DECL_SOURCE_LINE with DECL_SOURCE_LOCATION. + * optimize.c (maybe_clone_body): Likewise. + * pt.c (tsubst_enum): Likewise. + (lookup_template_class): Likewise. + * tree.c (cp_copy_res_decl_for_inlining): Likewise. + +2002-08-10 Neil Booth <neil@daikokuya.co.uk> + + * lang-specs.h: Remove -ansi. + +2002-08-10 Nathan Sidwell <nathan@codesourcery.com> + + * tree.c (maybe_dummy_object): Replace // with /* */ + +2002-08-09 Mark Mitchell <mark@codesourcery.com> + + * call.c (standard_conversion): Use build_ptrmem_type. + * cp-tree.h (build_ptrmem_type): New function. + (adjust_result_of_qualified_name_lookup): Likewise. + * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate + static data members. + (build_ptrmem_type): New function. + (grokdeclarator): Do not use build_offset_type when encountering a + qualified name. + * parse.y (parse_finish_call_expr): Use + adjust_result_of_qualified_name_lookup. + * search.c (adjust_result_of_qualified_name_lookup): New function. + * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than + accessing OFFSET_TYPEs directly. + +2002-08-08 Mike Stump <mrs@apple.com> + + * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid. + (type_decays_to): Likewise. + * class.c (find_final_overrider): Likewise. + (maybe_note_name_used_in_class): Likewise. + * decl.c (current_tmpl_spec_kind): Likewise. + (add_binding): Likewise. + (push_class_binding): Likewise. + (duplicate_decls): Likewise. + (layout_var_decl): Likewise. + (grokfndecl): Likewise. + (grokdeclarator): Likewise. + (check_default_argument): Likewise. + * decl2.c (handle_class_head): Likewise. + * error.c (dump_template_decl): Likewise. + * init.c (build_offset_ref): Likewise. + * pt.c (check_specialization_scope): Likewise. + (determine_specialization): Likewise. + (check_explicit_specialization): Likewise. + (maybe_check_template_type): Likewise. + (process_partial_specialization): Likewise. + (check_default_tmpl_args): Likewise. + (push_template_decl_real): Likewise. + (convert_template_argument): Likewise. + (try_class_unification): Likewise. + (get_bindings_real): Likewise. + (do_decl_instantiation): Likewise. + * semantics.c (begin_function_definition): Likewise. + (finish_member_declaration): Likewise. + (check_multiple_declarators): Likewise. + * typeck.c (comp_array_types): Likewise. + (comptypes): Likewise. + (expr_sizeof): Likewise. + (build_binary_op): Likewise. + (dubious_conversion_warnings): Likewise. + (check_return_expr): Likewise. + +2002-08-08 Mark Mitchell <mark@codesourcery.com> + + * typeck.c (build_class_member_access_expr): Do not return + error_mark_node when no error has occurred. + +2002-08-08 Nathan Sidwell <nathan@codesourcery.com> + + * typeck.c (build_component_addr): Remove. + (build_unary_op): Just check it's not a bitfield, and then build + an ADDR_EXPR. + +2002-08-08 Nathan Sidwell <nathan@codesourcery.com> + + * class.c (convert_to_base): Correct check for error_mark_node. + (create_vtable_ptr): Remove unused VFUNS_P parm. + +2002-08-08 Nathan Sidwell <nathan@codesourcery.com> + + * cp/Make-lang.in (c++.mostlyclean): Remove coverage files. + +2002-08-07 Mark Mitchell <mark@codesourcery.com> + + Rework build_component_ref. + * call.c (build_vfield_ref): Do not go through build_component_ref. + (build_field_call): Use build_class_member_access_expr. + (build_user_type_conversion_1): Use BASELINK_FUNCTIONS. + (build_object_call): Likewise. + * class.c (convert_to_base): New function. + (type_requires_array_cookie): Use BASELINK_FUNCTIONS. + (instantiate_type): Handle BASELINKs. + * cp-tree.def (BASELINK): New tree code. + * cp-tree.h (BASELINK_P): Reimplement. + (SET_BASELINK_P): Remove. + (BASELINK_BINFO): Reimplement. + (BASELINK_FUNCTIONS): Likewise. + (BASELINK_ACCESS_BINFO): Likewise. + (BASELINK_OPTYPE): Likewise. + (convert_to_base): New function. + (name_p): Likewise. + (build_object_ref): Remove. + (build_component_ref_1): Likewise. + (build_component_ref): Likewise. + (build_x_component_ref): Likewise. + (build_class_member_access_expr): New function. + (finish_class_member_access_expr): Likewise. + (build_ptrmemfunc_access_expr): Likewise. + * decl.c (grokdeclarator): Handle BASELINKs. + * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using + finish_class_member_access_expr. + (arg_assoc): Handle BASELINKs. + (do_class_using_decl): Likewise. + * error.c (dump_decl): Likewise. + (dump_expr): Use build_ptrmemfunc_access_expr. + * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find + destructors. + (build_throw): Use BASELINK_FUNCTIONS. + * init.c (perform_member_init): Use + build_class_member_access_expr. + (build_offset_ref): Handle BASELINKs. Use + build_class_member_access_expr. + * method.c (hack_identifier): Likewise. + * parse.y (do_id): Use BASELINK, not TREE_LIST. + (primary): Remove uses of build_object_ref. + * pt.c (lookup_template_function): Handle BASELINKs. + (resolve_overloaded_unification): Likewise. + * search.c (build_baselink): Build a BASELINK, not a TREE_LIST. + (lookup_field): Use BASELINK, not TREE_LIST. + (lookup_fnfiels): Likewise. + (setup_class_bindings): Likewise. + * semantics.c (finish_object_call_expr): Do not use + build_method_call when we already know what function is being + called. + * spew.c (identifier_type): Use BASELINK, not TREE_LIST. + * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not + TREE_CHAIN. + (name_p): New function. + * typeck.c (build_object_ref): Remove. + (build_component_ref_1): Likewise. + (build_x_component_ref): Likewise. + (build_class_member_access_expr): New function. + (finish_class_member_access_expr): Likewise. + (build_ptrmemfunc_access_expr): Likewise. + (get_member_function_from_ptrfunc): Use + build_ptrmemfunc_access_expr. + (build_binary_op): Likewise. + (build_unary_op): Likewise. + (build_ptrmemfunc): Likewise. + (pfn_from_ptrmemfunc): Likewise. + * typeck2.c (build_m_component_ref): Adjust comment. + +2002-08-07 Neil Booth <neil@daikokuya.co.uk> + + * Make-lang.in (CXX_C_OBJS): Update. + * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option. + * cp-tree.h (cxx_decode_option): Remove. + * decl2.c (compare_options, lang_f_options, unsupported_options, + cxx_decode_option): Remove. + +2002-08-06 Gabriel Dos Reis <gdr@nerim.net> + + * typeck.c (build_x_unary_op): Handle pointer-to-member. -2002-08-14 Release Manager +2002-08-05 Geoffrey Keating <geoffk@redhat.com> - * GCC 3.2 Released. + * class.c: Don't include obstack.h. + (popclass): + * decl2.c: Delete bogus comment. + * error.c: Don't include obstack.h. + * except.c: Likewise. + (dump_type): Correct comment. + * method.c: Don't include obstack.h. + * tree.c: Likewise. + +2002-08-04 Gabriel Dos Reis <gdr@nerim.net> + + Fix PR/2213 + * cvt.c (cp_convert_to_pointer): Reject conversions from integral + expressions to pointer-to-data-member of pointer-to-member-functions. + +2002-08-04 Geoffrey Keating <geoffk@redhat.com> + + * cvt.c (ocp_convert): Delete obsolete code. + * parse.y (permanent_obstack): Delete declaration. + * pt.c (permanent_obstack): Delete declaration. + * repo.c (permanent_obstack): Delete declaration. + (open_repo_file): Use xmalloc instead of permanent_obstack. + (init_repo): Use xstrdup instead of permanent_obstack. + +2002-08-04 Nathan Sidwell <nathan@codesourcery.com> + + * cp-tree.h (VF_DERIVED_VALUE): Remove. + * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE. 2002-08-03 Nathan Sidwell <nathan@codesourcery.com> @@ -409,82 +2660,284 @@ (layout_class_type): Take single list of virtuals. Adjust. (finish_struct_1): Keep virtuals on single list. Adjust. +2002-08-02 Mark Mitchell <mark@codesourcery.com> + + * init.c (build_member_call): Use build_new_method_call, not + build_method_call. + +2002-08-02 Krister Walfridsson <cato@df.lth.se> + + * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies. + +2002-08-02 Mark Mitchell <mark@codesourcery.com> + + * call.c (build_method_call): Issue a more helpful error message + about ambiguous method names. + +2002-08-02 Nathan Sidwell <nathan@codesourcery.com> + + * tree.c (build_shared_int_cst): Make cache file scope, and + GTY it. + +2002-08-02 Jason Merrill <jason@redhat.com> + + * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define. + (cp_expr_size): New fn. + * call.c (build_over_call): Lose empty class hackery. + (convert_arg_to_ellipsis): Promote non-POD warning to error. + * typeck.c (build_modify_expr): Don't use save_expr on an lvalue. + + * semantics.c (expand_body): Do tree optimization in the function + context, too. + +2002-08-01 Neil Booth <neil@daikokuya.co.uk> + + * cp-tree.h: Move all warning and flag declarations to c-common.h. + * decl.c: Move all warning and flag variables to c-common.c. + * decl2.c: Move all warning and flag variables to c-common.c. + * lex.c (flag_digraphs): Remove. + (warn_traditional): Now in c-common.c. + +2002-07-31 Mark Mitchell <mark@codesourcery.com> + + * call.c (build_field_call): Do not look up the field by name. + (build_method_call): Simplify. + (struct z_candidate): Add access_path and conversion_path. Remove + basetype_path. + (convert_class_to_reference): Adjust use of + add_function_candidate. + (add_candidate): Add conversion_path argument. + (add_function_candidate): Use it. + (add_conv_dndidate): Likewise. + (build_builtin_candidate): Likewise. + (add_template_candidate_real): Add conversion_path argument. + (add_template_conv_candidate): Likewise. + (add_template_candidate): Likewise. + (build_user_type_conversion_1): Use it. + (build_new_function_call): Remove name lookup code. Adjust use of + add_template_candidate and add_function_candidate. + (build_new_op): Likewise. + (convert_like_real): Use build_special_member_call. + (build_over_call): Use cand->conversion_path. + (build_special_member_call): New method. + (build_new_method_call): Remove name lookup code. + * cp-tree.def (OFFSET_REF): Update documentation. + (TEMPLATE_ID_EXPR): Likewise. + * cp-tree.h (BASELINK_ACCESS_BINFO): New macro. + (BASELINK_OPTYPE): Likewise. + (build_new_method_call): Adjust prototype. + (build_special_member_call): New method. + (build_baselink): New method. + (build_offset_ref_call_from_tree): Likewise. + (build_call_from_tree): Likewise. + (finish_qualified_call_expr): Remove. + (finish_call_expr): Adjust prototype. + (build_x_function_call): Remove. + * cvt.c (ocp_convert): Use build_special_member_call. + * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr. + (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and + CALL_EXPR. + (build_offset_ref_call_from_tree): New function. + (build_call_from_tree): Likewise. + * init.c (expand_cleanup): Use build_special_member_call. + (expand_default_init): Likewise. + (build_member_call): Use finish_call_expr. + (build_new_1): Use build_special_member_call. + (push_base_cleanups): Likewise. + * method.c (do_build_assign_ref): Likewise. + * parse.y (template_id): Do not pass a COMPONENT_REF to + lookup_template_function. + (primary): Use parse_finish_call_epxr, not finish_call_expr. + (parse_finish_call_expr): New function. + * pt.c (lookup_template_function): Add assertions. + * search.c (lookup_base): Allow T to be a binfo. + (build_baselink): New function. + (lookup_member): Use it. + * semantics.c (finish_call_expr): Do not do name lookup. + (finish_object_call_expr): Remove #if 0'd code. + (finish_qualified_call_expr): Remove. + * typeck.c (build_x_function_call): Remove. + (build_static_case): Use build_special_member_call. + * typeck2.c (build_functional_cast): Likewise. + 2002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c. -2002-07-17 Scott Snyder <snyder@fnal.gov> +2002-07-30 Gabriel Dos Reis <gdr@nerim.net> - PR c++/7320 - * rtti.c (get_tinfo_decl): Set DECL_COMDAT. + * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion. -2002-07-05 Nathan Sidwell <nathan@codesourcery.com> +2002-07-30 Nathan Sidwell <nathan@codesourcery.com> - Repair damage on weak-impared targets caused by my previous patch. - * cp-tree.h (import_export_tinfo): Add parameter. - * decl2.c (import_export_tinfo): Add parameter, post adjust - DECL_COMDAT. - * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by - import_export_tinfo. + * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more + documentation. -2002-06-30 Nathan Sidwell <nathan@codesourcery.com> +2002-07-29 Alan Modra <amodra@bigpond.net.au> - * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ... - (CPTI_TYPE_INFO_PTR_TYPE): ... this. - (tinfo_decl_type): Replace with ... - (type_info_ptr_type): ... this. - (import_export_tinfo): Declare. - (tinfo_decl_p): Rename to ... - (unemitted_tinfo_decl_p): ... this. - * decl2.c (import_export_decl): Break out tinfo handling into ... - (import_export_tinfo): ... here. New function. - (finish_file): Adjust. - * rtti.c (TINFO_REAL_NAME): New macro. - (init_rtti_processing): Create the tinfo types. - (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr. - (get_tinfo_decl): Adjust. - (get_tinfo_ptr): New function. - (get_type_id): Use it. - (tinfo_base_init): Create vtable decl here, if it doesn't exist. - (ptr_initializer): Use get_tinfo_ptr. - (ptm_initializer): Likewise. - (synthesize_tinfo_var): Break into ... - (get_pseudo_ti_init): ... this. Just create the initializer. - (get_pseudo_ti_desc): .. and this. - (create_real_tinfo_var): Remove. - (create_pseudo_type_info): Don't create the vtable decl here. - (get_vmi_pseudo_type_info): Remove. - (create_tinfo_types): Adjust. - (tinfo_decl_p): Rename to ... - (unemitted_tinfo_decl_p): ... here. Adjust. - (emit_tinfo_decl): Adjust. Create the initializer. + * cp-tree.h: Comment typo fix. -2002-06-14 Jason Merrill <jason@redhat.com> +2002-07-29 Richard Earnshaw <rearnsha@arm.com> - C++ ABI changes. - * class.c (build_base_field): Set DECL_PACKED. - (layout_class_type): Don't use tail padding of PODs. - * mangle.c (write_unqualified_name): Fix template conversion op - mangling. + * spew.c (space_for_token): Allocate zeroed memory for a new token + chunk. -2002-05-18 Jason Merrill <jason@redhat.com> +2002-07-27 Roger Sayle <roger@eyesopen.com> - PR c++/6611 - * decl2.c (import_export_decl): If we clear - DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set. + * decl.c (builtin_function_1): No need to explicitly mark + BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn. -2002-05-14 Jason Merrill <jason@redhat.com> +2002-07-27 Roger Sayle <roger@eyesopen.com> - * rtti.c (get_tinfo_decl): Don't call comdat_linkage. - Do set DECL_COMDAT. - (synthesize_tinfo_var): Take the public decl. - (create_real_tinfo_var): Likewise. Check DECL_COMDAT. - (emit_tinfo_decl): Adjust. Call import_export_decl. - * decl2.c (import_export_decl): Simplify tinfo decl handling. + * decl2.c (cxx_decode_option): Support -fno-builtin-foo. + +2002-07-26 Jason Merrill <jason@redhat.com> + + * call.c (build_over_call): Likewise. + (cp_convert_parm_for_inlining): New fn. + (convert_for_arg_passing): New fn. + (convert_default_arg, build_over_call): Use it. + (type_passed_as): New fn. + * pt.c (tsubst_decl): Use it. + * decl2.c (cp_build_parm_decl): New fn. + (build_artificial_parm): Use it. + (start_static_storage_duration_function): Likewise. + * decl.c (start_cleanup_fn, grokdeclarater): Likewise. + (grokparms): Don't mess with DECL_ARG_TYPE. + * typeck.c (convert_arguments): Use convert_for_arg_passing. + * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING): + Define. + * cp-tree.h: Declare new fns. + +2002-07-26 Neil Booth <neil@daikokuya.co.uk> + + * cp-tree.h (flag_operator_names): Remove. + * decl2.c (flag_operator_names): Remove. + (lang_f_options): Remove operator-names. + * lex.c (D_OPNAME): Remove. + (reswords): Remove operator names. + (rid_to_yy): Remove operator names. + (init_reswords): No need to handle D_OPNAME. + * spew.c (read_process_identifier): There are no operator + names. + +2002-07-26 Jason Merrill <jason@redhat.com> + + * dump.c (cp_dump_tree): Call c_dump_tree. + * Make-lang.in (CXX_C_OBJS): Add c-dump.o. + +2002-07-25 Neil Booth <neil@daikokuya.co.uk> + + * error.c (print_whitespace): Remove. + * g++spec.c (LIBUNWIND): Move. + * mangle.c (mangled_position, write_signed_number): Remove. + +2002-07-25 Neil Booth <neil@daikokuya.co.uk> + + * decl2.c (cxx_decode_option): Similarly. + +2002-07-25 Gabriel Dos Reis <gdr@nerim.net> + + * cp-tree.h (cxx_sizeof_nowarn): Now a macro. + (cxx_sizeof_or_alignof_type): Take a third argument. + (cxx_sizeof): Adjust definition. + (cxx_alignof): Likewise. + * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality. + * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for + complaining. + (c_sizeof_nowarn): Remove definition. + (build_unary_op): Use cxx_sizeof_nowarn. + +2002-07-24 Geoffrey Keating <geoffk@redhat.com> + + * tree.c (cp_build_qualified_type_real): When copying + pointer-to-method types, unshare the record that holds + the cached pointer-to-member-function type. + +2002-07-23 Neil Booth <neil@daikokuya.co.uk> + + * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove. + +2002-07-23 Gabriel Dos Reis <gdr@nerim.net> + + Fix PR/7363: + * typeck.c (cxx_sizeof_or_alignof_type): New function. + (c_sizeof): Remove definition. + (expr_sizeof): Use cxx_sizeof. + * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type. + * decl.c (finish_destructor_body): Use cxx_sizeof. + * semantics.c (finish_alignof): Likewise. + (finish_alignof): Use cxx_alignof. + * cp-tree.h (cxx_sizeof, cxx_alignof): New macros. + (cxx_sizeof_or_alignof_type): Declare. + (my_friendly_assert): Move to ../c-common.h. + +2002-07-23 Neil Booth <neil@daikokuya.co.uk> + + * class.c, method.c, pt.c, search.c: Don't define obstack macros. + +2002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + PR c++/7347, c++/7348 + * cp-tree.h (tsubst_flags_t): Add tf_parsing. + * decl.c (make_typename_type): Use it. + (make_unbound_class_template): Likewise. + (lookup_name_real): Don't call type_access_control if scope is + template parameter dependent. + * parse.y (template_arg): Call make_unbound_class_template with + tf_parsing set. + (nest_name_specifier): Call make_typename_type with tf_parsing set. + (typename_sub0): Likewise. + (typename_sub1): Likewise. + (instantiate_decl): Push class scope. + * pt.c (regenerate_decl_from_template): Call pushclass and popclass + for both static variable and member function template. + (instantiate_decl) Call pushclass and popclass when tsubst'ing type + and arguments. + * search.c (type_access_control): Do type access for TEMPLATE_DECL + too. -2002-07-25 Release Manager +2002-07-20 Roger Sayle <roger@eyesopen.com> - * GCC 3.1.1 Released. + * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions + test by using positive_option. Make whitespace consistent. + +2002-07-20 Gabriel Dos Reis <gdr@nerim.net> + + * spew.c (struct unparsed_test): Replace 'filename' and 'lineno' + members with 'locus'. Adjust use throughout. + (struct feed): Likewise. + (alloc_unparsed_test): Change prototype, take a 'const location_t *'. + Adjust use. + (snarf_defarg): Use error(), not error_with_file_and_line(). + +2002-07-19 Chris Demetriou <cgd@broadcom.com> + + * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever + cpp_options is included. + +2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + PR c++/2862, c++/2863 + * pt.c (determine_specialization): Compare the length of + TYPE_ARG_TYPES. Tidy. + +2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + PR c++/3797 + * decl.c (duplicate_decls): Don't propagate inlining parameters from + olddecl to newdecl when newdecl is a specialization of the + instantiation olddecl. + +2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + PR c++/4802, c++/5387 + * decl.c (make_typename_type): Use enforce_access. + +2002-07-17 Scott Snyder <snyder@fnal.gov> + + PR c++/7320 + * rtti.c (get_tinfo_decl): Set DECL_COMDAT. 2002-07-12 Mark Mitchell <mark@codesourcery.com> @@ -501,21 +2954,77 @@ * tree.c (cp_copy_res_decl_for_inlining): Also copy TREE_ADDRESSABLE. +2002-07-10 Graham Stott <graham.stott@btinternet.com> + + * pt.c (template_parm_this_level_p, push_template_decl_real): + Pass depth as int pointer. + +2002-07-11 Tim Josling <tej@melbpc.org.au> + + Remove front end hard coding from gengtype.c. + + * config-lang.in (gtfiles): Add files needed for this front end. + +2002-07-10 Mark Mitchell <mark@codesourcery.com> + + * cp-tree.h (unqualified_name_lookup_error): Declare it. + (begin_function_definition): Adjust prototype. + * lex.c (unqualified_name_lookup_error): New function, split out + from ... + (do_identifier): ... here. + * parse.y (parse_begin_function_definition): New function. + (fn.def1): Use it. + * semantics.c (begin_function_definition): Accept decl-specifiers + and attributes as separate parameters. + 2002-07-10 Jason Merrill <jason@redhat.com> PR c++/6255 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than modifying the old one. +2002-07-09 Mark Mitchell <mark@codesourcery.com> + + * cp-tree.h (constructor_name_p): Declare it. + (check_template_template_default_arg): Likewise. + * class.c (handle_using_decl): Use constructor_name_p. + * decl.c (grokdeclarator): Likewise. + * decl2.c (constructor_name_p): Define it. + * init.c (build_member_call): Use constructor_name_p. + * parse.y (template_parm): Use check_template_template_default_arg. + * pt.c (check_explicit_specialization): Use constructor_name_p. + * semantics.c (check_template_template_default_arg): New function. + 2002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> * pt.c (can_complete_type_without_circularity): Add static to function definition. -2002-07-05 Jim Wilson <wilson@redhat.com> +2002-07-08 Mark Mitchell <mark@codesourcery.com> + + * cp-tree.h (have_extern_spec): Declare it + * decl.c (have_extern_spec): Define it. + (start_decl): Eliminate use of used_extern_spec. + (start_function): Likewise. + * parse.y (have_extern_spec): Remove declaration. + (used_extern_spec): Likewise. + (frob_specs): Eliminate use of used_extern_spec. + (.hush_warning): Likewise. + +2002-07-07 Mark Mitchell <mark@codesourcery.com> + + * Make-lang.in (cp/parse.o): Depend on decl.h. + * cp-tree.h (do_decl_instantiation): Change prototype. + * parse.y: Include decl.h. + (parse_decl_instantiation): New function. + (explicit_instantiation): Use it. + * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR + and DECLSPECS. - * decl.c (mark_named_label_lists): Add missing & in call to - mark_binding_level. +2002-07-07 Roger Sayle <roger@eyesopen.com> + + * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for + constructor and destructor tests when passed a TEMPLATE_DECL. 2002-07-05 Jason Merrill <jason@redhat.com> @@ -525,11 +3034,14 @@ PR optimization/7145 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL. -2002-05-18 Jason Merrill <jason@redhat.com> +2002-07-05 Nathan Sidwell <nathan@codesourcery.com> - PR c++/6611 - * decl2.c (import_export_decl): If we clear - DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set. + Repair damage on weak-impared targets caused by my previous patch. + * cp-tree.h (import_export_tinfo): Add parameter. + * decl2.c (import_export_tinfo): Add parameter, post adjust + DECL_COMDAT. + * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by + import_export_tinfo. 2002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> @@ -539,13 +3051,22 @@ (build_vec_init): Flatten multi-dimensional array during cleanup. (build_vec_delete_1): Abort if the type of each element is array. +2002-07-03 Graham Stott <graham.stott@btinternet.com> + + * pt.c (instantiate_class_template): Fix typo. + +2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> + + * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused + by CVS conflict in my last patch. + 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> PR c++/6716 * pt.c (can_complete_type_without_circularity): New function. (instantiate_class_template): Use it. - * typeck2.c (incomplete_type_error): Improve error message - due to incomplete fields. + * typeck2.c (cxx_incomplete_type_diagnostic): Improve error + message due to incomplete fields. 2002-07-01 Mark Mitchell <mark@codesourcery.com> @@ -554,23 +3075,137 @@ applied to a type. * operators.def: Remove stale comment. +2002-06-30 Nathan Sidwell <nathan@codesourcery.com> + + * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ... + (CPTI_TYPE_INFO_PTR_TYPE): ... this. + (tinfo_decl_type): Replace with ... + (type_info_ptr_type): ... this. + (import_export_tinfo): Declare. + (tinfo_decl_p): Rename to ... + (unemitted_tinfo_decl_p): ... this. + * decl2.c (import_export_decl): Break out tinfo handling into ... + (import_export_tinfo): ... here. New function. + (finish_file): Adjust. + * rtti.c (TINFO_REAL_NAME): New macro. + (init_rtti_processing): Create the tinfo types. + (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr. + (get_tinfo_decl): Adjust. + (get_tinfo_ptr): New function. + (get_type_id): Use it. + (tinfo_base_init): Create vtable decl here, if it doesn't exist. + (ptr_initializer): Use get_tinfo_ptr. + (ptm_initializer): Likewise. + (synthesize_tinfo_var): Break into ... + (get_pseudo_ti_init): ... this. Just create the initializer. + (get_pseudo_ti_desc): .. and this. + (create_real_tinfo_var): Remove. + (create_pseudo_type_info): Don't create the vtable decl here. + (get_vmi_pseudo_type_info): Remove. + (create_tinfo_types): Adjust. + (tinfo_decl_p): Rename to ... + (unemitted_tinfo_decl_p): ... here. Adjust. + (emit_tinfo_decl): Adjust. Create the initializer. + 2002-06-27 Mark Mitchell <mark@codesourcery.com> PR c++/6695 * pt.c (tsubst_friend_class): Substitute into the context of the friend before using it. +2002-06-26 Mark Mitchell <mark@codesourcery.com> + + * cp-tree.h (xref_tag): Change prototype. + (handle_class_head): Likewise. + (build_x_component_ref): Likewise. + * decl.c (cxx_init_decl_processing): Adjust call to xref_tag. + (xref_tag): Take attributes as a separate parameter. + (xref_tag_from_type): Adjust call to xref_tag. + * decl2.c (build_expr_from_tree): Adjust call to + build_x_component_ref. + (handle_class_head): Take attributes as a separate parameter. + * parse.y (parse_xref_tag): New function. + (parse_handle_class_head): Likewise. + (primary): Use parse_xref_tag. + (class_head_decl): Use parse_handle_class_head. + (class_head_defn): Likewise. + * rtti.c (init_rtti_processing): Adjust call to xref_tag. + (build_dynamic_cast_1): Likewise. + (create_pseudo_type_info): Likewise. + (emit_support_tinfos): Likewise. + * typeck.c (build_object_ref): Adjust call to + build_x_component_ref. + (build_x_component_ref): Remove protect parameter. + +2002-06-25 Mark Mitchell <mark@codesourcery.com> + + * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS. + * class.c (handle_using_decl): Likewise. + (instantiate_type): Likewise. + * cp-tree.h (BASELINK_FUNCTIONS): New macro. + (xref_basetypes): Change prototype. + (begin_mem_initializers): New function. + (get_overloaded_fn): Likewise. + * decl.c (xref_basetypes): Simplify. + * error.c (dump_expr): Use BASELINK_FUNCTIONS. + * init.c (build_offset_ref): Likewise. + * parse.y (base_init): Use begin_mem_initializers(). + (structsp): Adjust call to xref_basetypes. + * pt.c (determine_specialization): Use BASELINK_FUNCTIONS. + (instantiate_class_template): Adjust call to xref_basetypes. + * semantics.c (begin_mem_initializers): New function. + * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS. + (really_overlaoded_fn): Likewise. + (get_overloaded_fn): New function.' + (get_first_fn): USe BASELINK_FUNCTIONS. + +2002-06-24 Mark Mitchell <mark@codesourcery.com> + + * cp-tree.h (SCALAR_TYPE_P): New macro. + (check_for_out_of_scope_variable): New function. + (at_class_scope_p): Likewise. + (finish_fname): Likewise. + * class.c (finish_struct): Use at_function_scope_p. + * decl.c (check_for_out_of_scope_variable): New function, split + out from do_identifier. + (finish_enum): Use at_function_scope_p. + * lex.c (do_identifier): Use check_for_out_of_scope_variable. + * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname. + (primary): Use at_function_scope_p. + * search.c (at_class_scope_p): New function. + * semantics.c (finish_fname): Likewise. + (check_multiple_declarators): Use at_function_scope_p. + +2002-06-23 Mark Mitchell <mark@codesourcery.com> + + * parse.y (parse_scoped_id): New function. + (primary): Use it. + * cp-tree.h (do_scoped_id): Adjust declaration. + * lex.c (do_scoped_id): Remove call to yylex. + * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id. + * typeck2.c (add_exception_specifier): Use tree_cons, rather than + expanding it inline. + 2002-06-23 Matt Thomas <matt@3am-software.com> * decl.c (finish_function): Change "#ifdef VMS_TARGET" to "#if VMS_TARGET". +2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * mangle.c (integer_type_codes): Const-ify. + 2002-06-20 Richard Henderson <rth@redhat.com> PR c++/6747 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early. Call put_var_into_stack. +2002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit + array size calculation. + 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> PR c++/6892 @@ -583,22 +3218,349 @@ BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template argument. +2002-06-19 Akim Demaille <akim@epita.fr> + + * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with + decl.h's TYPENAME. + * spew.c, lex.c: Adjust. + * parse.y (explicit_instantiation): Add empty action to override + the default $$ = $1 where it introduces a type clash. + +2002-06-14 Jason Merrill <jason@redhat.com> + + * semantics.c (begin_for_stmt): Push the 'for' scope before + adding the FOR_STMT. + + C++ ABI changes. + * class.c (build_base_field): Set DECL_PACKED. + (layout_class_type): Don't use tail padding of PODs. + * mangle.c (write_unqualified_name): Fix template conversion op + mangling. + 2002-06-16 Richard Henderson <rth@redhat.com> PR opt/6793 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test after template instantiation. +2002-06-16 Richard Henderson <rth@redhat.com> + + * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common. + +2002-06-15 Gabriel Dos Reis <gdr@codesourcery.com> + + * cp-tree.h (compiler_error): Remove declaration. + * lex.c (compiler_error): Remove definition. + +2002-06-14 Steve Ellcey <sje@cup.hp.com> + + * g++spec.c (LIBUNWIND): New. + (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set. + +2002-06-13 Jessica Han <jessica@cup.hp.com> + + * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN. + (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE. + (build_vbase_offset_vtbl_entries): Likewise. + * rtti.c (build_headof): Likewise. + (get_tinfo_decl_dynamic): Likewise. + (create_pseudo_type_info): Likewise. + +2002-06-12 Stan Shebs <shebs@apple.com> + + * mpw-config.in: Remove file, no longer used. + * mpw-make.sed: Ditto. + +2002-06-07 Zack Weinberg <zack@codesourcery.com> + + * decl2.c: Update call to cpp_handle_option. + 2002-06-07 H.J. Lu (hjl@gnu.org) * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT. +2002-06-06 Gabriel Dos Reis <gdr@codesourcery.com> + + * error.c (cp_error_at): Fix typo. + +2002-06-04 Gabriel Dos Reis <gdr@codesourcery.com> + + * error.c (cp_diagnostic_starter): Adjust call. + (maybe_print_instantiation_context): Change prototype to take a + 'diagnostic_info *'. + (print_instantiation_full_context): Likewise. + (print_instantiation_partial_context): Likewise. + (cp_diagnostic_starter): Likewise. + (cp_diagnostic_finalizer): Likewise. + (cp_print_error_function): Likewise. + (cp_printer): Take a secondary parameter as a 'text_info *'. + Remove output_state savings. Adjust calls. + +2002-06-03 Geoffrey Keating <geoffk@redhat.com> + + * pt.c (inline_parm_levels): Mark for GC. + + * mangle.c (start_mangling): Allocate G.substitutions here... + (init_mangle): ... rather than here. + (finish_mangling): Clear the varray pointer when done with it. + * spew.c (yylexstring): Don't use VARRAY_FREE. + * search.c (bfs_walk): Don't use VARRAY_FREE. + * decl2.c (pending_statics): Use gengtype to mark. + (deferred_fns): Likewise. + (ssdf_decls): Likewise. + (init_decl2): Delete. + * decl.c (pop_from_top_level): Don't use VARRAY_FREE. + (cxx_init_decl_processing): Don't call init_decl2. + (cxx_pop_function_context): Don't use VARRAY_FREE. + * cp-tree.h (struct saved_scope): No need for special marking + of varrays. + (struct language_function): Likewise. + (local_classes): Use gengtype to mark. + (init_decl2): Delete prototype. + * class.c (init_class_processing): Don't use + ggc_add_tree_varray_root. + (build_vtbl_initializer): Don't use VARRAY_FREE. + + * decl.c (typename_compare): Don't use same_type_p. + + * decl.c: Include hashtab.h instead of hash.h. + (typename_hash): Update to use htab_h. + (typename_compare): Likewise. + (typename_htab): Use gengtype to mark. + (build_typename_type): Update to use htab_h. + * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h. + + * Make-lang.in (gt-cp-tree.h): New rule. + (cp/tree.o): Depend on gt-cp-tree.h. + * config-lang.in (gtfiles): Add cp/tree.c. + * tree.c: Include gt-cp-tree.h. + (list_hash_table): Use gengtype to mark. + (init_tree): Use gengtype to mark trees. + + * Make-lang.in (cp/decl.o): Add debug.h dependency. + * call.c (struct z_candidate): Use gengtype. + (USER_CONV_CAND): Use WRAPPER_ZC. + (convert_class_to_reference): Use build_zc_wrapper. + (build_type_conversion_1): Likewise. + (build_over_call): Use WRAPPER_ZC. + (add_warning): Use build_zc_wrapper. + * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete. + * cp-tree.h (struct lang_identifier): Use gengtype. + (struct template_parm_index_s): Likewise. + (struct ptrmem_cst): Likewise. + (struct tree_binding): Likewise. + (struct tree_overload): Likewise. + (struct tree_srcloc): Likewise. + (struct tree_wrapper): Likewise. Also modify to have a pointer + to struct z_candidate rather than void. + (enum cp_tree_node_structure_enum): New. + (union lang_tree_node): New. + (cxx_mark_tree): Delete prototype. + (cp_tree_node_structure): New prototype. + (build_ptr_wrapper): Delete prototype. + (build_int_wrapper): Delete prototype. + (build_zc_wrapper): New prototype. + * decl.c: Include debug.h + (cxx_mark_tree): Delete. + (cp_tree_node_structure): New. + * tree.c (build_ptr_wrapper): Delete. + (build_int_wrapper): Delete. + (build_zc_wrapper): New. + + * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK): + Correct typo. Patch from k_fukui@highway.ne.jp. + + * semantics.c (current_stmt_tree): Update for change to + struct language_function. + (finish_mem_initializers): Likewise. + * decl.c (cxx_init_decl_processing): Don't set mark_lang_status. + * cp-tree.h (struct language_function): Rename from + cp_language_function. Change all uses. + (cp_function_chain): Don't need to cast. + + * class.c (duplicate_tag_error): Reset discriminator. + (check_bases_and_members): Update for data structure changes. + * cp-tree.h (struct lang_id2): Use gengtype. + (flagged_type_tree): Likewise. + (SET_LANG_ID): Use GGC on struct lang_id2. + (struct cp_language_function): Use gengtype. Remove field + 'x_vcalls_possible_p'. + (current_vcalls_possible_p): Delete. + (struct lang_type_header): New. + (struct lang_type_class): Rename from struct lang_type. Include + struct lang_type_header. + (struct lang_type_ptrmem): New. + (struct lang_type): New. + (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros. + (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros. + (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes. + (struct lang_decl_flags): Use gengtype. Add discriminators. + (struct lang_decl): Use gengtype. Add and use discriminators. + Update the macros that reference moved fields. + (LANG_DECL_U2_CHECK): New function. Use it when appropriate. + (SET_DECL_THUNK_P): Set discriminator too. + (clear_inline_text_obstack): Delete prototype. + (finish_inline_definitions): Delete prototype. + (mark_pending_inlines): Delete prototype. + (lang_check_failed): New prototype. + * decl.c (struct named_label_use_list): Use gengtype. + (struct named_label_list): Likewise. + (mark_binding_level): Delete. + (mark_named_label_lists): Delete. + (push_local_name): Set discriminator on DECL_LANG_SPECIFIC. + (cxx_init_decl_processing): Use generated marker routine. + (begin_destructor_body): Delete dead set to + current_vcalls_possible_p. + (mark_lang_function): Delete. + (mark_cp_function_context): Delete. + (lang_mark_tree): Use generated marker routines. + * decl2.c (start_objects): Set discriminator when setting + GLOBAL_INIT_PRIORITY. + * lex.c (retrofit_lang_decl): Set discriminators. + (copy_lang_type): Update for changes to lang_type structure. + (cp_make_lang_type): Set discriminator. + * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers. + * search.c: Include ggc.h. + * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it. + (finish_inline_definitions): Delete. + * spew.c (struct token): Use gengtype. + (struct token_chunk): New. + (struct unparsed_text): Use gengtype. Store tokens in chunks. + (struct feed): Use gengtype. + (feed_obstack): Delete. + (feed): Mark as GC root. + (pending_inlines): Mark as GC root. + (pending_inlines_tail): Likewise. + (processing_these_inlines): Likewise. + (token_obstack): Make static. + (first_token): Likewise. + (init_spew): Don't initialize deleted things; use gengtype for roots. + (clear_inline_text_obstack): Delete. + (feed_input): Use GC for struct feed. Update for changes to + struct unparsed_text. + (mark_pending_inlines): Delete. + (next_token): Rename from add_token. Change all callers. Update + for changes to struct unparsed_text. + (space_for_token): New. + (remove_last_token): New. + (alloc_unparsed_text): New. + (snarf_block): Take an unparsed_text. Update for changes to struct + unparsed_text. + (snarf_method): Update for changes to struct unparsed_text. + (snarf_defarg): Update for changes to struct unparsed_text. + * tree.c (lang_check_failed): New. + + * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h + gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules. + (cp/spew.o): Add dependency on gt-<filename>.h. + (cp/decl2.o): Add dependency on gt-<filename>.h. + (cp/call.o): Add dependency on gt-<filename>.h. + (cp/pt.o): Add dependency on gt-<filename>.h. + (cp/repo.o): Add dependency on gt-<filename>.h. + (cp/parse.o): Add dependency on gt-<filename>.h. + * call.c: Use gengtype for roots. + * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c + decl2.c parse.y pt.c repo.c spew.c. + * cp-tree.h: Use gengtype for roots. + (struct saved_scope): Use GGC, gengtype. + (cp_parse_init): Delete prototype. + (init_pt): Delete prototype. + * decl.c: Use gengtype for roots. + (mark_saved_scope): Delete. + (cxx_init_decl_processing): Don't call deleted initilisation + routines. + (signed_size_zero_node): Delete, unused. + * decl.h: Use gengtype for roots. + * decl2.c: Use gengtype for roots. + * lex.h: Use gengtype for roots. + * parse.y: Use gengtype for roots. + (cp_parse_init): Delete. + * pt.c: Use gengtype for roots. + (init_pt): Delete. + * repo.c: Use gengtype for roots. + * spew.c: Use gengtype for roots. + + * Make-lang.in: Allow for filename changes. Add gtype-cp.h. + (cp/decl.o): Add dependency on gtype-cp.h. + * decl.c: Remove use of add_deletable_root, use GTY marker instead. + Include gtype-cp.h. Allow for filename changes. + + * Make-lang.in (cp/gt-decl.h): Generate using gengtype. + (cp/decl.o): Add cp/gt-decl.h dependency. + * config-lang.in (gtfiles): New. + * tree.h: Rename struct binding_level to struct cp_binding_level. + * decl.c: Rename struct binding_level to struct cp_binding_level. + Include cp/gt-decl.h. + (struct cp_binding_level): Use gengtype. + (make_binding_level): Use GGC on struct cp_binding_level. + (mark_binding_level): Use gt_ggc_m_cp_binding_level. + (cxx_init_decl_processing): Mark free_binding_level as + deletable. + + * decl.c (mark_cp_function_context): Update calling sequence. + + * decl.c (start_function): Don't free 'struct + cp_language_function'. + (pop_cp_function_context): Likewise. + (save_function_data): Allocate it using GC. + * semantics.c (genrtl_start_function): Don't free 'struct + cp_language_function'. + +2002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk> + + * lang-specs.h: Use cpp_debug_options. + +2002-05-28 Zack Weinberg <zack@codesourcery.com> + + * mangle.c, tree.c: Include real.h. + * Make-lang.in: Update dependency lists. + +2002-05-25 Neil Booth <neil@daikokuya.demon.co.uk> + + * lex.c: Don't include c-lex.h. + * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h. + 2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk> + * spew.c (yyungetc, snarf_block): Remove indent_level handling. + +2002-05-22 Richard Henderson <rth@redhat.com> + + * decl.c (obscure_complex_init): Check for VAR_DECL + before using DECL_THREAD_LOCAL. + +2002-05-22 Richard Henderson <rth@redhat.com> + + * decl.c (check_tag_decl): Handle RID_THREAD. + (obscure_complex_init): Reject run-time init of tls. + (grokvardecl, grokdeclarator): Handle RID_THREAD. + * lex.c (reswords): Add __thread. + (rid_to_yy): Map RID_THREAD to SCSPEC. + +2002-05-22 Neil Booth <neil@daikokuya.demon.co.uk> + * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options. * cp-tree.h (cxx_post_options): Kill. * cp-lex.c (cxx_post_options): Kill. +2002-05-21 Richard Henderson <rth@redhat.com> + + * lex.c (rid_to_yy): Add RID_THREAD. + +2002-05-21 Alexandre Oliva <aoliva@redhat.com> + + * init.c (build_vec_init): Test for trivial copy-assignment when + copy-assigning arrays. + +2002-05-20 Andreas Jaeger <aj@suse.de> + + * init.c (build_default_init): Remove unused variable. + +2002-05-20 Alexandre Oliva <aoliva@redhat.com> + + * call.c (any_strictly_viable): New. + (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs. + 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing. @@ -610,11 +3572,47 @@ instantiation after explicit specialization. (do_type_instantiation): Likewise. -2002-05-09 Jason Merrill <jason@redhat.com> +2002-05-19 Alexandre Oliva <aoliva@redhat.com> + + * cp-tree.h (complete_type_or_diagnostic): Changed prototype, + renamed from... + (complete_type_or_else): ... this. Redefined as macro. + (cxx_incomplete_type_diagnostic): Declare. + (cxx_incomplete_type_error): Define as macro. + * init.c (build_delete): Warn about incomplete types other than + void, and use the built-in operator delete for them. + * typeck.c (complete_type_or_diagnostic): Renamed from + complete_type_or_else. Added warn_only argument, passed to... + * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print + warnings or errors depending on new warn_only argument. Renamed + from... + (cxx_incomplete_type_error): ... this. New implementation in + terms of cxx_incomplete_type_diagnostic. - * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P. +2002-05-18 Jason Merrill <jason@redhat.com> + + PR c++/6611 + * decl2.c (import_export_decl): If we clear + DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set. + +2002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> -2002-05-15 Alexandre Oliva <aoliva@redhat.com> + PR c++/6620 + * pt.c (verify_class_unification): Don't check if PARM is template + parameter dependent. Simplify. + (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template + parameter dependent expression. + +2002-05-14 Jason Merrill <jason@redhat.com> + + * rtti.c (get_tinfo_decl): Don't call comdat_linkage. + Do set DECL_COMDAT. + (synthesize_tinfo_var): Take the public decl. + (create_real_tinfo_var): Likewise. Check DECL_COMDAT. + (emit_tinfo_decl): Adjust. Call import_export_decl. + * decl2.c (import_export_decl): Simplify tinfo decl handling. + +2002-05-14 Alexandre Oliva <aoliva@redhat.com> * cp-tree.h (struct lang_type): Added non_zero_init. (CLASSTYPE_NON_ZERO_INIT_P): New macro. @@ -633,28 +3631,49 @@ (process_init_constructor): Create non-trivial zero-initializers for array members and class fields. -2002-05-14 Release Manager +2002-05-14 Neil Booth <neil@daikokuya.demon.co.uk> - * GCC 3.1 Released. + * lang-specs.h: Remove redundant -lang-c++. -2002-05-03 Jason Merrill <jason@redhat.com> +2002-05-13 Jason Merrill <jason@redhat.com> - * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h. + * class.c (build_vtbl_ref_1): Use fixed_type_or_null. + (fixed_type_or_null): See through reference vars. + (build_base_path): Vtable contents are constant. + * typeck.c (get_member_function_from_ptrfunc): Likewise. -2002-05-02 Mark Mitchell <mark@codesourcery.com> +2002-05-12 Jason Merrill <jason@redhat.com> - * init.c (perform_base_cleanups): Correct order of base class - cleanups. + * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created + structs are safe. -2002-05-01 Mark Mitchell <mark@codesourcery.com> +2002-05-09 Neil Booth <neil@daikokuya.demon.co.uk> - PR c++/6527 - * init.c (perform_base_cleanups): Emit cleanups in reverse order - of construction. + * cp-tree.h (flag_ansi): Remove. + * decl2.c (flag_ansi): Remove. + (cxx_decode_option): Set flag_iso and flag_undef. -2002-05-01 Gabriel Dos Reis <gdr@codesourcery.com> +2002-05-09 Jason Merrill <jason@redhat.com> - * error.c (dump_type): Be careful about implicit typenames. + * typeck.c (get_member_function_from_ptrfunc): Reorganize. + Use subtraction rather than a bitmask to get the index. + * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node. + + * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P. + +2002-05-07 Neil Booth <neil@daikokuya.demon.co.uk> + + * Make-lang.in (decl2.o): Update. + * cp-tree.h (warn_multichar): Remove. + * decl2.c: Include c-common.h. + (warn_multichar): Remove. + +2002-05-03 Jason Merrill <jason@redhat.com> + + * tree.c (build_cplus_array_type): Only const and volatile get + special handling. + + * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h. 2002-04-30 Mark Mitchell <mark@codesourcery.com> @@ -700,22 +3719,69 @@ PR c/6343 * decl.c (duplicate_decls): Call merge_weak. +2002-04-26 Richard Henderson <rth@redhat.com> + + * parse.y (malloced_yyss, malloced_yyvs): New. + (yyoverflow): Re-add. Set them. + (free_parser_stacks): New. + 2002-04-26 Mark Mitchell <mark@codesourcery.com> - PR c++/6479 + PR c++/6497 * method.c (do_build_assign_ref): Pass a derivation to build_method_call when calling base class assignment operators. -2002-04-24 Mark Mitchell <mark@codesourcery.com> +2002-04-26 Richard Henderson <rth@redhat.com> + + * parse.y (yyoverflow): Revert. - * mangle.c (write_type): Don't use TYPE_MAIN_VARIANT when writing - out an array type. - (write_CV_qualifiers_for_type): Use TYPE_QUALS, not cp_type_quals, - to determine qualifiers. +2002-04-26 Richard Henderson <rth@redhat.com> + PR c/3581 + * parse.y (string): Remove. Update all uses to use STRING + instead, and not call combine_strings. + * rtti.c (tinfo_name): Use fix_string_type. + * semantics.c (finish_asm_stmt): Don't call combine_strings. + * spew.c (yylexstring): New. + (read_token): Use it. + +2002-04-25 Richard Henderson <rth@redhat.com> + + PR c/2161 + * parse.y (yyoverflow): New. + +2002-04-25 Jason Merrill <jason@redhat.com> + + PR c++/5607 + * search.c (check_final_overrider): No longer static. + * class.c (update_vtable_entry_for_fn): Call it. + * cp-tree.h: Adjust. + +2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk> + + * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove. + * cp-tree.h (cxx_set_yydebug): Die. + * lex.c (YYDEBUG): Get from c-lex.h. + (cxx_set_yydebug): Remove. + * parse.y: Include c-lex.h. + (YYDEBUG): Get from c-lex.h. + +2002-04-24 Mark Mitchell <mark@codesourcery.com> + + PR c++/6438. * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs void. +2002-04-24 Neil Booth <neil@daikokuya.demon.co.uk> + + * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, + LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE): + Redefine. + * cp-tree.h (cp_attribute_table): Rename. + * decl.c (lang_attribute_table): Remove declaration. + (cxx_init_decl_processing): Don't set it. + * tree.c (cp_attribute_table): Rename. + 2002-04-24 Jason Merrill <jason@redhat.com> PR c++/6331 @@ -729,15 +3795,6 @@ * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i stuff for comdats. -2002-04-23 Jason Merrill <jason@redhat.com> - - PR c++/5504 - but re-breaks c++/411 - * init.c (push_base_cleanups): Rename to perform_base_cleanups. - Expand base cleanups now rather than pushing them. - * decl.c (begin_destructor_body): Don't call push_base_cleanups. - (finish_destructor_body): Call perform_base_cleanups. - * cp-tree.h: Adjust prototype. - 2002-04-23 Jakub Jelinek <jakub@redhat.com> * parse.y (check_class_key): Allow KEY to be union/enum/struct/class @@ -758,6 +3815,36 @@ * typeck.c (merge_types): Remember the cv-qualification of pointer types when merging them. +2002-04-20 Neil Booth <neil@daikokuya.demon.co.uk> + + * cp-lang.c (LANG_HOOKS_FUNCTION_INIT, + LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine. + * cp-tree.h (cxx_push_function_context, cxx_pop_function_context, + cxx_mark_function_context): New. + * decl.c (push_cp_function_context, pop_cp_function_context, + mark_cp_function_context): Rename for consistency. + (cxx_init_decl_processing): Don't set old hooks. + +2002-04-19 Neil Booth <neil@daikokuya.demon.co.uk> + + * call.c (convert_type_from_ellipsis): Rename, update. + * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine. + * cp-tree.h (convert_type_from_ellipsis): Rename. + * decl.c (cxx_init_decl_processing): Don't set hook. + +2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk> + + * call.c (build_new_method_call): Update. + * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine. + * cp-tree.h (cxx_incomplete_type_error): New. + * decl.c (grokdeclarator, grokparms): Update. + * decl2.c (check_classfn): Update. + * pt.c (tsubst): Update. + * typeck.c (complete_type_or_else, expr_sizeof, + decay_conversion): Update. + * typeck2.c (incomplete_type_error): Rename. + (add_exception_specifier): Update. + 2002-04-18 Jason Merrill <jason@redhat.com> PR c++/5658 @@ -782,25 +3869,47 @@ * decl.c (register_dtor_fn): Pass the address of dso_handle, not dso_handle itself, to __cxa_atexit. +2002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com> + + * error.c (cxx_print_error_function): Adjust call to macros. + 2002-04-14 Jakub Jelinek <jakub@redhat.com> * class.c (layout_virtual_bases): Do all dsize computation on trees. +2002-04-14 Jason Merrill <jason@redhat.com> + + * typeck.c (get_member_function_from_ptrfunc): Don't do + gratuitious division and multiplication on + ptrmemfunc_vbit_in_delta targets. + 2002-04-12 Mark Mitchell <mark@codesourcery.com> PR c++/5373. * semantics.c (finish_expr_stmt): Remember the type of the expression before any conversions are performed. +2002-04-12 Mark Mitchell <mark@codesourcery.com> + PR c++/5189. * call.c (add_template_candidate_real): Do not treat member templates as copy constructors. +2002-04-12 Mark Mitchell <mark@codesourcery.com> + * decl.c (duplicate_decls): Do not copy the RTL for a variable declaration if the old variable had an incomplete type and the new variable does not. (complete_vars): Do not call layout_decl for completed variables. +2002-04-12 Richard Sandiford <rsandifo@redhat.com> + + * decl.c (duplicate_decls): Don't try to unify an implicit typedef + with an explicit one. + (follow_tag_typedef): New. + (lookup_tag): Use it to extract the tag of an explicit typedef. + (xref_tag): Likewise. + 2002-04-11 Andrew Haley <aph@redhat.com> * typeck.c (type_after_usual_arithmetic_conversions): @@ -810,14 +3919,6 @@ if neither operand is one of the standard types, return the type of the first operand. -2002-04-12 Richard Sandiford <rsandifo@redhat.com> - - * decl.c (duplicate_decls): Don't try to unify an implicit typedef - with an explicit one. - (follow_tag_typedef): New. - (lookup_tag): Use it to extract the tag of an explicit typedef. - (xref_tag): Likewise. - 2002-04-10 Nathan Sidwell <nathan@codesourcery.com> PR c++/5507 @@ -829,6 +3930,9 @@ * semantics.c (genrtl_start_function): Don't free DECL_SAVED_FUNCTION_DATA for inline functions. + * init.c (build_member_call): For now, don't convert to + intermediate base if it would cause an error. + 2002-04-08 Paolo Carlini <pcarlini@unitus.it> * parse.y (namespace_qualifier, maybe_identifier, @@ -866,15 +3970,45 @@ * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is set before checking it. + PR c++/525 + * init.c (build_member_call): Use build_scoped_ref. + (resolve_offset_ref): Likewise. + * call.c (build_scoped_method_call): Likewise. + * tree.c (maybe_dummy_object): Kludge around current_class_type being + wrong. + * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm. + * cp-tree.h: Adjust. + + * init.c (push_base_cleanups): Just use build_scoped_method_call. + PR c++/6179 * method.c (implicitly_declare_fn): Pass unqualified type to synthesize_exception_spec. -2002-04-03 Jason Merrill <jason@redhat.com> +2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk> - PR c++/525 - * init.c (build_member_call): Convert to intermediate base even - with -pedantic. + * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. + * cvt.c: Update comment. + * init.c (expand_cleanup_for_base): Update. + * semantics.c (finish_parenthesized_expr): Update. + * typeck.c (cp_truthvalue_conversion): Update. + +2002-04-04 Jason Merrill <jason@redhat.com> + + * semantics.c (finish_eh_cleanup): New fn. + * cp-tree.h: Add prototype. + * init.c (perform_member_init, expand_cleanup_for_base): Use + finish_eh_cleanup. + * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove. + * cp-tree.h: Remove references. + * decl.c (begin_constructor_body, end_constructor_body): Likewise. + * dump.c (cp_dump_tree): Likewise. + * pt.c (tsubst_expr): Likewise. + * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove. + (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT. + * tree.c (cp_statement_code_p): Likewise. + + * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup. PR c++/5636 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on @@ -885,12 +4019,38 @@ specifiers. [METHOD_TYPE]: Use same code as FUNCTION_TYPE. +2002-04-03 Richard Henderson <rth@redhat.com> + + * cp-lang.c (cxx_warn_unused_global_decl): New. + (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New. + +2002-04-03 Neil Booth <neil@daikokuya.demon.co.uk> + + * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine. + * tree.c (init_tree): Don't set hook. + 2002-04-03 Roger Sayle <roger@eyesopen.com> PR c++/5998: * decl.c (duplicate_decls): Don't mess with assembler names when redeclaring builtin functions as static. +2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk> + + * call.c (build_addr_func): Update. + * class.c (resolve_address_of_overloaded_function): Update. + * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine. + * cp-tree.h (cxx_mark_addressable): New. + * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update. + * decl2.c (build_cleanup): Update. + * except.c (build_throw): Update. + * init.c (resolve_offset_ref): Update. + * pt.c (convert_nontype_argument): Update. + * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update. + * typeck.c (decay_conversion, build_array_ref, build_unary_op, + unary_complex_lvalue): Update. + (mark_addressable): Rename. + 2002-04-01 Roger Sayle <roger@eyesopen.com> PR c++/5998: @@ -898,6 +4058,40 @@ when) overwriting a built-in function. Don't use COPY_DECL_RTL, but follow the SET_DECL_RTL idiom used elsewhere in the function. +2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk> + + * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, + LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. + * decl.c (grokdeclarator): Update. + * mangle.c (write_integer_cst): Update. + * typeck.c (build_binary_op): Update. + +2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk> + + * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine. + * lex.c (cxx_init): Don't set hook. + +2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk> + + * Make-lang.in (error.o): Update. + * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine. + * cp-tree.h (struct diagnostic_context): Predeclare. + (cxx_print_error_function): New. + * error.c: Include langhooks-def.h. + (lang_print_error_function): Rename. Update. + (init_error): Don't set hook. + +2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk> + + * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): + Redefine. + * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks. + * decl.c (finish_enum): Similarly. + * error.c (dump_type): Similarly. + * lex.c (cxx_init): Similarly. + * mangle.c (write_builtin_type): Similarly. + * typeck.c (comptypes): Similarly. + 2002-03-28 Roger Sayle <roger@eyesopen.com> PR c++/5998: @@ -921,18 +4115,48 @@ * lex.c (do_scoped_id): Fail to find an identifier in the global namespace if its still anticipated. +2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk> + + * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine. + * cp-tree.h (cp_make_lang_type): Rename. + * lex.c (cp_make_lang_type): Rename. + (make_aggr_type): Update. + * tree.c (init_tree): Don't set make_lang_type_fn. + 2002-03-29 Jakub Jelinek <jakub@redhat.com> PR c++/6073 * class.c (finish_struct_1): Update static field's DECL_MODE even if its type is a variant of t. +2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk> + + * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine. + * cp-tree.h (cxx_insert_default_attributes): New. + * decl.c (insert_default_attributes): Rename. + 2002-03-27 Mark Mitchell <mark@codesourcery.com> PR c++/4884 * call.c (build_op_delete_call): Allow for the fact the placement may be a COMPOUND_EXPR. +2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk> + + * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine. + * cp-tree.h (init_cplus_expand): Remove. + (cxx_expand_expr): New. + * expr.c (cplus_expand_expr): Rename cxx_expand_expr, + fix prototype. + (init_cplus_expand): Remove. + * lex.c (cxx_init): Don't call init_cplus_expand. + +2002-03-26 Mark Mitchell <mark@codesourcery.com> + + PR c++/4884. + * init.c (build_new_1): Allow for the fact the result of + build_function_call may be a COMPOUND_EXPR. + 2002-03-26 Nathan Sidwell <nathan@codesourcery.com> PR c++/5682 @@ -945,27 +4169,68 @@ (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo. (dfs_marked_real_bases_queue_p): Likewise. -2002-03-26 Mark Mitchell <mark@codesourcery.com> +2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk> - PR c++/4884 - * init.c (build_new_1): Allow for the fact the result of - build_function_call may be a COMPOUND_EXPR. + * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine. + * cp-tree.h (cxx_mark_tree): New. + * decl.c (lang_mark_tree): Rename cxx_mark_tree. + +2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk> + + * cp-tree.h (cxx_maybe_build_cleanup): New. + * decl.c (destroy_local_var, hack_incomplete_structures): Update. + (maybe_build_cleanup): Rename cxx_maybe_build_cleanup. + * tree.c (build_target_expr): Update. + * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine. + +2002-03-24 Neil Booth <neil@daikokuya.demon.co.uk> -2002-03-25 Jakub Jelinek <jakub@redhat.com> + * decl2.c (cxx_decode_option): Handle -E. + * lang-specs.h (default_compilers): Preprocess with cc1plus. + * lex.c (cxx_init): Exit quickly if c_common_init returns NULL. + +2002-03-23 Jakub Jelinek <jakub@redhat.com> PR c++/6037 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node. +2002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com> + + * error.c (dump_type): Be careful about implicit typenames. + +2002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com> + + PR C++/3656 + * semantics.c (finish_base_specifier): Handle erronous base + classes. + +2002-03-22 Zack Weinberg <zack@codesourcery.com> + + * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test + REAL_IS_NOT_DOUBLE. + 2002-03-22 Jeff Knaggs <jknaggs@redhat.com> - * typeck.c (expand_ptrmemfunc_cst): Scale idx down to an index - into the vtable_entry array regardless of + * typeck.c (get_member_function_from_ptrfunc): Scale idx down to + an index into the vtable_entry array regardless of TARGET_PTRMEMFUNC_VBIT_LOCATION. 2002-03-21 Aldy Hernandez <aldyh@redhat.com> * tree.c (cp_cannot_inline_tree_fn): Same. +2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk> + + * cp-tree.h (pushdecl, pushlevel, poplevel, set_block, + insert_block, getdecls, global_bindings_p): New. + +2002-03-20 Nathan Sidwell <nathan@codesourcery.com> + + PR c++/4361 + * mangle.c (struct globals) Add internal_mangling_p member. + (write_template_param): Do internal mangling, if needed. + (mangle_conv_op_name_for_type): Request internal mangling. + 2002-03-20 Jason Merrill <jason@redhat.com> PR c++/2136 @@ -977,6 +4242,15 @@ PR c++/5118 * class.c (get_vfield_name): Use the constructor_name. +2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk> + + * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine. + * cp-tree.h (lang_printable_name): Rename. + * error.c (lang_decl_name): Use new hook. + * lex.c (cxx_init): Remove old hook. + * pt.c (tsubst_decl): Use new hook. + * tree.c (lang_printable_name): Rename. + 2002-03-18 Eric Botcazou <ebotcazou@multimania.com> PR c++/3882 @@ -984,11 +4258,6 @@ (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer only after recording the declaration. -2002-03-18 Ashif Harji <asharji@uwaterloo.ca> - - * lang-specs.h (compiler default_compilers): Add - -no-integrated-cpp flag to invoke an external cpp. - 2002-03-18 Jason Merrill <jason@redhat.com> PR c++/2039 @@ -1019,17 +4288,43 @@ * class.c (build_base_path): Virtual base layout is fixed in in-charge [cd]tors. +2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk> + + * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine. + * parse.y (yyparse): Remove macro. + +2002-03-17 Jason Merrill <jason@redhat.com> + PR c++/5757 * init.c (build_new_1): Pass the right pointer to op delete. -2002-03-15 Richard Henderson <rth@redhat.com> +2002-03-16 Nathan Sidwell <nathan@codesourcery.com> - * init.c (build_new_1): Use size_binop instead of cp_build_binary_op. + PR c++/4361 + * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated + conversion operators go. + (struct lang_decl_flags): Add template_conv_p and unused + bitfields. + (DECL_TEMPLATE_CONV_FN_P): New macro. + * call.c (build_user_type_conversion_1): Don't check second type + conversion of overload set first. + * class.c (add_method): Make sure templated conversion operators + all end up on slot 2. + * lex.c (do_identifier): A conversion operator token might be + satisfied by a templated conversion operator. + * pt.c (check_explicit_specialization): Use + CLASSTYPE_FIRST_CONVERSION_SLOT. + (template_parm_this_level_p): New function. + (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P. + * search.c (lookup_fnfields_1): Template conversions will be on + the first slot. + * typeck.c (build_component_ref): Preserve the type of an + conversion operator name on the overload type. + (build_x_function_call): Retrieve the conversion operator name. 2002-03-15 Richard Henderson <rth@redhat.com> - * decl.c (finish_function): Reapply accidentally reverted - 2002-02-28 patch. + * init.c (build_new_1): Use size_binop instead of cp_build_binary_op. 2002-03-15 Mark Mitchell <mark@codesourcery.com> @@ -1041,12 +4336,6 @@ * semantics.c (cp_expand_stmt): Likewise. * cp/tree.c (cp_statement_code_p): Likewise. -2002-03-15 Richard Henderson <rth@redhat.com> - - * decl.c: Include c-pragma.h. - (start_decl, start_function): Invoke maybe_apply_pragma_weak. - * Make-lang.in: Update dependencies. - 2002-03-15 Jason Merrill <jason@redhat.com> PR c++/5857 @@ -1064,6 +4353,12 @@ variables. * decl2.c (maybe_make_one_only): Also mark the decl as needed. +2002-03-14 Richard Henderson <rth@redhat.com> + + * decl.c: Include c-pragma.h. + (start_decl, start_function): Invoke maybe_apply_pragma_weak. + * Make-lang.in: Update dependencies. + 2002-03-14 Jakub Jelinek <jakub@redhat.com> PR c++/5908 @@ -1075,6 +4370,24 @@ * mangle.c (write_builtin_type): Handle 128-bit integers even if they are not a standard integer type. +2002-03-12 Richard Sandiford <rsandifo@redhat.com> + + * cp-tree.h (init_init_processing): Remove declaration. + * init.c (BI_header_type, init_init_processing): Remove old ABI stuff. + * decl.c (cxx_init_decl_processing): Don't call init_init_processing. + +2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * cp-lang.c (tree_code_type, tree_code_length, tree_code_name): + Define. + * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not + tree_code_length. + * lex.c (cplus_tree_code_type, cplus_tree_code_length, + cplus_tree_code_name): Delete. + (cxx_init): Don't call add_c_tree_codes, instead set + lang_unsafe_for_reeval. Don't try to copy into the various + tree_code arrays. + 2002-03-12 Nathan Sidwell <nathan@codesourcery.com> PR c++/5659 @@ -1102,11 +4415,35 @@ * typeck.c (build_static_cast): Compare non-qualified types with pointer to member conversions. +2002-03-11 Dan Nicolaescu <dann@ics.uci.edu> + Daniel Berlin <dan@dberlin.org> + + * cp-lang.c (ok_to_generate_alias_set_for_type): New function. + (cxx_get_alias_set): Use it. + +2002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * cp-tree.h (stabilize_expr): Prototype. + 2002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org> * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of conditional return void. +2002-03-08 Neil Booth <neil@daikokuya.demon.co.uk> + + * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine. + * cp-tree.h (cxx_unsave): New. + * tree.c (cp_unsave): Rename cxx_unsave, update prototype. + (init_tree): Update. + +2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of + explicit sizeof/sizeof. + * decl2.c (cxx_decode_option): Likewise. + * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise. + 2002-03-02 Nathan Sidwell <nathan@codesourcery.com> PR c++/775 @@ -1122,13 +4459,22 @@ 2002-03-01 Phil Edwards <pme@gcc.gnu.org> - * cp-tree.h (build_init): Remove prototype. - -2002-03-01 Phil Edwards <pme@gcc.gnu.org> - * cp-tree.h: Require __GNUC__ to be #defined. (build_init): Add missing prototype. +2002-03-01 Jason Merrill <jason@redhat.com> + + * except.c: Don't include decl.h or obstack.h. Do include + tree-inline.h. + (build_throw): Destroy temporaries from the thrown + expression before calling __cxa_throw. Construct a thrown + temporary directly into the exception object. + (stabilize_throw_expr): New function. + (wrap_cleanups_r): New function. + * tree.c (stabilize_expr): New function. + * init.c (build_init): New function. + * Make-lang.in (cp/except.o): Adjust .h deps. + 2002-02-28 Jason Merrill <jason@redhat.com> * search.c (lookup_base_r): Don't clear is_non_public just because @@ -1137,6 +4483,21 @@ * decl.c (finish_function): Only warn about missing return statement with -Wreturn-type. +2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk> + + * class.c (build_clone): Update. + * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine. + * cp-tree.h (cxx_dup_lang_specific_decl): New. + * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl. + (copy_decl): Update. + * method.c (make_thunk): Update. + +2002-02-27 Zack Weinberg <zack@codesourcery.com> + + * decl2.c: Delete traditional-mode-related code copied from + the C front end but not used, or used only to permit the + compiler to link. + 2002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org> PR c++/4093 @@ -1166,7 +4527,7 @@ * pt.c (convert_template_argument): Adjust make_typename_type return value. (tsubst): Adjust cp_build_qualified_type_real calls. - (check_cv_quals_for_unify): Cope with alowing bad qualifications + (check_cv_quals_for_unify): Cope with allowing bad qualifications on template type parms. (instantiate_decl): Recheck substitutions to give warnings on bad qualifications. @@ -2301,7 +5662,7 @@ Tue Nov 27 09:03:47 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * search.c (get_vbase_1): Remove. (get_vbase): Remove. (convert_pointer_to_vbase): Remove. - (lookup_base_recursive): New function. + (lookup_base_r): New function. (lookup_base): New function. * typeck.c (require_complete_type): Use lookup_base & build_base_path instead of convert_pointer_to. @@ -3144,7 +6505,7 @@ Fri Sep 21 08:16:19 2001 J"orn Rennecke <amylaar@redhat.com> PR c++/3621 * spew.c (yylex): Only copy the token's lineno, if it is - non-zero. + nonzero. 2001-07-26 Nathan Sidwell <nathan@codesourcery.com> @@ -3235,7 +6596,7 @@ Fri Sep 21 08:16:19 2001 J"orn Rennecke <amylaar@redhat.com> 2001-07-23 Graham Stott <grahams@redhat.com> - * cp/class.c (type_requires_array_cookie): Fix use of uninitialised + * cp/class.c (type_requires_array_cookie): Fix use of uninitialized variable has_two_argument_delete_p. 2001-07-21 Nathan Sidwell <nathan@codesourcery.com> @@ -3282,7 +6643,7 @@ Fri Sep 21 08:16:19 2001 J"orn Rennecke <amylaar@redhat.com> 2001-07-20 Nathan Sidwell <nathan@codesourcery.com> Remove old-abi remnants. Remove comments about old abi - behaviour. Remove references to 'new-abi' in comments. + behavior. Remove references to 'new-abi' in comments. * cp-tree.h: Adjust comments. (vbase_offsets_in_vtable_p): Delete. (vcall_offsets_in_vtable_p): Delete. @@ -4484,7 +7845,7 @@ Thu Apr 5 16:54:29 2001 J"orn Rennecke <amylaar@redhat.com> (maybe_commonize_var): Allow inlining functions even if they have static local variables, use comdat_linkage for them if flag_weak. (check_initializer): Call obscure_complex_init if - grok_reference_init returned non-zero. + grok_reference_init returned nonzero. (save_function_data): Clear x_local_names. (pop_cp_function_context): Free x_local_names. (mark_inlined_fns): Remove. @@ -5731,7 +9092,7 @@ Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> (cp_make_fname_decl): Use size_int, not build_int_2. (push_inline_template_parms_recursive): Likewise. (end_template_parm_list): Likewise. - (for_each_tempalte_parm): Do not use walk_tree_without_duplicates. + (for_each_template_parm): Do not use walk_tree_without_duplicates. (tsubst_template_parms): Use size_int, not build_int_2. (tsubst): Likewise. * rtti.c (get_vmi_pseudo_type_info): Likewise. @@ -6223,7 +9584,7 @@ Thu Nov 23 02:16:47 2000 J"orn Rennecke <amylaar@redhat.com> 2000-11-17 Nathan Sidwell <nathan@codesourcery.com> - * typeck2.c (incomplete_type_error): Reorganise to avoid + * typeck2.c (incomplete_type_error): Reorganize to avoid excessive diagnostics. 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu> @@ -11631,7 +14992,7 @@ Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> (add_method): Used functions are hidden by local functions. (check_bases_and_members): Handle using-decls before finalizing CLASSTYPE_METHOD_VEC. - * call.c (add_function_candidate): Add ctype parm; if non-zero, + * call.c (add_function_candidate): Add ctype parm; if nonzero, override the type of 'this' accordingly. (add_template_candidate, add_template_candidate_real): Add ctype parm. (convert_class_to_reference, build_user_type_conversion_1, |