OSDN Git Service

gcc:
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
index 7ce1498..b269645 100644 (file)
@@ -1,3 +1,429 @@
+2003-05-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
+       libiberty VA_ macros, always use stdarg.
+       * rtti.c (create_pseudo_type_info): Likewise.
+       * tree.c (build_min_nt, build_min): Likewise.
+
+2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * ptree.c (cxx_print_type, cxx_print_xnode): Use string
+       concatentation on HOST_WIDE_INT_PRINT_* format specifier to
+       collapse multiple function calls into one.
+       * tree.c (debug_binfo): Likewise.       
+
+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.
+
+       * parser.c (cp_parser_primary_expression): Convert a static data
+       member from reference.
+
+2003-05-15  Mark Mitchell  <mark@codesourcery.com>
+
+       * call.c (build_op_delete_call): Avoid creating unnecessary types.
+       * class.c (instantiate_type): Remove tests for tf_no_attributes.
+       * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
+       (COMPARE_NO_ATTRIBUTES): Remove.
+       * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
+
+       PR c++/8385
+       * semantics.c (finish_typeof): Refine type-dependency check.
+
+2003-05-13  Jason Merrill  <jason@redhat.com>
+
+       * typeck.c (build_modify_expr): Don't always stabilize the lhs and
+       rhs.  Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
+
+2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
+
+       * method.c (synthesize_method): Call push/pop_deferring_access_checks.
+
+2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
+
+       PR c++/10230, c++/10481
+       * semantics.c (finish_non_static_data_member): Handle when the
+       non-static member is not from a base of the current class type.
+
+2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
+
+       PR c++/10552
+       * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
+       template and has dependent context.
+
+2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
+
+       * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
+
+2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
+
+       PR c++/9252
+       * cp-tree.h (saved_scope): Remove check_access field.
+       (tsubst_flags_t): Remove tf_parsing.
+       * decl.c (maybe_push_to_top_level): Don't initialize
+       scope_chain->check_access.
+       (make_typename_type, make_unbound_class_template): Don't use
+       tf_parsing.
+       (register_dtor_fn): Use push/pop_deferring_access_checks
+       instead of scope_chain->check_access.
+       * method.c (use_thunk): Likewise.
+       * parser.c (cp_parser_explicit_instantiation
+       (cp_parser_constructor_declarator_p): Don't call
+       push/pop_deferring_access_checks here.
+       (cp_parser_template_argument, cp_parser_class_name): Don't use
+       tf_parsing.
+       (yyparse): Check flag_access_control.
+       * pt.c (instantiate_class_template): Call
+       push/pop_deferring_access_checks.
+       * semantics.c (push_deferring_access_checks): Propagate
+       dk_no_check.
+       (perform_or_defer_access_check): Make sure basetype_path is
+       a type before comparison.
+       * call.c (build_op_delete_call, build_over_call): Use
+       perform_or_defer_access_check.
+       * class.c (alter_access): Likewise.
+       * init.c (build_offset_ref): Likewise.
+       * lex.c (do_identifier): Likewise.
+       * method.c (hack_identifier): Likewise.
+       * search.c (lookup_member): Likewise.
+       * semantics.c (finish_non_static_data_member): Likewise.
+       (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
+       instead of flag_access_control.
+
+2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
+
+       PR c++/9554
+       * parser.c (cp_parser_class_name): Remove check_access parameter.
+       All caller adjusted.  Update declaration.
+       (cp_parser_lookup_name): Likewise.
+       * semantics.c (push_deferring_access_checks): Change parameter type
+       to enum deferring_kind.  All caller adjusted.
+       (resume_deferring_access_checks): Adjust to use new enum.
+       (stop_deferring_access_checks): Likewise.
+       (perform_or_defer_access_check): Likewise.
+       * cp-tree.h (deferring_kind): New enum.
+       (deferred_access): Adjust field type.
+       (push_deferring_access_checks): Update declaration.
+
+2003-05-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
+
+       PR c++/10555, c++/10576
+       * pt.c (lookup_template_class): Handle class template with
+       multiple levels of parameters when one of the levels contain
+       errors.
+
+2003-05-08  Jason Merrill  <jason@redhat.com>
+
+       * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
+       expression.  Undo some of the recent reorg.
+
+2003-05-07  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-07  Jason Merrill  <jason@redhat.com>
+
+       * call.c (build_conditional_expr): Don't assume that the folded
+       expression has result_type.
+
+2003-05-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
+
+       * typeck.c (build_unary_op): Deal with const qualifier in
+       invalid pointer-to-member earlier.
+
+2003-05-05  Jason Merrill  <jason@redhat.com>
+
+       PR c++/9537
+       * call.c (conditional_conversion): Build an RVALUE_CONV if
+       we're just changing the cv-quals.
+       (build_conditional_expr): Don't call convert to change
+       cv-quals.
+
+2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
+
+       PR c++/10496
+       * typeck.c (build_unary_op): Don't output const qualifier when
+       output invalid pointer-to-member diagnostics.
+
+2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
+
+       * decl.c: Fix typos.
+
+2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
+
+       PR c++/4494
+       * decl.c (start_function): Use same_type_p to check return type
+       of main.
+
+2003-05-03  Zack Weinberg  <zack@codesourcery.com>
+
+       PR c/10604
+       * cp/typeck.c (build_x_compound_expr): No need to check
+       extra_warnings as well as warn_unused_value.
+
+2003-05-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
+
+       PR c++/9364, c++/10553, c++/10586
+       * decl.c (make_typename_type): Don't crash on illegal code.
+
+2003-05-03  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * class.c (finish_struct): Use location_t and input_location
+       directly.
+       * decl.c (make_label_decl): Likewise.
+       (use_label): Likewise.
+       * decl2.c (warn_if_unknown_interface): Likewise.
+       (start_static_initialization_or_destruction): Likewise.
+       (generate_ctor_or_dtor_function): Likewise.
+       (finish_file): Likewise.
+       * error.c (print_instantiation_full_context): Likewise.
+       * init.c (create_temporary_var): Likewise.
+       * method.c (synthesize_method): Likewise.
+       * parser.c (cp_token): Likewise.
+       (cp_lexer_set_source_position_from_token): Likewise.
+       (cp_lexer_get_preprocessor_token): Likewise.
+       (cp_parser_statement): Likewise.
+       * pt.c (tsubst_friend_function): Likewise.
+       (instantiate_class_template): Likewise.
+       (tsubst_decl): Likewise.
+       (tsubst): Likewise.
+       (instantiate_decl): Likewise.
+       * semantics.c (begin_class_definition): Likewise.
+       (expand_body): Likewise.
+
+2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * class.c (finish_struct): Rename lineno to input_line.
+       * decl.c (push_binding_level, pop_binding_level,
+       suspend_binding_level, resume_binding_level, make_label_decl,
+       use_label, start_function): Likewise.
+       * decl2.c (warn_if_unknown_interface,
+       start_static_initialization_or_destruction,
+       generate_ctor_or_dtor_function, finish_file): Likewise.
+       * error.c (cp_line_of, print_instantiation_full_context,
+       print_instantiation_context): Likewise.
+       * except.c (check_handlers_1, check_handlers): Likewise.
+       * init.c (create_temporary_var): Likewise.
+       * method.c (use_thunk, synthesize_method): Likewise.
+       * parser.c (cp_lexer_set_source_position_from_token,
+       cp_lexer_get_preprocessor_token): Likewise.
+       * pt.c (push_tinst_level, pop_tinst_level,
+       tsubst_friend_function, instantiate_class_template, tsubst_decl,
+       tsubst, tsubst_expr, instantiate_decl): Likewise.
+       * semantics.c (genrtl_try_block, finish_label_stmt,
+       begin_class_definition, expand_body,
+       genrtl_finish_function): Likewise.
+       * tree.c (build_min_nt, build_min): Likewise.
+
+2003-05-01  Mark Mitchell  <mark@codesourcery.com>
+
+       * decl2.c (comdat_linkage): Don't externalize explicit
+       instantiations.
+
+2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
+
+       PR c++/10554
+       * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
+       is not NULL.
+
+2003-05-01  Steven Bosscher  <steven@gcc.gnu.org>
+
+       * cp-tree.h (struct lang_id2): Remove.  Move fields from here...
+       (struct lang_identifier): ... to here.
+       (LANG_ID_FIELD): Remove.
+       (SET_LANG_ID): Remove.
+       (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
+       (SET_IDENTIFIER_LABEL_VALUE): Likewise.
+       (IDENTIFIER_IMPLICIT_DECL): Likewise.
+       (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
+       (IDENTIFIER_ERROR_LOCUS): Likewise.
+       (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
+
+2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
+
+       PR c++/8772
+       * pt.c (convert_template_argument): Correct diagnostic.
+
+2003-04-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
+
+       PR c++/9432, c++/9528
+       * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
+
+2003-04-30  Garbiel Dos Reis  <gcc@integrable-solutions.net>
+
+       * decl.c (check_previous_goto_1): Adjust prototype.
+       (check_previous_goto): Adjust use.
+       (check_switch_goto): Likewise.
+       (use_label): Adjust.
+       (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
+       (struct named_label_use_list): Use location_t datatype.
+
+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.
+
+2003-04-29  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/10549
+       * class.c (layout_class_type): Mark overlong bitfields as having
+       the maximum size permitted by their type, after layout.
+
+       PR c++/10527
+       * error.c (dump_expr): Correctly handling of NEW_EXPR.4
+
+2003-04-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
+
+       * call.c (build_operator_new_call): Fix typo.
+       * lang-options.h: Likewise.
+
+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.
+
+       * 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.
+
+2003-04-27  Mark Mitchell  <mark@codesourcery.com>
+
+       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.
+
+       * decl.c (maybe_commonize_var): Make the code match the comments.
+       * pt.c (instantiate_decl): Move call to import_export_decl.
+
+2003-04-26  Mark Mitchell  <mark@codesourcery.com>
+
+       * decl2.c (finish_file): Fix merge botch.
+
+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-24  Sylvain Pion  <Sylvain.Pion@mpi-sb.mpg.de>
+
+       * call.c (print_z_candidates): Fix off by one error.
+
+2003-04-24  Nathan Sidwell  <nathan@codesourcery.com>
+
+       PR c++/10337
+       * call.c (joust): Don't warn about conversion ops that are exact
+       or cv-conversions. Rearrange to avoid multiple type comparisons.
+
+2003-04-23  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/10471
+       * call.c (build_cxx_call): Robustify.
+
+2003-04-23  Neil Booth  <neil@daikokuya.co.uk>
+
+       * Make-lang.in (lex.o): Remove mbchar.h.
+       * lex.c (MULTIBYTE_CHARS): Lose.
+       * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
+       in c-lex.c.
+
+2003-04-23  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/9847
+       * cp-tree.h (duplicate_tag_error): Remove.
+       * class.c (duplicate_tag_error): Remove.
+       * semantics.c (begin_class_definition): Return immediately for a
+       duplicate class definition.
+
+       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.
+
+       PR c++/10428
+       * decl.c (check_elaborated_type_specifier): New function, split
+       out from ...
+       (xref_tag): ... here.  Use the new function in more places.
+
+       * rtti.c (throw_bad_typeid): Use build_cxx_call.
+
+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.
+
+       * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
+       cheaper early exit.
+
+2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * cp/decl2.c (start_static_storage_duration_function): Take count
+       arg, don't check if it wraps round.
+       (generate_ctor_or_dtor_function): Add locus arg, use it.
+       (generate_ctor_and_dtor_functions_for_priority): Data arg is a
+       locus.
+       (finish_file): Set line numbers to past EOF for synthesized
+       functions.
+
+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-17  Roger Sayle  <roger@eyesopen.com>
+
+       PR c/10375
+       * decl.c (duplicate_decls): Preserve "const", "noreturn" and
+       "nothrow" function attributes.
+
+2003-04-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
+
+       PR c++/10347
+       * pt.c (type_dependent_expression_p): Handle array new.
+
 2003-04-15  Mark Mitchell  <mark@codesourcery.com>
 
        PR c++/10381