OSDN Git Service

gcc/cp:
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
index ec071ae..9ea3fe3 100644 (file)
@@ -1,3 +1,872 @@
+2004-09-23  Zack Weinberg  <zack@codesourcery.com>
+
+       * decl.c (grokfndecl): If ::main is found not to return int,
+       correct it after issuing a diagnostic.
+       (grokdeclarator): If the incoming type was error_mark_node, do
+       not complain about declaring something with no type.
+       (start_function): Change check for ::main not returning int to
+       an assertion, as grokfndecl now catches this when the user did it.
+       * init.c (perform_member_init, sort_mem_initializers)
+       (emit_mem_initializers): Make most diagnostics be issued on
+       the line of current_function_decl, not whatever the current
+       input line is.
+       * parser.c (cp_lexer_peek_token_emit_debug_info): Surround
+       definition and declaration with #ifdef ENABLE_CHECKING.
+       Avoid unnecessary use of fprintf.
+       (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
+       definitions to avoid warnings.
+       (cp_lexer_new_main): Add assertion that first token is not a
+       padding token.
+       (cp_lexer_new_from_token_array): Fold into ...
+       (cp_lexer_new_from_tokens): ... here.  Add assertion that
+       first token is not a padding token.
+       (cp_lexer_set_source_position_from_token): Move nearer to callers.
+       Remove unused lexer argument.
+       (cp_lexer_peek_token): Just print debugging report (if enabled)
+       and return lexer->next_token.
+       (cp_lexer_skip_purged_tokens): Delete.
+       (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
+       inline, simplify bodies.
+       (cp_lexer_peek_nth_token): Add debugging report a la
+       cp_lexer_peek_token.
+       (cp_lexer_consume_token): Correct commentary.  Advance over
+       purged tokens here.  Set current source position here, from
+       token to be returned.  Avoid unnecessary use of fprintf.
+       (cp_lexer_purge_token): Advance next_token pointer over this and
+       subsequent purged tokens.
+       (cp_parser_error): Adjust source position to that of the
+       peeked token.
+       (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
+       (cp_parser_string_literal): Remove some excessive cleverness.
+       (cp_parser_enum_specifier): Call start_enum before consuming
+       the opening brace.
+       (cp_parser_member_declaration): Make the "extra semicolon"
+       diagnostic consistently-worded with the other place this is
+       diagnosed.  Explicitly set the diagnostic location to the
+       location of the offending semicolon.
+       (cp_parser_enclosed_template_argument_list): Use %</%> quoting
+       in diagnostics.  Do not use cp_parser_require.  Set location
+       of diagnostics about improper use of '>>' to location of
+       offending token.
+       (cp_parser_late_parsing_for_member):
+       Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
+       (cp_parser_late_parsing_default_args): Likewise.  Manually
+       move some logic outside the loop.
+
+2004-09-23  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       PR c++/17618
+       * cvt.c (cp_convert_to_pointer): Return early when the type is
+       an error_mark_node.
+
+2004-09-21 Fariborz Jahanian <fjahanian@apple.com>
+
+       PR c++/13989
+       PR c++/9844
+       * decl.c (grokfndecl): Add new argument "attrlist", use it
+       to call cplus_decl_attributes.
+       (start_function): Remove call to cplus_decl_attributes.
+       * cvt.c (ocp_convert): Add support to use type conversion
+       function to vector type.
+       * parser.c (cp_parser_conversion_type_id): Add attributes, if any,
+       to the parsed type.
+
+2004-09-23  Paolo Bonzini  <bonzini@gnu.org>
+
+       PR c++/17596
+
+       * parser.c (cp_parser_token_tree_map_node,
+       cp_parser_pm_expression, cp_parser_additive_expression,
+       cp_parser_multiplicative_expression, cp_parser_shift_expression,
+       cp_parser_relational_expression, cp_parser_equality_expression,
+       cp_parser_and_expression, cp_parser_exclusive_or_expression,
+       cp_parser_inclusive_or_expression,
+       cp_parser_logical_and_expression,
+       cp_parser_logical_or_expression): Removed.
+       (enum cp_parser_prec, struct cp_parser_token_tree_map_node,
+       binops, binops_by_token): New.
+       (cp_parser_assignment_expression): Use cp_parser_binary_expression.
+       (cp_parser_new): Initialize binops_by_token.
+       (cp_parser_binary_expression): Rewritten.
+       (N_CP_TTYPES): New.
+
+2004-09-23  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * parser.c: Fix a comment typo.
+
+2004-09-23  Nathan Sidwell  <nathan@codesourcery.com>
+
+       PR c++/17620
+       * decl.c (xref_basetypes): Look through typedefs before checking
+       for duplicate base.
+
+2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
+       * decl2.c (cp_finish_file): Adjust tinfo decl emission loop.
+       * rtti.c (unemitted_tinfo_decls): Make a VEC(tree).
+       (init_rtti_processing): Initialize it to something realistic.
+       (get_tinfo_decl): Adjust pushing the new decl.
+
+       * cp-tree.h (struct lang_type_class): Remove marked flags, add
+       diamond_shaped and repeated_base flags.  Reorder to keep 8-bit blocks.
+       (TYPE_MARKED_P): New.
+       (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New.
+       (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
+       CLEAR_CLASSTYPE_MARKED_N): Remove.
+       (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*,
+       CLEAR_CLASSTYPE_MARKED_*): Remove.
+       * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond
+       shaped and repeated base properties.
+       * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET.
+       * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark,
+       class_hint_flags): Remove.
+       (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and
+       CLASSTYPE_DIAMOND_SHAPED_P.
+
+2004-09-21  Ziemowit Laski  <zlaski@apple.com>
+
+       * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from
+       cp-objcp-common.h.
+       (objcp_tsubst_copy_and_build): Reformat function signature.
+       * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise.
+       (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c.
+
+2004-09-21  Zack Weinberg  <zack@codesourcery.com>
+
+       * parser.c (cp_lexer_peek_token, cp_lexer_consume_token):
+       Don't handle CPP_PRAGMA tokens specially.
+       (cp_lexer_handle_pragma): Use cp_lexer_consume_token.  Don't
+       purge the token; do clear token->value after processing.  Add
+       assertion at beginning that token->value is nonzero.
+       (cp_parser_statement, cp_parser_declaration_seq_opt): Handle
+       CPP_PRAGMA as a full statement or declaration in its own right.
+
+2004-09-21  Matt Austern  <austern@apple.com>
+
+       PR c++/15049
+       * decl.c (grokvardecl): Accept declarations of global variables
+       using anonymous types.
+
+2004-09-21  Roger Sayle  <roger@eyesopen.com>
+
+       PR c++/7503
+       * tree.c (lvalue_p_1):  Disallow MIN_EXPR and MAX_EXPR as lvalues
+       if either operand has side-effects.
+       * typeck.c (rationalize_conditional_expr): Assert that neither
+       operand of MIN_EXPR or MAX_EXPR has side-effects.
+       (build_modify_expr):  Add support for MIN_EXPR and MAX_EXPR.
+       Check that the "lhs" is a valid lvalue, i.e. that neither operand
+       of a MIN_EXPR or MAX_EXPR has a side-effect.
+
+2004-09-21  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * cp-tree.h (struct lang_type_header): Remove
+       uses_multiple_inheritance field.
+       (TYPE_USES_MULTIPLE_INHERITANCE): Remove.
+       (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
+       (TYPE_USES_VIRTUAL_BASECLASSES): Remove.
+       (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
+       (TYPE_CONTAINS_VPTR_P): Likewise.
+       * call.c (add_template_candidate_real): Use
+       CLASSTYPE_VBASECLASSES.
+       (build_special_member_call): Likewise.
+       * class.c (finish_struct_bits): Remove
+       TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
+       bookkeeping.
+       (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
+       (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
+       bookkeeping.
+       (build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
+       (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
+       Likewise.
+       * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
+       TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
+       bookkeeping.
+       (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
+       * decl2.c (maybe_retrofit_in_chrg): Likewise.
+       * init.c (expand_member, push_base_cleanups): Likewise.
+       * pt.c (instantiate_class_template): Remove
+       TYPE_USES_MULTIPLE_INHERITANCE,
+       TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
+       bookkeeping.
+       * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
+       check.
+       * typeck2.c (process_init_constructor): Replace some sorrys with
+       asserts.
+
+2004-09-21  Andreas Tobler  <a.tobler@schweiz.ch>
+
+       * decl.c (reshape_init_array): Initialize max_index_cst to fix
+       bootstrap failure.
+
+2004-09-20  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/17530
+       * pt.c (tsubst): Fix parentheses to accomodate emacs.
+       (tsubst_baselink): If we get a single function, mark it as used.
+
+2004-09-20  Matt Austern <austern@apple.com>
+           Zack Weinberg  <zack@codesourcery.com>
+
+       * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
+       Apply lbasename to input_filename before passing to get_fileinfo.
+       * semantics.c (begin_class_definition): Likewise.
+       * lex.c (handle_pragma_interface): Apply get_fileinfo to the
+       correct filename.  Rename variables to be less confusing.
+       (handle_pragma_implementation): Likewise.  Disable "appears
+       after file is included" diagnostic.
+
+       * parser.c (struct cp_token): Add in_system_header fiag.
+       (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
+       (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
+       (CPP_NONE, cp_lexer_read_token): Delete.
+       (struct cp_lexer): Remove first_token, string_tokens,
+       main_lexer_p fields.  Clarify comments.
+       (struct cp_token_cache): Now just a pair of pointers.
+       (CP_LEXER_BUFFER_SIZE): New #define.
+       (CPP_PURGED): New fake token type.
+       (cp_lexer_new_from_token_array, cp_lexer_destroy)
+       (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens)
+       (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal):
+       New functions.
+       (cp_lexer_new_from_tokens): Now a simple wrapper around
+       cp_lexer_new_from_token_array.
+       (cp_lexer_set_source_position_from_token): Also update
+       in_system_header.
+       (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token):
+       Don't wrap round.
+       (cp_lexer_token_difference): Dont handle wrapping round.
+       (cp_lexer_new_main): Enable pragma deferral and raw strings,
+       read the entire translation unit through c_lex_with_flags into
+       this lexer's buffer, then turn raw strings back off again.
+       (cp_lexer_grow_buffer): Adjust for buffer no longer being circular.
+       (cp_lexer_get_preprocessor_token): No need to handle not being
+       the main lexer.  Set token->in_system_header too.
+       (cp_lexer_peek_token): Skip purged tokens.  Feed pragma tokens
+       to cp_lexer_handle_pragma.  No need to call cp_lexer_read_token.
+       (cp_lexer_peek_nth_token): Likewise.
+       (cp_lexer_purge_token): Mark the token PURGED, don't shift all
+       the other tokens down.
+       (cp_lexer_purge_tokens_after): Likewise.
+       (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry
+       about there being no tokens.
+       (cp_lexer_print_token): Revise to give useful information on
+       all tokens.
+       (struct cp_parser): Add field translate_strings_p.
+       (cp_parser_new): Initialize it.
+       (cp_parser_translation_unit): Destroy the lexer when done.
+       (cp_parser_parameter_declaration): Restructure saving of
+       default arguments.
+       (cp_parser_save_member_function_body): Likewise.
+       (cp_parser_check_for_invalid_template_id)
+       (cp_parser_nested_name_specifier_opt, cp_parser_template_id):
+       Adjust calls to cp_lexer_advance_token.
+       (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration):
+       No need to fiddle c_lex_string_translate.
+       (cp_parser_primary_expression, cp_parser_linkage_specification)
+       (cp_parser_asm_definition, cp_parser_asm_specification_opt)
+       (cp_parser_asm_operand_list, cp_parser_asm_clobber_list)
+       Use cp_parser_string_literal.
+       (cp_parser_attribute_list): Save and restore
+       parser->translate_strings_p, not c_lex_string_translate.
+       (cp_parser_cache_group): Delete.
+       (cp_parser_cache_group_1): Rename cp_parser_cache_group.  Do
+       not take a cache argument.
+
+2004-09-20  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
+
+       PR c++/14179
+       * decl.c (reshape_init): Extract array handling into...
+       (reshape_init_array): New function. Use integers instead of trees
+       for indices. Handle out-of-range designated initializers.
+
+2004-09-20  Steven Bosscher  <stevenb@suse.de>
+
+       * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
+       to null_node.
+
+2004-09-19  Mark Mitchell  <mark@codesourcery.com>
+
+       * decl2.c (determine_visibility): Allow class visibility
+       directives to override targetm.cxx.export_class_data.
+
+2004-09-18  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * call.c, semantics.c: Follow spelling conventions.
+       * class.c: Fix a comment typo.
+
+2004-09-16  Geoffrey Keating  <geoffk@apple.com>
+
+       PR pch/13361
+       * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
+       (handle_pragma_implementation): Likewise.
+
+2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
+           Zack Weinberg  <zack@codesourcery.com>
+
+       * cp-tree.def: Use tree_code_class enumeration constants
+       instead of code letters.
+       * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
+       * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
+       Update for new tree-class enumeration constants.
+
+2004-09-16  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/16002
+       * parser.c (cp_parser_simple_declaration): Commit to tentative
+       parses after seeing a decl-specifier.
+       (cp_parser_simple_declaration): Eliminate spurious message.
+       (cp_parser_init_declarator): Adjust error message.
+
+       PR c++/16029
+       * lex.c (unqualified_name_lookup_error): Mark the dummy
+       declaration as used.
+
+       PR c++/17501
+       * parser.c (cp_parser_nested_name_specifier): Do not resolve
+       typename types if the user explicitly said "typename".
+
+2004-09-16  Andrew MacLeod  <amacleod@redhat.com>
+
+       * error.c (dump_decl): Make sure there is lang_specific info before
+       checking for DTOR and CTOR decls.
+
+2004-09-16  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * class.c (copy_virtuals): Remove.
+       (build_primary_vtable): Use copy_list directly.
+       (build_secondary_vtable): Likewise.
+       (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
+       (create_vtable_ptr): Likewise.
+
+2004-09-16  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * search.c: Follow spelling conventions.
+
+2004-09-16  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * cp-tree.h (struct lang_type_class): Make pure_virtuals a
+       VEC(tree).
+       (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
+       comments.
+       * call.c (build_new_method_call): Don't confirm a pure virtual is
+       in CLASSTYPE_PURE_VIRTUALS.  Reorder checks. Make it a warning.
+       * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
+       (fixup_inline_methods, finish_struct): Likewise.
+       * decl.c (finish_method): Likewise.
+       * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
+       CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
+       * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
+       vector to avoid repeating the list in error messages.
+
+2004-09-15  Mark Mitchell  <mark@codesourcery.com>
+
+       * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
+       * cp-tree.h (cxx_comdat_group): Declare.
+       * decl.c (cxx_comdat_group): New function.
+
+2004-09-15  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * search.c (get_pure_virtuals): Remove unused variables.
+
+       * cp-tree.h (struct lang_decl_flags): Remove
+       needs_final_overrider.
+       (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
+       * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
+       * class.c (finish_struct_bits): Correct comment about
+       CLASSTYPE_PURE_VIRTUALS.
+       * search.c (get_pure_virtuals): Remove useless loop.
+
+2004-09-14  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/17324
+       * mangle.c (partially_mangled_name): New variable.
+       (partially_mangled_name_len): Likewise.
+       (save_partially_mangled_name): New function.
+       (restore_partially_mangled_name): Likewise.
+       (write_encoding): Save and restore partially mangled names around
+       calls to get_mostly_instantiated_function_type.
+       (write_unqualified_name): Likewise.
+
+2004-09-14  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * pt.c (unify): Replace gcc_unreachable with gcc_assert.
+
+2004-09-13  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/16162
+       * parser.c (cp_parser_id_expression): Correct value for
+       is_declarator.
+       (cp_parser_nested_name_specifier_opt): Look through typenames as
+       necessary.
+       (cp_parser_template_name): Honor check_dependency_p.
+
+       PR c++/16716
+       * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
+       Robustify.
+
+       PR c++/17327
+       * pt.c (unify): Add ENUMERAL_TYPE case.  Replace sorry with
+       gcc_unreacable.
+
+2004-09-12  Richard Henderson  <rth@redhat.com>
+
+       PR c++/16254
+       * semantics.c (maybe_cleanup_point_expr): Don't call fold.
+       * typeck.c (condition_conversion): Likewise.
+
+2004-09-11  Richard Henderson  <rth@redhat.com>
+
+       PR c++/17404
+       * pt.c (cur_stmt_expr): Move from tsubst_expr.
+       (tsubst_expr) <case STMT_EXPR>: Move ...
+       (tsubst_copy_and_build): ... here.
+
+2004-09-10  Zack Weinberg  <zack@codesourcery.com>
+
+       * cp-tree.h (interface_only, interface_unknown): Delete declarations;
+       comment explaining them moved to c-common.h.
+       * lex.c (interface_only, interface_unknown, extract_interface_info):
+       Delete definitions.
+       (cxx_finish): Don't reset interface_unknown.
+       (handle_pragma_interface): Don't set interface_only and
+       interface_unknown; just the like-named fields in finfo.
+       (handle_pragma_implementation): Adjust comment.
+       * decl2.c (cp_finish_file): Don't reset interface_only and
+       interface_unknown.
+       * method.c (synthesize_method): Don't reset interface_unknown or
+       call extract_interface_info.
+       * pt.c (pop_tinst_level): Don't call extract_interface_info.
+       * decl.c (start_cleanup_fn): Don't save or restore interface_only
+       and interface_unknown.
+       (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
+       and use the result instead of the interface_only/interface_unknown
+       globals.
+       (start_preparsed_function): Likewise.
+       * lex.c (cxx_make_type): Likewise.
+       * semantics.c (begin_class_definition): Likewise.
+       (expand_body): Don't call extract_interface_info.
+
+2004-09-10  Ziemowit Laski  <zlaski@apple.com>
+
+       * decl.c (objc_mark_locals_volatile): Make description of
+       routine more descriptive; only mark VAR_DECLs at each
+       binding level.
+
+2004-09-10  Richard Henderson  <rth@redhat.com>
+
+       PR c++/17386
+       * call.c (build_vfield_ref): Move...
+       * class.c (build_vfield_ref): ... here.  Convert datum to the
+       primary base containing the vptr.
+       (make_new_vtable): Simplify build_primary_vtable arguments.
+       (finish_struct_1): Do not duplicate TYPE_VFIELD.
+       * typeck.c (build_class_member_access_expr): Don't warn for
+       null object access to base fields.
+
+2004-09-10  Ziemowit Laski  <zlaski@apple.com>
+
+       * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
+       New functions, to be called from ObjC++.
+
+2004-09-10  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
+       name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
+       comment typos.
+
+2004-09-09  Ziemowit Laski  <zlaski@apple.com>
+
+       * typeck.c (build_c_cast): Preserve the cast if casting
+       to and from an Objective-C type.
+
+2004-09-09  Ziemowit Laski  <zlaski@apple.com>
+
+       * Make-lang.in (cp/typeck.o): Depend on c-common.h.
+       * typeck.c: Include c-common.h.
+       (comptypes): For RECORD_TYPEs, call objc_comptypes() and
+       return the result if nonnegative.
+
+2004-09-09  Zack Weinberg  <zack@codesourcery.com>
+
+       * decl2.c (import_export_class)
+       * lex.c (handle_pragma_interface):
+       Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
+
+2004-09-08  Ziemowit Laski  <zlaski@apple.com>
+
+       * Make-lang.in (cp/semantics.o): Depend on c-common.h.
+       * semantics.c: Include c-common.h.
+       (finish_compound_stmt): Call objc_clear_super_receiver().
+
+2004-09-08  Ziemowit Laski  <zlaski@apple.com>
+
+       * cp-tree.h (do_poplevel): New prototype.
+       * semantics.c (do_poplevel): Make externally visible.
+
+2004-09-08  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * cp-tree.h (tree_pair_s): Define a GC'd vector.
+       * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
+       * semantics.c (deferred_access): Likewise.
+
+2004-09-06  Daniel Jacobowitz  <dan@debian.org>
+
+       * semantics.c (expand_body): Assert that we are not nested.
+
+2004-09-06  Zack Weinberg  <zack@codesourcery.com>
+
+       * decl.c (build_enumerator): Use add_double and int_fits_type_p
+       instead of cp_build_binary_op, to avoid creating short-lived trees.
+       * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
+       lookahead instead of backtracking.  Move some code to avoid a
+       conditional branch.
+       (cp_parser_enum_specifier): Avoid duplication of effort with caller.
+       Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
+       (cp_parser_enumerator_list, cp_parser_enumerator_definition):
+       Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
+
+2004-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
+
+       * decl.c (grok_declarator): Remove a redundant semicolon.
+
+       * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
+       Correct comments describing function parameters.
+
+2004-09-03  Matt Austern  <austern@apple.com>
+       Compile speed improvement.
+       * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
+       Otherwise define a stub macro that expands to nothing.
+       (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set.  Otherwise
+       define a stub macro that expands to 0.
+       (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
+       (cp_lexer_stop_debugging): Likewise.
+       (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set.  Otherwise
+       define a stub macro that expands to NULL.
+       (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
+       (cp_lexer_new_from_tokens): Likewise.
+
+2004-09-03  Jan Hubicka  <jh@suse.cz>
+
+       * decl.c (finish_function): Clean out pointers we no longer need.
+
+2004-09-03  Jan Beulich  <jbeulich@novell.com>
+
+       * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
+       than "-lm".
+
+2004-09-02  Paul Brook  <paul@codesourcery.com>
+
+       * decl2.c (determine_visibility): Only check data visibility
+       for VAR_DECLS.
+
+2004-08-31  Mark Mitchell  <mark@codesourcery.com>
+
+       * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
+       * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
+       * decl2.c (determine_visibility): Honor
+       TARGET_CXX_EXPORT_CLASS_DATA.
+
+       * class.c (key_method): Rename to ...
+       (determine_key_method): ... this.
+       (finish_struct_1): Adjust accordingly.
+       * cp-tree.h (key_method): Declare.
+       * decl2.c (maybe_emit_vtables): Determine the key method here if
+       it has not already been done.
+
+2004-08-31  Ziemowit Laski  <zlaski@apple.com>
+
+       * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
+       (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
+       (cp/cp-decl.c): Do not depend on gtype-cp.h.
+       (cp/cp-objcp-common.o): New target.
+       * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
+       (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
+       cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
+       prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
+       respectively.
+       (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
+       LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
+       LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
+       LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
+       LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
+       LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
+       LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
+       LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
+       LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
+       LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
+       LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
+       LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
+       LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
+       LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
+       LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
+       LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
+       LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
+       LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
+       LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
+       LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
+       LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
+       LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
+       LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
+       LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
+       LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
+       LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
+       LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
+       LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
+       LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
+       LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
+       LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
+       hooks to cp-objcp-common.h.
+       (finish_file): New function.
+       * cp-objcp-common.c: New file.
+       * cp-objcp-common.h: New file.
+       * cp-tree.h (cp_finish_file): New prototype.
+       * decl.c: Do not include gtype-cp.h.
+       * decl2.c (finish_file): Rename to cp_finish_file.
+
+2004-08-31  Richard Henderson  <rth@redhat.com>
+
+       PR c++/17221
+       * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
+       (tsubst_copy_and_build): ... here.
+
+2004-08-30  Mark Mitchell  <mark@codesourcery.com>
+
+       * cp-tree.h (initialize_artificial_var): Declare.
+       * decl.c (initialize_artifical_var): New function.
+       * class.c (initialize_array): Remove.
+       (initialize_vtable): Use initialize_artificial_var.
+       (build_vtt): Likewise.
+       (build_ctor_vtbl_group): Likewise.
+
+2004-08-30  Richard Henderson  <rth@redhat.com>
+
+       * class.c (build_base_path): Use build_address directly.
+       * typeck.c (build_unary_op): Don't lower &a.b to pointer
+       arithmetic directly.
+       * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
+       means !initializer_constant_valid_p.
+
+2004-08-30  Richard Henderson  <rth@redhat.com>
+
+       * class.c (fixed_type_or_null): Use get_base_address before
+       assuming an ADDR_EXPR is non-null.
+
+2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * name-lookup.c (pop_binding, pushdecl,
+       set_identifier_type_value_with_scope, push_overloaded_decl,
+       arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
+       * parser.c (cp_parser_diagnose_invalid_type_name,
+       cp_parser_postfix_expression, cp_parser_unary_expression,
+       cp_parser_check_declarator_template_para): Likewise.
+       * pt.c (push_inline_template_parms_recursive,
+       check_explicit_specialization, convert_nontype_argument,
+       coerce_template_template_parms, uses_template_parms,
+       instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
+       tsubst_expr, instantiate_template,
+       maybe_adjust_types_for_deduction, type_unification_real,
+       resolve_overloaded_unification, template_decl_level,
+       type_dependent_expression_p): Likewise.
+       * search.c (lookup_base_r): Likewise.
+       * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
+       * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
+       verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
+       * typeck.c (common_type, get_member_function_from_ptrfunc,
+       build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
+       * typeck2.c (cxx_incomplete_type_diagnostic,
+       split_nonconstant_init_1, store_init_value,
+       process_init_constructor): Likewise.
+
+2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * call.c (check_dtor_name): Replace abort with gcc_assert or
+       gcc_unreachable.
+       (build_call, add_builtin_candidate, build_new_op,
+       convert_like_real, build_over_call, in_charge_arg_for_name,
+       source_type, joust): Likewise.
+       * class.c (build_simple_base_path, get_vcall_index,
+       finish_struct_1, instantiate_type, get_enclosing_class,
+       add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
+       * cp-gimplify.c (cp_genericize): Likewise.
+       * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
+       * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
+       * decl.c (poplevel, make_unbound_class_template, reshape_init,
+       check_special_function_return_type, grokdeclarator,
+       grok_op_properties, tag_name, xref_tag, start_preparsed_function,
+       finish_function): Likewise.
+       * decl2.c (grokfield, maybe_emit_vtables):Likewise.
+       * error.c (dump_global_iord, dump_decl, dump_template_decl,
+       language_to_string): Likewise.
+       * except.c (choose_personality_routine): Likewise.
+       * friend.c (do_friend): Likewise.
+       * g++spec.c (lang_specific_driver): Likewise.
+       * init.c (build_zero_init, expand_default_init, build_new_1,
+       build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
+       * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
+       * mangle.c (add_substitution, write_unscoped_name,
+       write_template_prefix, write_identifier,
+       write_special_name_destructor, write_type, write_builtin_type,
+       write_expression, write_template_param,
+       write_java_integer_type_codes): Likewise.
+       * method.c (implicitly_declare_fn): Likewise.
+
+2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
+       (BINFO_INDIRECT_PRIMARY_P): Remove.
+       * class.c (determine_primary_base): Rename to ...
+       (determine_primary_bases): ... here.  Set all primary bases.
+       (set_primary_base): Remove.
+       (mark_primary_bases): Remove.
+       (build_simple_base_path, walk_subobject_offsets,
+       propagate_binfo_offsets, end_of_class): Adjust.
+       (layout_class_type): Rename determine_primary_base call.
+       (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
+       to type_as_string.
+       (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
+       build_rtti_vtbl_entries): Adjust.
+       * init.c (build_vtbl_address): Adjust.
+
+       * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
+
+2004-08-28  Ziemowit Laski  <zlaski@apple.com>
+
+       * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
+       CXX_AND_OBJCXX_OBJS.
+       (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
+       separately on the link line.
+
+2004-08-28  Jason Merrill  <jason@redhat.com>
+
+       * decl.c (expand_static_init): Avoid bogus warnings.
+
+2004-08-27  Jason Merrill  <jason@redhat.com>
+
+       PR c++/16851
+       * tree.c (stabilize_init): See through a COMPOUND_EXPR.
+
+       PR c++/13684
+       * decl.c (expand_static_init): Use thread-safety API.
+       (register_dtor_fn): Return the call, don't expand it.
+       * tree.c (add_stmt_to_compound): New fn.
+       (stabilize_call): Use it.
+
+2004-08-27  Richard Henderson  <rth@redhat.com>
+
+       * cp-tree.def (OFFSETOF_EXPR): New.
+       * parser.c (cp_parser_builtin_offsetof): Either built an
+       OFFSETOF_EXPR, or call fold_offsetof immediately.
+       * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
+
+2004-08-27  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * call.c (validate_conversion_obstack): Replace
+       my_friendly_assert with gcc_assert or gcc_unreachable.
+       (direct_reference_binding, merge_conversion_sequences,
+       build_user_type_conversion_1, perform_overload_resolution,
+       build_op_delete_call, enforce_access, call_builtin_trap,
+       build_over_call, build_special_member_call, build_new_method_call,
+       initialize_reference): Likewise.
+       * class.c (build_base_path, build_primary_vtable, alter_access,
+       check_bases, update_vtable_entry_for_fn, layout_empty_base,
+       clone_function_decl, adjust_clone_args,
+       type_requires_array_cookie, include_empty_classes,
+       finish_struct_1, resolve_address_of_overloaded_function,
+       instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
+       dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
+       accumulate_vtbl_inits, build_vtbl_initializer,
+       build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
+       * cvt.c (build_up_reference, convert_to_reference): Likewise.
+       * decl.c (poplevel, duplicate_decls, make_typename_type,
+       cxx_init_decl_processing, reshape_init, check_initializer,
+       make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
+       expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
+       grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
+       xref_basetypes, start_preparsed_function, save_function_data,
+       finish_function, finish_method, maybe_register_incomplete_var,
+       complete_vars): Likewise.
+       * decl2.c (grok_array_decl, check_member_template,
+       check_classfn, finish_static_data_member_decl, coerce_new_type,
+       coerce_delete_type, import_export_class, decl_needed_p,
+       determine_visibility, import_export_decl, build_cleanup,
+       start_static_initialization_or_destructi, do_static_destruction,
+       prune_vars_needing_no_initialization,
+       build_offset_ref_call_from_tree): Likewise.
+       * error.c (dump_decl, dump_expr): Likewise.
+       * init.c (finish_init_stmts, build_zero_init,
+       expand_virtual_init, expand_default_init, expand_aggr_init_1,
+       build_offset_ref, build_new_1, build_delete, build_vbase_delete):
+       Likewise.
+       * mangle.c (write_method_parms, write_template_args,
+       write_expression, write_template_arg): Likewise.
+       * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
+       * name-lookup.c (pop_binding, begin_scope, leave_scope,
+       resume_scope, push_using_decl, validate_nonmember_using_decl,
+       is_ancestor, poplevel_class, set_inherited_value_binding_p,
+       push_class_level_binding, do_class_using_decl, push_namespace,
+       pop_namespace, add_using_namespace, ambiguous_decl,
+       lookup_namespace_name, lookup_type_current_level,
+       maybe_process_template_type_declaration): Likewise.
+       * parser.c (cp_lexer_peek_nth_token,
+       cp_parser_parse_and_diagnose_invalid_typ,
+       cp_parser_translation_unit, cp_parser_template_id,
+       cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
+       * pt.c (push_access_scope, finish_member_template_decl,
+       push_inline_template_parms_recursive, add_outermost_template_args,
+       get_innermost_template_args, begin_explicit_instantiation,
+       end_explicit_instantiation, retrieve_specialization,
+       is_specialization_of, is_specialization_of_friend,
+       register_specialization, check_explicit_specialization,
+       comp_template_parms, process_template_parm,
+       process_partial_specialization, convert_nontype_argument,
+       coerce_template_template_parms, coerce_template_parms,
+       mangle_class_name_for_template, lookup_template_function,
+       lookup_template_class, instantiate_class_template, tsubst_decl,
+       tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
+       instantiate_template, fn_type_unification, type_unification_real,
+       get_template_base, regenerate_decl_from_template,
+       template_for_substitution, instantiate_decl,
+       get_mostly_instantiated_function_type, dependent_scope_ref_p,
+       value_dependent_expression_p, resolve_typename_type): Likewise.
+       * repo.c (repo_emit_p): Likewise.
+       * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
+       create_tinfo_types, emit_tinfo_decl): Likewise.
+       * search.c (lookup_base_r, lookup_base, lookup_field_1,
+       dfs_access_in_type, build_baselink, lookup_member,
+       adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
+       * semantics.c (perform_or_defer_access_check,
+       finish_non_static_data_member, finish_stmt_expr_expr,
+       finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
+       finish_template_template_parm, finish_member_declaration,
+       emit_associated_thunks): Likewise.
+       * tree.c (build_target_expr_with_type, force_target_expr,
+       copy_binfo, get_first_fn, cp_tree_equal): Likewise.
+       * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
+       cxx_sizeof_or_alignof_type, perform_integral_promotions,
+       build_class_member_access_expr, finish_class_member_access_expr,
+       build_ptrmemfunc_access_expr, build_unary_op,
+       unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
+       build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
+       * typeck2.c (complete_type_check_abstract,
+       abstract_virtuals_error, process_init_constructor,
+       add_exception_specifier): Likewise.
+
+2004-08-27  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * class.c (build_vtbl_initializer): Use ssize_int.
+       * decl.c (complete_array_type): Likewise.
+       * method.c (finish_thunk): Likewise.
+       * search.c (get_dynamic_base_type): Likewise.
+
+2004-08-26  Richard Henderson  <rth@redhat.com>
+
+       * cp-tree.h (DECL_FIELD_IS_BASE): New.
+       * class.c (build_base_field): Set it.
+       (build_simple_base_path): Use it.
+       (fixed_type_or_null): Don't consider base fields definitive.
+
 2004-08-25  Roger Sayle  <roger@eyesopen.com>
 
        PR middle-end/16693
 
 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
 
-
        * call.c (convert_class_to_reference): Adjust build_int_cst calls.
        (build_user_type_conversion_1, convert_like_real,
        build_java_interface_fn_ref, build_special_member_call): Likewise.
        build_dynamic_cast_1, ptr_initializer, ptm_initializer,
        get_pseudo_ti_init): Likewise.
        * search.c (get_dynamic_cast_base_type): Likewise.
-       
+
 2004-08-25  Zack Weinberg  <zack@codesourcery.com>
 
        * class.c, search.c: Remove references to DWARF_DEBUG.
 
        * repo.c (extract_string): Reset backquote after one character.
        (get_base_filename): Fix indentation.
+
 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
 
        * decl.c (cxx_init_decl_processing): Adjust