blob: 602745f7ede823b948e1fea2299d297d38b7a3b8 [file] [log] [blame]
2004-12-31 Richard Henderson <rth@redhat.com>
PR middle-end/17799
* call.c (make_temporary_var_for_ref_to_temp): Set DECL_IGNORED_P.
* class.c (build_vtable): Don't conditionallize setting it
based on DWARF2_DEBUG.
(layout_class_type): Set DECL_IGNORED_P.
* decl2.c (get_guard): Likewise.
* rtti.c (get_tinfo_decl, build_lang_decl): Likewise.
* tree.c (build_local_temp): Likewise.
2004-12-30 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (cp_declarator): Split "name" field into
qualifying_scope and unqualified_name.
* decl.c (get_scope_of_declarator): Adjust accordingly.
(grokdeclarator): Likewise.
* decl2.c (grokfield): Likewise, and adjust call to
do_class_using_decl.
* name-lookup.c (do_class_using_decl): Split "decl" into
"scope" and "name". Remove unnecessary code.
* name-lookup.h (do_class_using_decl): Adjust declaration.
* parser.c (make_id_declarator): Split "id" into qualifying_scope
and unqualified_name.
(cp_parser_using_declaration): Adjust call to do_class_using_decl.
(cp_parser_direct_declarator): Adjust to handle the fact that
cp_parser_declarator_id no longer returns a SCOPE_REF.
(cp_parser_direct_declarator): Likewise.
(cp_parser_declarator_id): Do not create a SCOPE_REF for qualified
names.
(cp_parser_member_declaration): Adjust call to make_id_declarator.
(cp_parser_check_declarator_template_parameters): Do not expect a
SCOPE_REF.
* decl.c (duplicate_decls): Call ggc_free on declarations we will
not be needing any longer.
PR c++/19190
* cvt.c (convert_to_void): Do not use STRIP_NOPs.
2004-12-28 Richard Henderson <rth@redhat.com>
PR inline-asm/15740
* semantics.c (finish_asm_stmt): Resolve asm names. Validate input
constraints. Mark memory inputs addressable.
2004-12-27 Jason Merrill <jason@redhat.com>
* decl.c (expand_static_init): Don't use shortcut if
targetm.relaxed_ordering.
2004-12-27 Mark Mitchell <mark@codesourcery.com>
PR c++/19149
* decl.c (check_tag_decl): Robustify.
2004-12-23 Mark Mitchell <mark@codesourcery.com>
PR c++/17595
* parser.c (cp_parser_error): Issue better messages about
#pragma in locations where it is not permitted.
PR c++/17413
* pt.c (check_instantiated_args): Remove bogus SFINAE code.
* cvt.c (convert_to_void): Fix typo in comment.
2004-12-23 Alexandre Oliva <aoliva@redhat.com>
PR c++/18962
* pt.c (check_explicit_specialization): Use the argument list from
the definition in a template function specialization definition.
2004-12-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/18733
* pt.c (check_explicit_specialization): Use special logic to validate
befriended specializations.
2004-12-22 Mark Mitchell <mark@codesourcery.com>
* rtti.c (emit_support_tinfos): Avoid using C99 semantics.
PR c++/18464
* call.c (build_this): In templates, do not bother with
build_unary_op.
* typeck.c (unary_complex_lvalue): In a template, always refuse
simplifications.
PR c++/18492
* cp-gimplify.c (cp_genericize): Relax assertion.
PR c++/11224
* cvt.c (convert_to_void): Warn about unused values.
PR c++/18257
* rtti.c (emit_support_tinfos): On systems without weak symbols,
emit the runtime library type-info objects as non-COMDAT.
2004-12-21 Mark Mitchell <mark@codesourcery.com>
PR c++/18378
* call.c (convert_like_real): Do not permit the use of a copy
constructor to copy a packed field.
PR c++/19063
* decl.c (grokdeclarator): Return error_mark_node, not
void_type_node, to indicate errors.
* parser.c (cp_parser_template_parameter_list): Robustify.
(cp_parser_template_parameter): Likewise.
PR c++/19034
* tree.c (cp_tree_equal): Handle OVERLOAD.
2004-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
* decl.c (define_label): Use POP_TIMEVAR_AND_RETURN.
* name-lookup.c (pushdecl_class_level): Likewise.
2004-12-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
* name-lookup.c (pushtag): Add missing POP_TIMEVAR_AND_RETURN.
2004-12-21 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/18984
* cp-gimplify.c (cp_genericize_r): Don't insert first but instead
check to see if contains the pointer. Insert the statement before
returning.
2004-12-21 Nathan Sidwell <nathan@codesourcery.com>
PR c++/14075
* decl.c (check_initializer): Check string initializer of array is
not parenthesized.
* cp-tree.h (PAREN_STRING_LITERAL_P): New.
* semantics.c (finish_parenthesized_expr): Mark a STRING_CST.
* error.c (dump_expr): <STRING_CST case> Add parens, if needed.
* cp-tree.def (TEMPLATE_TYPE_PARM,
BOUND_TEMPLATE_TEMPLATE_PARM, TYPE_OF_TYPE, TYPENAME_TYPE): Reorder
for better code efficiency.
* cp-tree.h (CLASS_TYPE_P): Short circuit IS_AGGR_TYPE check.
(CAN_HAVE_FULL_LANG_DECL_P): Reorder for better optimization.
(INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P,
INTEGRAL_OR_ENUMERATION_TYPE_P, SCALAR_TYPE_P,
CP_AGGREGATE_TYPE_P, TYPE_PTROB_P, TYPE_REF_OBJ_P,
TYPE_PTROBV_P): Likewise.
PR c++/18975
* method.c (do_build_copy_constructor): Refactor. Don't const
qualify a mutable field.
(do_build_assign_ref): Likewise.
2004-12-20 Matt Austern <austern@apple.com>
PR c++/19044
* decl.c (make_rtl_for_nonlocal_decl): Use
set_builtin_user_assembler_name.
2004-12-19 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (note_decl_for_pch): New function.
* class.c (build_clone): Call note_decl_for_pch.
* semantics.c (finish_member_declaration): Likewise.
(note_decl_for_pch): New function.
2004-12-17 Steven Bosscher <stevenb@suse.de>
* init.c (build_zero_init): max_index is the number of
elements, minus 1.
2004-12-17 Nathan Sidwell <nathan@codesourcery.com>
PR c++/18721
* class.c (add_method): Do not push conversion operators into a
binding level.
* cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE_TYPE): Reformat.
* error.c (dump_decl): <TYPE_DECL case> Remove extraneous braces.
2004-12-16 Nathan Sidwell <nathan@codesourcery.com>
PR c++/18905
* cp-tree.h (integral_constant_value): Declare.
* call.c (null_ptr_cst_p): Use integral_constant_value, not
decl_constant_value.
(convert_like_real): Likewise.
* class.c (check_bitfield_decl): Likewise.
* cvt.c (ocp_convert): Likewise.
(convert): Remove unnecessary decl_constant_value call.
* decl.c (compute_array_index_type): Use integral_constant_value,
not decl_constant_value.
(build_enumerator): Likewise.
* decl2.c (grokfield): Likewise.
* init.c (decl_constant_value): Simplify.
(integral_constant_value): New.
* pt.c (fold_decl_constant_value): Use integral_constant_value,
remove subsequent check.
(tsubst): Use integral_constant_value, not decl_constant_value.
(tsubst_copy, unify): Likewise.
* typeck.c (decay_conversion): Likewise.
(build_compound_expr): Remove unnecessary decl_constant_value
calls.
(build_static_cast_1, build_reinterpret_cast_1):
(convert_for_assignment): Remove comment about not calling
decl_constant_value.
2004-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/18825
* pt.c (instantiate_class_template): Set input_location for
friend function.
(tsubst_friend_function): Don't set input_location here.
Make sure the context is complete if necessary.
2004-12-15 Nathan Sidwell <nathan@codesourcery.com>
PR c++/18981
* parser.c (cp_parser_lookup_name): Remove unneeded TYPENAME_TYPE
flag setting.
2004-12-14 Mark Mitchell <mark@codesourcery.com>
PR c++/18738
* decl.c (make_typename_type): Do not handle namespace-scoped
names here.
(tag_name): Handle typename_type.
(check_elaborated_type_specifier): Handle typenames.
* parser.c (cp_parser_diagnose_invalid_type_name): Improve
comment.
(cp_parser_elaborated_type_specifier): Use
cp_parser_diagnose_invalid_type_name.
2004-12-14 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/18965
* init.c (build_zero_init): If the max_index is 0, there is no
need to create a RANGE_EXPR.
2004-12-14 Mark Mitchell <mark@codesourcery.com>
PR c++/18793
* cp-objcp-common.c (cp_expr_size): Loosen assertion.
2004-12-14 Nathan Sidwell <nathan@codesourcery.com>
PR c++/18949
* pt.c (tsubst_copy_and_build): <INDIRECT_REF case> Check that a
REFERENCE_REF_P is dereferencing a reference type.
* typeck.c (build_static_cast): Convert from reference even in a
template.
(build_reinterpret_cast, build_const_cast, build_c_cast): Likewise.
2004-12-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
* parser.c (cp_parser_uncommitted_to_tentative_parse_p): New function.
(cp_parser_name_lookup_error): Use it.
(cp_parser_check_for_invalid_template_id): Likewise.
(cp_parser_skip_to_closing_parenthesis): Likewise.
(cp_parser_nested_name_specifier_opt): Likewise.
(cp_parser_simple_declaration, cp_parser_template_id): Likewise.
(cp_parser_parameter_declaration_list): Likewise.
(cp_parser_parameter_declaration): Likewise.
(cp_parser_template_name): Let cp_parser_simulate_error perform
the checking.
(cp_parser_committed_to_tentative_parse): Remove.
2004-12-13 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/18968
* class.c (build_base_path): Convert the zero constant to the correct
type when comparing.
2004-12-13 Mark Mitchell <mark@codesourcery.com>
PR c++/18925
* class.c (layout_class_type): Determine the visibility of static
data members.
2004-12-12 Roger Sayle <roger@eyesopen.com>
PR middle-end/12454
* cp-gimplify.c (gimplify_if_stmt): Optimize the case where the
condition is a constant and the unexecuted clause is empty.
2004-12-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/18731
* parser.c (cp_parser_class_head): Reject typedef-name in class head.
2004-12-09 Matt Austern <austern@apple.com>
PR c++/18514
* name-lookup.c (do_nonmember_using_decl): A real function
declaration takes precedence over an anticipated declaration.
2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
* parser.c (cp_parser_member_declaration): Fix comment typo.
2004-12-09 Alexandre Oliva <aoliva@redhat.com>
PR c++/18757
* parser.c (cp_parser_template_id): Don't create a CPP_TEMPLATE_ID
if parsing failed.
2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/18073
* typeck.c (build_reinterpret_cast_1): Allow cast from vector type.
2004-12-09 Nathan Sidwell <nathan@codesourcery.com>
PR c++/16681
* init.c (build_zero_init): Build a RANGE_EXPR for an array
initializer.
2004-12-08 Kelley Cook <kcook@gcc.gnu.org>
* typeck.c: Remove DOS line endings.
2004-12-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/18100
* decl.c (lookup_and_check_tag): Diagnose nested class with
the same name as enclosing class.
2004-12-08 Nathan Sidwell <nathan@codesourcery.com>
PR c++/18803
* cp-tree.h (REFERENCE_REF_P): New.
(CPTI_TYPE_INFO_TYPE): Rename to ...
(CPTI_CONST_TYPE_INFO_TYPE): ... here.
(CPTI_TYPE_INFO_REF_TYPE): Remove.
(type_info_type_node): Rename to ...
(const_type_info_type_node): ... here.
(type_info_ref_type): Remove.
* call.c (build_user_type_conversion): Reformat.
(resolve_args): Do not convert_from_reference.
(build_object_call): Call convert_from_reference.
(prep_operand): Do not convert_from_reference.
(build_new_method_call): Likewise.
* class.c (build_vfield_ref): Likewise.
* cvt.c (convert_to_reference): Likewise.
(convert_from_reference): Build INDIRECT_REF here, not with
build_indirect_ref.
(convert_force): Do not convert_from_reference.
(build_expr_type_conversion): Likewise.
* decl.c (grok_reference_init): Likewise.
* decl2.c (delete_sanity): Likewise.
* except.c (initialize_handler_parm): Use POINTER_TYPE_P.
* init.c (build_dtor_call): Do not convert_from_reference.
* parser.c (cp_parser_template_argument): Unwrap indirected
reference. Allow TEMPLATE_PARM_INDEX as an object parm.
* pt.c (tsubst_copy_and_build) <case INDIRECT_REF>: Use
convert_from_reference, if indicated.
<case CALL_EXPR>: Do not convert_from_reference.
<case PARM_DECL, VAR_DECL>: Convert_from_reference if needed.
(tsubst_initializer_list): Do not convert_from_reference.
* rtti.c (init_rtti_processing): Adjust node creation.
(throw_bad_typeid): Use const_type_info_type_node.
Do not convert_from_reference.
(typeid_ok_p): Use const_type_info_type_node.
(build_typeid, get_typeid): Always return type_info typed node.
(build_dynamic_cast_1): Dont convert_from_reference. Refactor.
* semantics.c (finish_stmt_expr_expr): Do not
convert_from_reference.
(finish_id_expression): Convert_from_reference as appropriate.
* typeck.c (decay_conversion): Do not convert_from_reference.
(finish_class_member_access_expr): Likewise.
(build_indirect_ref): Use POINTER_TYPE_P.
(convert_arguments): Do not convert_from_reference.
(build_modify_expr): Likewise.
(convert_for_initialization): Likewise.
* typeck2.c (build_x_arrow): Likewise.
2004-12-07 Ziemowit Laski <zlaski@apple.com>
* cp-tree.h (struct lang_type_class): Rename 'objc_protocols'
field to 'objc_info'.
2004-12-07 Kazu Hirata <kazu@cs.umass.edu>
* pt.c: Replace a use of first_rtl_op with TREE_CODE_LENGTH.
2004-12-07 Roger Sayle <roger@eyesopen.com>
* name-lookup.c (leave_scope): We only need to update
class_binding_level when leaving a class scope.
2004-12-06 Ziemowit Laski <zlaski@apple.com>
* cp-tree.h (struct lang_type_class): Add 'objc_protocols' field.
2004-12-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/17011, c++/17971
* pt.c (tsubst_copy) <FIELD_DECL case>: Check and diagnose
invalid field.
(tsubst_copy_and_build) <COMPONENT_REF case>: Check
error_mark_node after member substitution.
* semantics.c (finish_id_expression): Call
finish_non_static_data_member for non-dependent FIELD_DECL.
2004-12-03 Nathan Sidwell <nathan@codesourcery.com>
PR c++/18782
* decl.c (grokdeclarator): Make sure class in pointer to member is
not a namespace.
2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
PR c++/18318
* parser.c (cp_parser_new_type_id): Move array size expression
checks from here ...
* init.c (build_new): ... to here.
2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
PR c++/18758
* parser.c (cp_parser_class_head): Return NULL_TREE when
push_template_decl fails. Update comment.
2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/15664, c++/18276
* pt.c (tsubst_decl) <TEMPLATE_DECL case>: Reorganize. Correctly
tsubst TEMPLATE_DECL that is a TEMPLATE_TEMPLATE_PARM.
2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/18123
* parser.c (cp_parser_type_specifier): Catch template declaration
of enum.
2004-12-01 Matt Austern <austern@apple.com>
* name-lookup.c (namespace_binding): Omit alias check for global
namespace.
2004-12-01 Nathan Sidwell <nathan@codesourcery.com>
PR c++/18729
* parser.c (cp_parser_class_name): Check decl's type is not
error_mark_node.
PR c++/17431
* call.c (standard_conversion): Add FLAGS parameter. Do not allow
derived to base conversion when checking constructor
accessibility.
(implicit_conversion): Pass FLAGS to standard_conversion.
(check_constructir_callable): Disallow conversion functions.
2004-11-30 Kazu Hirata <kazu@cs.umass.edu>
* parser.c: Fix comment typos.
2004-11-27 Mark Mitchell <mark@codesourcery.com>
PR c++/18368
* parser.c (cp_parser_check_for_definition_in_return_type): Take
the defined type as a parameter, and inform the user about the
possibility of a missing semicolon.
(cp_parser_explicit_instantiation): Adjust call to
cp_parser_check_for_definition_in_return_type.
(cp_parser_init_declarator): Likewise.
(cp_parser_member_declaration): Likewise.
PR c++/18674
* cp-tree.def (TYPENAME_TYPE): Remove discussion of implicit
typename from comments.
* cp-tree.h (TYPENAME_IS_ENUM_P): New macro.
(TYPENAME_IS_CLASS_P): Likewise.
(make_typename_type): Change prototype.
* decl.c (struct_typename_info): New type.
(typename_compare): Expect the second argument to be a
typename_info, not a tree.
(build_typename_type): Add tag_type parameter. Do not create a
new type until necessary.
(make_typename_type): Add tag_type parameter.
* error.c (TYPENAME_TYPE): Print tags other than "typename" if
appropriate.
* friend.c (make_friend_class): Adjust call to make_typename_type.
* parser.c (cp_parser_make_typename_type): Likewise.
(cp_parser_primary_expression): Adjust call to
cp_parser_lookup_name.
(cp_parser_unqualified_id): Adjust calls to cp_parser_class_name.
(cp_parser_class_or_namespace_name): Likewise.
(cp_parser_postfix_expression): Adjust calls to
make_typename_type.
(cp_parser_mem_initializer_id): Adjust calls to
cp_parser_class_name.
(cp_parser_type_parameter): Adjust calls to cp_parser_lookup_name.
(cp_parser_template_name): Likewise.
(cp_parser_template_argument): Likewise.
(cp_parser_type_name): Adjust call to cp_parser_class_name.
(cp_parser_elaborated_type_specifier): Adjust calls to
make_typename_type and cp_parser_lookup_name.
(cp_parser_namespace_name): Likewise.
(cp_parser_class_name): Replace type_p parameter with tag_type.
Adjust calls to make_typename_type and cp_parser_lookup_name.
(cp_parser_class_head): Adjust calls to cp_parser_class_name.
(cp_parser_base_specifier): Likewise.
(cp_parser_lookup_name): Replace is_type parameter with tag_type.
Adjust calls to make_typename_type and lookup_qualified_name.
(cp_parser_lookup_name_simple): Adjust call to
cp_parser_lookup_name.
(cp_parser_constructor_declarator_p): Adjust call to
cp_parser_class_name.
* pt.c (convert_template_argument): Adjust all to
make_typename_type.
(tsubst_decl): Do not pre-substitute the type of the declaration.
(tsubst): Hand off declarations more quickly. Adjust call to
make_typename_type.
PR c++/18512
* parser.c (cp_parser_postfix_dot_deref_expression): Robustify.
2004-11-29 Daniel Jacobowitz <dan@codesourcery.com>
PR c/7544
* Make-lang.in (cp/decl2.o): Update dependencies.
* decl2.c (finish_file): Call maybe_apply_pending_pragma_weaks.
2004-11-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/18652
* name-lookup.c (pushtag): Change return type to tree.
* cp-tree.h (pushtag): Adjust declaration.
* decl.c (xref_tag, start_enum): Use return value of pushtag.
* pt.c (push_template_decl_real): Return immediately if
pushdecl_namespace_level returns error_mark_node.
2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
* pt.c: Fix a comment typo.
2004-11-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
Friend class name lookup 4/n
* class.c (pushclass): Don't call cxx_remember_type_decls.
* cp-tree.h (clear_anon_tags): Remove declaration.
* decl.c (grokdeclarator): Don't call lookup_tag_reverse.
* name-lookup.c (binding_entry_free, binding_table_free): Comment
out functions.
(binding_table_find_anon_type, binding_table_reverse_maybe_remap,
binding_table_remove_anonymous_types, cxx_remember_type_decls,
bt_print_entry, clear_anon_tags, follow_tag_typedef, lookup_tag,
lookup_tag_reverse): Remove
(begin_scope, leave_scope, kept_level_p, print_binding_level):
Don't use type_decls field in cp_binding_level.
(maybe_process_template_type_declaration, pushtag): Set
CLASSTYPE_NESTED_UTDS directly.
* name-lookup.h (binding_table_remove_anonymous_types,
cxx_remember_type_decls, lookup_tag, lookup_tag_reverse): Remove
declaration.
(cp_binding_level): Remove type_decls field.
2004-11-26 Kazu Hirata <kazu@cs.umass.edu>
* typeck.c: Fix a comment typo.
2004-11-25 Mark Mitchell <mark@codesourcery.com>
PR c++/18445
* class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with
unknown_type as non matching. Tidy up.
* pt.c (build_non_dependent_expr): Do not build a
NON_DEPENDENT_EXPR for a VAR_DECL.
PR c++/18001
* cp-tree.h (lvalue_or_else): Remove declaration.
* tree.c (lvalue_or_else): Remove.
* typeck.c (build_unary_op): Adjust call to lvalue_or_else.
(build_modify_expr): Likewise.
PR c++/18625
* decl.c (duplicate_decls): Return error_mark_node on error, as
specified.
PR c++/18466
* decl.c (grokvardecl): Keep track of whether or not a there was
explicit qualification.
* name-lookup.c (set_decl_namespace): Complain about explicit
qualification of a name within its own namespace.
PR c++/18545
* typeck.c (check_return_expr): Robustify.
2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
Friend class name lookup 3/n, PR c++/3332
* name-lookup.c (push_inner_scope, pop_inner_scope): New functions.
(lookup_type_scope): Don't deal with name from user declaration
specially.
* name-lookup.h (push_inner_scope, pop_inner_scope): Add declarations.
* parser.c (cp_parser_class_specifier): Use push_inner_scope and
pop_inner_scope.
2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
Friend class name lookup 2/n, PR c++/14513, c++/15410
* name-lookup.c (lookup_name_real): Simplify.
(lookup_type_scope): Add SCOPE parameter. Handle friend class
lookup.
* name-lookup.h (tag_scope): New enum type.
(lookup_type_scope): Adjust declaration.
* decl.c (lookup_and_check_tag, xref_tag, xref_tag_from_type):
Change bool parameter GLOBALIZED to TAG_SCOPE parameter SCOPE.
(start_enum): Likewise. Add assertion test that NAME is
IDENTIFIER_NODE. Use anonymous name for dummy ENUMERAL_TYPE in
case of error.
* cp-tree.h (xref_tag, xref_tag_from_type): Adjust declarations.
* parser.c (cp_parser_elaborated_type_specifier,
cp_parser_class_head): Adjust call to xref_tag.
* pt.c (lookup_template_class, instantiate_class_template):
Likewise.
* rtti.c (init_rtti_processing, build_dynamic_cast_1,
tinfo_base_init, emit_support_tinfos): Likewise.
2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
* g++spec.c, lex.c: Avoid ` as left quote in diagnostics.
2004-11-24 Mark Mitchell <mark@codesourcery.com>
PR c++/17473
* name-lookup.c (supplement_binding): Do not allow typedefs to be
redefined in class scope.
PR c++/18285
* parser.c (cp_parser_set_decl_type_spec): Do not try to allow
redefinitions of builtin types other that "bool" or "wchar_t".
2004-11-24 Steven Bosscher <stevenb@suse.de>
* decl.c (cxx_init_decl_processing): Don't clear
flag_inline_functions.
2004-11-24 Mark Mitchell <mark@codesourcery.com>
* pt.c (tsubst_function_type): Do not permit function types which
return arrays or functions.
PR c++/18586
* parser.c (cp_parser_init_declarator): Do not pop scope twice.
PR c++/18530
* cp-tree.h (CTOR_NAME): Remove.
(DTOR_NAME): Remove.
* decl.c (initialize_predefined_identifiers): Add spaces to the
end of constructor and destructor names.
2004-11-24 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/8929
* decl.c (start_decl): Check for invalid specialization headers.
2004-11-24 Paolo Bonzini <bonzini@gnu.org>
PR c++/16882
* call.c (standard_conversion): Move check for conversions between
vector pointers...
* typeck.c (ptr_reasonably_similar): ... here.
2004-11-23 Ben Elliston <bje@au.ibm.com>
* cp-tree.h (context_as_string): Remove extern.
* error.c (context_as_string): Remove.
* cp-tree.h (cp_type_qual_from_rid): Remove extern.
* lex.c (cp_type_qual_from_rid): Remove.
* cp-tree.h (do_poplevel): Remove extern.
(check_multiple_declarators): Likewise.
* semantics.c (do_poplevel): Make static.
(check_multiple_declarators): Remove.
* cp-tree.h (check_final_overrider): Remove extern.
* search.c (check_final_overrider): Make static.
* cp-tree.h (build_artificial_parm): Remove extern.
* decl2.c (build_artificial_parm): Make static.
2004-11-22 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/18354
* typeck.c (build_unary_op) <CONVERT_EXPR, NEGATE_EXPR>: Unify code.
Make sure the result is always a rvalue.
2004-11-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
* decl.c (start_preparsed_function): Call check_function_type even
in templates.
(require_complete_types_for_parms): Skip dependent types.
(check_function_type): Likewise.
2004-11-16 Steven Bosscher <stevenb@suse.de>
* Make-lang.in (cp/decl.o, cp/search.o): Don't depend on stack.h.
* search.c: Don't include it.
2004-11-15 Andrew Pinski <pinskia@physics.uc.edu>
* cp-gimplify.c: Include pointer-set.h
(cp_genericize_r): Use pointer_sets instead of a hashtable.
Also instert the new statement for CLEANUP_STMT.
(cp_genericize): Use pointer_sets instead of a hashtable.
* Make-lang.in (cp-gimplify.o): Depend on pointer-set.h.
2004-11-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
Friend class name lookup 1/n, PR c++/18471
* decl.c (lookup_and_check_tag): New function.
(xref_tag, start_enum): Use it.
(check_elaborated_type_specifier): Move TEMPLATE_TYPE_PARM check
before !DECL_IMPLICIT_TYPEDEF_P. Also display previously declared
location.
* name-lookup.c (lookup_name_current_level): Rename to ...
(lookup_name_innermost_nonclass_level): ... this.
(lookup_type_scope): New function.
* name-lookup.h (lookup_name_current_level): Rename to ...
(lookup_name_innermost_nonclass_level): ... this.
(lookup_type_scope): Add declaration.
2004-11-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/17344
* pt.c (coerce_template_parms): Only emit error message about
invalid template argument when TF_ERROR.
2004-11-12 Mark Mitchell <mark@codesourcery.com>
PR c++/18389
* decl.c (start_decl): Make sure to set *pop_scope_p. Return
error_mark_node to indicate errors.
PR c++/18429
* parser.c (cp_parser_direct_declarator): Disallow non-constant
array bounds when not inside a function.
PR c++/18436
* pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an
unqualified name resolves to a member function.
PR c++/18407
* pt.c (tsubst_copy_and_build): Handle qualified names used from a
derived class correctly.
* decl2.c (import_export_decl): Fix typo in comment.
* tree.c (pod_type_p): Likewise.
2004-11-10 Andrew Pinski <pinskia@physics.uc.edu>
* typeck.c (cxx_mark_addressable): Add braces around the first if.
2004-11-10 Adam Nemet <anemet@lnxw.com>
PR middle-end/18160
* typeck.c (cxx_mark_addressable): Issue an error if address of an
explicit register variable is requested.
2004-11-10 Nathan Sidwell <nathan@codesourcery.com>
PR c++/18143
* cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK): New.
(struct lang_decl_flags): Add thunk_p flag.
(struct lang_decl): Remove separate fixed_offset. Place
cloned_function and fixed_offset into union.
(DECL_CLONED_FUNCTION_P, DECL_CLONED_FUNCTION): Adjust.
(DECL_THUNK_P, SET_DECL_THUNK_P): Adjust.
(THUNK_FIXED_OFFSET): Adjust.
* method.c (make_thunk): Adjust.
2004-11-09 Mark Mitchell <mark@codesourcery.com>
PR c++/18369
* init.c (build_new_1): Handle parenthesized type-ids that name an
array type. Tidy.
2004-11-09 Joseph S. Myers <joseph@codesourcery.com>
* call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
quoting in diagnostics.
* parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
quoting in printf format.
* decl.c (duplicate_decls, start_decl): Use %qD instead of
unquoted %D.
2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
* class.c, decl.c, lex.c, name-lookup.c, parser.c, pt.c,
search.c, typeck2.c: Fix comment formatting.
2004-11-04 Ulrich Weigand <uweigand@de.ibm.com>
PR tree-optimization/18184
* cp-objcp-common.c (cxx_types_compatible_p): Do not treat pointers
of different modes or alias-all flags as equivalent.
* typeck.c (comptypes): Likewise.
2004-11-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
DR 49, 100
* cp-tree.h (TYPE_REF_OBJ_P): New macro.
(TYPE_PTR_P, TYPE_PTROB_P, TYPE_PTROBV_P, TYPE_PTRFN_P,
TYPE_REFFN_P): Document.
(fold_decl_constant_value): New prototype.
* pt.c (convert_nontype_argument_function): Rewrite and extract
parts into...
(fold_decl_constant_value, convert_nontype_argument_function): New.
(lookup_template_class): Add comment about useless double call.
* mangle.c (write_expression): Strip conversions before lowering
pointer to members.
* cvt.c (ocp_convert): Check LOOKUP_COMPLAIN for a pedwarn. Disallow
enum to enum conversion.
2004-11-02 Mark Mitchell <mark@codesourcery.com>
PR c++/18124
* parser.c (cp_parser_type_parameter): Robustify.
PR c++/18155
* parser.c (cp_parser_single_declaration): Disallow template
typedefs.
PR c++/18177
* typeck.c (build_const_cast): Use error_operand_p.
2004-11-02 Ziemowit Laski <zlaski@apple.com>
* cp-lang.c (cxx_types_compatible_p): Remove prototype and definition.
(LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h.
* cp-objcp-common.c (cxx_types_compatible_p): Moved definition here
from cp-lang.c.
* cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here
from cp-lang.c.
(LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c.
2004-11-01 Nathan Sidwell <nathan@codesourcery.com>
PR c++/18064
* search.c (check_final_overrider): Deprecate gnu covariant extension.
2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert diagnostics to use quoting flag q 9/n
* typeck.c (build_x_unary_op, convert_member_func_to_ptr,
get_delta_difference): Use new quotation style.
* repo.c (reopen_repo_file_for_write): Likewise.
* pt.c (do_type_instantiation): Likewise.
* parser.c (cp_parser_diagnose_invalid_type_name):
* name-lookup.c (push_overloaded_decl, set_decl_namespace):
* error.c (cp_print_error_function,
print_instantiation_full_context): Likewise.
* decl.c (define_label, grok_reference_init,
maybe_deduce_size_from_array_init, revert_static_member_fn):
* decl2.c (check_classfn): Likewise.
* class.c (add_method, check_field_decls, layout_class_type,
resolve_address_of_overloaded_function): Likewise.
* call.c (build_x_va_arg, build_over_call): Likewise.
2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert diagnostics to use quoting flag q 8/n
* cvt.c (cp_convert_to_pointer, warn_ref_binding,
convert_to_reference, ocp_convert, convert_to_void
cp_convert_to_pointer): Use new quotation style.
2004-10-31 Mark Mitchell <mark@codesourcery.com>
PR c++/15172
* typeck2.c (store_init_value): Use split_nonconstant_init even
for types that require construction.
2004-10-28 Matt Austern <austern@apple.com>
PR c++/17542
* cp-tree.h (class_key_or_enum_as_string): Declare.
* error.c (class_key_or_enum): Rename to class_key_or_enum_as_string
and remove static qualifier.
* decl.c (shadow_tag): Warn about ignored attributes in class/struct/
union/enum declaration.
2004-10-29 Kazu Hirata <kazu@cs.umass.edu>
* pt.c: Fix a comment typo.
2004-10-28 Nathan Sidwell <nathan@codesourcery.com>
* typeck.c (composite_pointer_type): Remove comment about DR 195.
(build_reinterpret_cast_1): Revert DR195 patch. Only emit a
warning when being pedantic.
(build_reinterpet_cast, build_c_cast): Adjust.
2004-10-29 Mark Mitchell <mark@codesourcery.com>
PR c++/17695
* decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they
appear in a constructor/destructor that will be cloned.
2004-10-28 Matt Austern <austern@apple.com>
PR c++/14124
* decl.c (finish_enum): Handle packed attribute.
* parser.c (cp_parser_enum_specifier): Process trailing attributes.
2004-10-28 Mark Mitchell <mark@codesourcery.com>
PR c++/17132
* pt.c (instantiate_class_template): Increment
processing_template_decl when substituting into a member class
template.
2004-10-27 Mark Mitchell <mark@codesourcery.com>
PR c++/17435
* call.c (convert_like_real): Fix formatting.
(initialize_reference): When binding a temporary to a base class,
ensure that the nominal copy made is to the derived class, not the
base class.
PR c++/18140
* parser.c (cp_parser_next_token_ends_template_argument_p): Do not
include ">>".
2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
* decl.c (bad_specifiers): Move the q after the %.
2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
* parser.c (cp_parser_diagnose_invalid_type_name): Move the q after
the %.
2004-10-26 Mark Mitchell <mark@codesourcery.com>
* name-lookup.c (do_namespace_alias): Use FROB_CONTEXT.
* search.c (current_scope): Fix prototype.
PR c++/18093
* search.c (current_scope): Return the innermost non-block scope,
not the innermost non-block, non-namespace scope.
(at_namespace_scope_p): Adjust accordingly.
(dfs_accessible_post): Do not pass namespaces to is_friend.
(dfs_walk_once_accessible_r): Likewise.
* decl.c (grokvardecl): Adjust call to current_scope.
(build_enumerator): Likewise.
* parser.c (cp_parser_using_declaration): Likewise.
(cp_parser_direct_declarator): Use at_namespace_scope_p instead of
current_scope.
(cp_parser_class_head): Adjust call to current_scope.
* name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the
alias.
PR c++/18020
* pt.c (tusbst_copy_and_build): Resolve enumeration constants to
their underlying values.
PR c++/18161
* typeck.c (build_binary_op): Honor build_type, even when in a
template.
2004-10-26 Nathan Sidwell <nathan@codesourcery.com>
* parser.c (cp_lexer_get_preprocessor_token): Remove unneeded
padding token checking.
2004-10-25 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/18121
* decl.c (grokdeclarator) <case cdk_array>: Remove the call
layout_type as it is already done by create_array_type_for_decl.
2004-10-22 Nathan Sidwell <nathan@codesourcery.com>
PR c++/18095
* parser.c (eof_token): Make const, correctly initialize rid and
location fields.
(struct cp_lexer): Replace buffer_end pointer with buffer_length
count. Adjust.
(cp_lexer_new_main): Directly grow lexer's buffer here. Don't
zero it out.
(cp_lexer_new_from_tokens): Adjust.
(cp_lexer_grow_buffer): Remove.
(cp_lexer_peek_nth_token, cp_lexer_consume_token,
cp_lexer_purge_token): Add const casts.
2004-10-21 Mark Mitchell <mark@codesourcery.com>
PR c++/18073
PR c++/10841
* cp-tree.h (convert_to_base): Change prototype.
(build_ptrmemfunc): Likewise.
(convert_ptrmem): New function.
* call.c (struct conversion): Adjust documentation for base_p.
(standard_conversion): Set base_p for ck_pmem conversions as
appropriate.
(convert_like_real): Use convert_to_base for ck_pmem and ck_ptr
conversions.
* class.c (convert_to_base): Handle both pointers and objects.
Add nonnull parameter.
(build_vfield_ref): Adjust call to convert_to_base.
* cvt.c (cp_convert_to_pointer): Adjust call to build_ptrmemfunc.
(convert_force): Likewise.
* typeck.c (build_unary_op): Likewise.
(convert_ptrmem): New function.
(build_static_cast_1): Use it.
(build_reinterpret_cast): Allow conversions to vector types.
(get_delta_difference): Add c_cast_p parameter.
(build_ptrmemfunc): Likewise. Adjust calls to
get_delta_difference.
2004-10-21 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/13560
* error.c (cp_error_at): Output the context as it might be
different file as the other location.
2004-10-21 Kazu Hirata <kazu@cs.umass.edu>
* typeck.c: Fix a comment typo.
2004-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/13495
* decl.c (make_unbound_class_template): Add PARM_LIST parameter.
* cp-tree.h (make_unbound_class_template): Adjust prototype.
* parser.c (cp_parser_lookup_name): Adjust call to
make_unbound_class_template.
(cp_parser_single_declaration): Handle member class of class
template as template friend parsing correctly.
* friend.c (is_friend): Call is_specialization_of_friend for
template friend class.
(make_friend_class): Handle member class of class template as
template friend.
* pt.c (is_specialization_of_friend): Likewise.
(instantiate_class_template): Likewise.
(tsubst): Adjust call to make_unbound_class_template.
2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
* typeck.c (composite_pointer_type): Add comment about DR 195
(build_reinterpret_cast_1): Add for_reinterpret_cast_p parameter.
Allow function pointer conversions that DR195 suggests.
(build_reinterpret_cast, build_c_cast): Update
build_reinterpret_cast_1 calls.
2004-10-20 Kazu Hirata <kazu@cs.umass.edu>
* call.c, typeck.c: Fix comment typos.
2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
* parser.c (cp_token_position): New typedef. Define VEC thereof.
(struct cp_lexer): Allow buffer and buffer_end to be NULL. Make
next_token and last_token cp_token_position. Make saved_tokens a
VEC(cp_token_position).
(eof_token): New static variable.
(CP_SAVED_TOKENS_SIZE): Rename to ...
(CP_SAVED_TOKEN_STACK): ... here.
(cp_lexer_new_main): Adjust main lexer creation and buffer
filling.
(cp_lexer_new_from_tokens): Do not copy the tokens, merely point
to the parent buffer. Do not append eof token.
(cp_lexer_destroy): Only free buffer if non-NULL. Free token
stack.
(cp_lexer_next_token, cp_lexer_prev_token): Remove.
(cp_lexer_token_position, cp_lexer_token_at): New.
(cp_lexer_saving_tokens): Adjust. Make inline.
(cp_lexer_advance_token, cp_lexer_token_difference): Remove.
(cp_lexer_peek_token_emit_debug_info): Fold into ...
(cp_lexer_peek_token): ... here.
(cp_lexer_peek_nth_token): Don't peek past EOF.
(cp_lexer_consume_token): Set next_token to eof_token, if reaching
EOF.
(cp_lexer_purge_token): Adjust eof setting.
(cp_lexer_purge_tokens_after): Likewise.
(cp_lexer_save_tokens): Push next_token directly.
(cp_lexer_commit_tokens): Adjust.
(cp_lexer_rollback_tokens): Pop next_token directly.
(cp_parser_check_for_invalid_template_id): Adjust token purging.
(cp_parser_translation_unit): Do not consume the EOF.
(cp_parser_nested_name_specifier_opt): Adjust token purging.
(cp_parser_template_id, cp_parser_template_name): Likewise.
2004-10-19 Mark Mitchell <mark@codesourcery.com>
PR c++/14035
* call.c (struct conversion): Add base_p.
(convert_like): Add c_cast_p argument.
(convert_like_with_conversion): Likewise.
(build_conv): Clear base_p.
(standard_conversion): Set it, for derived-to-base conversions.
(convert_like_real): Add c_cast_p parameter. Handle pointer
conversions directly rather than relying on ocp_convert.
(perform_direct_initialization_if_possible): Add c_cast_p
parameter.
* cp-tree.h (perform_direct_initialization_if_possible): Change
prototype.
(convert_member_func_to_ptr): New function.
* typeck.c (check_for_casting_away_constness): Add diag_fn
parameter.
(build_static_cast_1): New function, split out from ...
(build_static_cast): ... here. Use build_static_cast_1.
(build_reinterpret_cast_1): New function, split out from ...
(build_reinterpret_cast): ... here. Use build_reinterpret_cast_1.
(build_const_cast_1): New function, split out from ...
(build_const_cast): ... here. Use build_const_cast_1.
(build_c_cast): Rewrite to use build_const_cast_1,
build_static_cast_1, and build_reinterpret_cast_1.
(convert_member_func_to_ptr): New function.
2004-10-19 Paolo Bonzini <bonzini@gnu.org>
PR c++/18047
* parser.c (enum cp_parser_prec): Give relational expressions
a higher precedence than equality expressions.
2004-10-15 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (UNIQUELY_DERIVED_FROM_P): Adjust lookup_base call.
(ACCESSIBLY_UNIQUELY_DERIVED_P): Remove.
(PUBLICLY_UNIQUELY_DERIVED_P): Adjust lookup_base call.
(enum base_access): Reorganize.
(accessible_base_p, accessible_p): Add consider_local_p parameter.
* call.c (standard_conversion): Update comment about
DERIVED_FROM_P.
(enforce_access): Adjust accessible_p call.
(build_over_call): Adjust accessible_base_p call.
* class.c (convert_to_base): Adjust lookup_base call.
(build_vtbl_ref_1): Likewise.
(warn_about_ambiguous_bases): Likewise. Add early exit.
* cvt.c (convert_to_pointer_force) Adjust lookup_base call.
* search.c (accessible_base_p): Add consider_local_p parameter.
(lookup_base): Pass consider_local_p to accessible_base_p call.
(friend_accessible_p): Check whether scope is a class member.
Remove unnecessary class template check.
(accessible_p): Add consider_local_p parameter. Use it.
(adjust_result_of_qualified_name_lookup): Adjust lookup_base call.
* tree.c (maybe_dummy_object): Likewise.
* typeck.c (comp_except_type): Use PUBLICLY_UNIQUELY_DERIVED_P.
(build_class_member_access_expr): Adjust lookup_base call.
* typeck2.c (binfo_or_else): Likewise.
* rtti.c (build_dynamic_cast_1): Access can consider friendship
and current scope.
2004-10-17 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/17743
* decl2.c (grokfield): Apply attributes also to TYPE_DECLs.
2004-10-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/10479
* parser.c (cp_parser_parenthesized_expression_list): Fold
non-dependent expressions in attribute lists.
2004-10-15 Mark Mitchell <mark@codesourcery.com>
PR c++/17042
* decl.c (declare_global_var): Use the return value from pushdecl.
PR c++/14667
* parser.c (cp_parser_simple_declaration): Do not diagnose invalid
type names if we have already found a valid type.
(cp_parser_member_declaration): Likewise.
PR c++/17916
* parser.c (cp_parser_member_specification_opt): Handle
CPP_PRAGMA.
2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
* dump.c, g++spec.c, repo.c: Update copyright.
2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
* decl.c: Fix a comment typo.
2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/16301
* name-lookup.c (parse_using_directive): If we have a
error_mark_node, do not set the decl namespace associations
on it.
2004-10-14 Mark Mitchell <mark@codesourcery.com>
PR c++/17976
* decl.c (cp_finish_decl): Do not call expand_static_init more
than once for a single variable.
2004-10-14 Matt Austern <austern@apple.com>
* Make-lang.in (pt.o): depends on pointer-set.h
* cp-tree.h (cp_walk_subtrees): Last argument is pointer_set_t* now.
* pt.c (struct pair_fn_data): Use pointer_set_t, not htab_t
(for_each_template_parm): Convert from htab_t to pointer_set_t.
* tree.c (cp_walk_subtrees): Last argument is pointer_set_t* now.
2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/17661
* semantics.c (finish_for_expr): Convert expression to void
so that we don't create temporaries for a?b:c.
2004-10-13 Kazu Hirata <kazu@cs.umass.edu>
* search.c: Fix a comment typo.
2004-10-12 Nathan Sidwell <nathan@codesourcery.com>
* class.c (dfs_modify_vtables): Simplify condition. Return
dfs_skip_bases as appropriate.
(modify_all_vtables): Walk in pre-order.
* search.c (dfs_walk_all, dfs_walk_once_r,
dfs_walk_once_accessible_r): Assert post order function never
returns dfs_skip_bases.
* search.c (struct lookup_base_data_s): New.
(lookup_base_r): Replace with ...
(dfs_lookup_base): ... this.
(lookup_base): Use dfs_walk_all.
2004-10-12 Kazu Hirata <kazu@cs.umass.edu>
* search.c: Fix comment typos.
2004-10-11 Mark Mitchell <mark@codesourcery.com>
PR c++/15786
* parser.c (cp_parser_declarator): Add member_p parameter.
(cp_parser_condition): Adjust calls to cp_parser_declarator.
(cp_parser_explicit_instantiation): Likewise.
(cp_parser_init_declarator): Likewise.
(cp_parser_direct_declarator): Add member_p parameter. Do not
parse tentatively when parsing the parameters to a member.
(cp_parser_type_id): Adjust calls to cp_parser_declarator.
(cp_parser_parameter_declaration): Likewise.
(cp_parser_member_declaration): Likewise.
(cp_parser_exception_declaration): Likewise.
PR c++/17936
* cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment.
* pt.c (optimize_specialization_lookup_p): Do not optimize lookups
for members of partial or explicit specializations.
PR c++/17929
* decl2.c (finish_anon_union): Robustify.
2004-10-11 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (get_dynamic_cast_base_type): Rename to ...
(dcast_base_hint): ... here.
* rtti.c (build_dynamic_cast_1): Use dcast_base_hint.
* search.c (struct dcast_data_s): New.
(dynamic_cast_base_recurse): Remove. Replace with ...
(dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New.
(get_dynamic_cast_base_type): Rename to ...
(dcast_base_hint): ... here. Use dfs_walk_once_accessible.
(accessible_r): Remove.
(dfs_accessible_post): New, broken out of accessible_r.
(accessible_p): Use dfs_walk_once_accessible.
(dfs_walk_once_accessible_r): New. From accessible_r.
(dfs_walk_once_accessible): New. From acessible_p.
* cp-tree.h (SAME_BINFO_TYPE_P): New.
* class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare
binfo types.
(convert_to_base_statically, determine_primary_bases,
update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits,
dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
accumulate_vtbl_inits, dfs_accumulate_vtbl_inits,
build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise.
* init.c (expand_member_init): Likewise.
* search.c (lookup_base_r, dynamic_cast_base_recurse,
binfo_via_virtual, copied_binfo, binfo_for_vbase,
original_binfo): Likewise.
* tree.c (copy_binfo): Likewise.
2004-10-11 Kazu Hirata <kazu@cs.umass.edu>
* semantics.c: Fix comment typos.
2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/17554
part of c++/17657
middle-end/17703
* semantics.c (maybe_cleanup_point_expr): Call
fold_build_cleanup_point_expr.
(maybe_cleanup_point_expr_void): New function.
(add_decl_expr): Call maybe_cleanup_point_expr_void.
(finish_expr_stmt): Likewise.
(finish_return_stmt): Likewise.
(finish_for_expr): Likewise.
(finish_asm_stmt): Likewise.
* typeck.c (condition_conversion): Call
fold_build_cleanup_point_expr.
2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/17907
* semantics.c (add_decl_expr): If the decl has a size which
has side effects then the decl expression needs a cleanup point.
2004-10-10 Mark Mitchell <mark@codesourcery.com>
PR c++/17393
* decl.c (grokdeclarator): Robustify error-recovery on invalid
declarations.
2004-10-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert diagnostics to use quoting flag q 7/n
* typeck.c (composite_pointer_type_r, composite_pointer_type,
cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr,
string_conv_p, build_class_member_access_expr,
build_class_member_access_expr, lookup_destructor,
finish_class_member_access_expr, build_indirect_ref,
get_member_function_from_ptrfunc, build_function_call,
convert_arguments, build_binary_op, pointer_diff, build_unary_op,
check_for_casting_away_constness, build_static_cast,
build_reinterpret_cast, build_const_cast, build_c_cast,
build_modify_expr, get_delta_difference, build_ptrmemfunc,
dubious_conversion_warnings, convert_for_assignment,
convert_for_initialization,
maybe_warn_about_returning_address_of_local, check_return_expr):
Use quoting marks.
* typeck2.c (error_not_base_type, readonly_error,
abstract_virtuals_error, cxx_incomplete_type_diagnostic,
store_init_value, digest_init, build_x_arrow,
build_m_component_ref, require_complete_eh_spec_types): Likewise.
* tree.c (cp_build_qualified_type_real,
handle_java_interface_attribute, handle_init_priority_attribute):
Likewise.
* semantics.c (finish_asm_stmt, finish_non_static_data_member,
finish_pseudo_destructor_expr,
check_template_template_default_arg, begin_class_definition,
finish_base_specifier, qualified_name_lookup_error,
finish_id_expression, finish_typeof): Likewise.
* search.c (lookup_base, check_final_overrider,
look_for_overrides_r): Likewise.
* rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise.
2004-10-09 Mark Mitchell <mark@codesourcery.com>
PR c++/17867
* error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a
constructor.
PR c++/17670
* init.c (build_new): Correct comments.
* parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in
the non-array case.
PR c++/17821
* parser.c (cp_parser_postfix_dot_deref_expression): If the
pseduo-destructor-name production does not work, fall back to the
ordinary production.
PR c++/17826
* tree.c (cp_tree_equal): Handle a BASELINK.
PR c++/17524
* cp-tree.h (check_var_type): New function.
* decl.c (check_var_type): New function, split out from ...
(grokdeclarator): ... here.
* pt.c (tsubst_decl): Use check_var_type.
PR c++/17685
* decl.c (grokdeclarator): Disallow declarations of operators as
non-functions.
2004-10-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/17868
* error.c (dump_expr): Add missing case for RDIV_EXPR.
2004-10-08 Kazu Hirata <kazu@cs.umass.edu>
* pt.c, search.c: Fix comment typos.
2004-10-08 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp,
unmarkedp): Remove.
(dfs_skip_bases, dfs_walk_all, dfs_walk_once): New.
* class.c (struct find_final_overrider_data): Remove most_derived,
vpath_list and vpath fields. Add path field.
(dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust.
(dfs_find_final_overrider): Rename to ...
(dfs_find_final_overrider_pre): ... here. Adjust.
(dfs_find_final_overrider_post): Adjust.
(dfs_find_final_overrider_q): Fold into
dfs_find_final_overrider_pre.
(find_final_overrider): Adjust dfs searching.
(dfs_modify_vtables): Don't mark binfo here.
(modify_all_vtables): Use dfs_walk_once.
(build_vtt_inits): Likwise. Use dfs_walk_all.
(dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here.
Return dfs_skip_bases as appropriate.
(dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate.
* init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as
appropriate. Don't mark binfo here.
(initialize_vtbl_ptrs): Use dfs_walk_once.
* search.c (struct vbase_info): Remove unused struct.
(access_in_type): Use dfs_walk_once.
(dfs_access_in_type): Don't mark binfo here.
(dfs_accessible_queue_p, dfs_accessible_p) Remove.
Fold into ...
(accessible_r): ... here. New. Specialize dfs_walk_once.
(accessible_p): Use accessible_r.
(lookup_field_queue_p): Remove. Fold into ...
(lookup_field_r): ... here. Adjust.
(lookup_member): Use dfs_walk_all.
(dfs_walk_real, dfs_walk): Replace with ...
(dfs_walk_all, dfs_walk_once): ... these.
(dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once.
(dfs_unmark, unmarkedp, markedp): Remove.
(dfs_get_pure_virtuals): Don't mark binfo here.
(get_pure_virtuals): Use dfs_walk_once.
(dfs_debug_unmarked_p): Remove. Fold into ...
(dfs_debug_mark): ... here.
(note_debug_info_needed): Use dfs_walk_all.
2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
* pt.c (tsubst_expr) <case ASM_EXPR>: Look passed the
CLEANUP_POINT_EXPR to get the asm expression.
2004-10-07 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag.
(DECL_MEMBER_TEMPLATE_P): New macro.
(is_member_template): Remove.
(class_method_index_for_fn): New function.
* pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P.
* class.c (finish_struct_methods): Remove out-of-date comment.
* decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P.
* decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and
class_method_index_for_fn.
* pt.c (is_member_template): Remove.
(is_member_template_class): Likewise.
(optimize_specialization_lookup_p): New function.
(retrieve_specialization): Optimize lookups for members that are
not member templates.
(register_specialization): Adjust accordingly.
(build_template_decl): Add member_template_p parameter. Set
DECL_MEMBER_TEMPLATE_P.
(process_partial_specialization): Adjust call to
retrieve_specialization.
(push_template_decl_real): Determine whether the template is a
member template.
(lookup_template_class): Use retrieve_specialization.
(tsubst_decl): Adjust call to retrieve_specialization.
(tsubst_exception_specification): New function.
(tsubst): Use it.
(tsubst_copy): Use DECL_MEMBER_TEMPLATE_P.
(instantiate_template): Adjust call to retrieve_specialization.
(regenerate_decl_from_template): Do not actually generate a new
DECL.
(instantiate_decl): Adjust call to retrieve_specialization.
(class_method_index_for_fn): New method.
2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
* parser.c (cp_parser_asm_definition): Look passed the
CLEANUP_POINT_EXPR to get the asm expression.
2004-10-06 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/17368
* semantics.c (finish_asm_stmt): Asm expressions need cleanup
also.
2004-10-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert diagnostics to use quoting flag q 6/n
* pt.c (finish_member_template_decl, check_specialization_scope,
maybe_process_partial_specialization, determine_specialization,
check_explicit_specialization, maybe_check_template_type,
process_partial_specialization, check_default_tmpl_args,
push_template_decl_real, redeclare_class_template,
convert_nontype_argument, coerce_template_parms,
lookup_template_class, push_tinst_level,
instantiate_class_template, tsubst_arg_types,
tsubst_function_type, tsubst, tsubst_qualified_id,
tsubst_copy_and_build, check_instantiated_args,
do_decl_instantiation, do_type_instantiation,
invalid_nontype_parm_type_p, check_specialization_namespace,
convert_template_argument, determine_specialization,
check_template_shadow, tsubst_decl
instantiate_pending_templates): Use quoting marks.
2004-10-05 Nathan Sidwell <nathan@codesourcery.com>
PR c++/17829
* parser.c (cp_parser_postfix_expression): Inhibit Koenig when
unqualified lookup finds a member function.
2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert diagnostics to use quoting flag q 5/n
* parser.c (cp_parser_name_lookup_error,
cp_parser_diagnose_invalid_type_name,
cp_parser_primary_expression, cp_parser_unqualified_id,
cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement,
cp_parser_jump_statement, cp_parser_simple_declaration,
cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id,
cp_parser_type_parameter, cp_parser_template_id,
cp_parser_template_name, cp_parser_direct_declarator,
cp_parser_parameter_declaration_list, cp_parser_class_head,
cp_parser_base_specifier, cp_parser_lookup_name,
cp_parser_late_parsing_default_args,
cp_parser_optional_template_keyword
cp_parser_elaborated_type_specifier, cp_parser_check_class_key,
cp_parser_check_access_in_redeclaration): Use quoting marks.
* name-lookup.c (supplement_binding, pushdecl,
check_for_out_of_scope_variable, validate_nonmember_using_decl,
do_nonmember_using_decl, lookup_tag, set_decl_namespace,
push_namespace, do_namespace_alias, do_using_directive,
ambiguous_decl, lookup_namespace_name, add_function): Likewise.
* method.c (use_thunk): Likewise.
* lex.c (unqualified_name_lookup_error,
unqualified_fn_lookup_error): Likewise.
2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert diagnostics to use quoting flag q 4/n
* except.c (decl_is_java_type, build_throw,
is_admissible_throw_operand, check_handlers_1, check_handlers):
Use quoting formats.
* friend.c (add_friend, make_friend_class, do_friend): Likewise.
* init.c (sort_mem_initializers, emit_mem_initializers,
member_init_ok_or_else, expand_member_init, is_aggr_type,
build_offset_ref, build_java_class_ref): Likewise.
2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert diagnostics to use quoting flag q 3/n
* decl.c (pop_label, duplicate_decls, redeclaration_error_message,
redeclaration_error_message, lookup_label, check_goto,
make_typename_type, make_unbound_class_template,
fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1,
grok_reference_init, layout_var_decl, maybe_commonize_var,
check_for_uninitialized_const_var, reshape_init_array,
reshape_init, check_initializer, cp_finish_decl,
member_function_or_else, bad_specifiers, grokfndecl, grokvardecl,
check_static_variable_definition, compute_array_index_type,
create_array_type_for_decl, check_special_function_return_type,
grokdeclarator, check_default_argument, grokparms,
grok_ctor_properties, grok_op_properties,
check_elaborated_type_specifier, xref_tag, finish_enum,
build_enumerator, check_function_type, start_preparsed_function,
store_parm_decls): Use quoting formats.
* decl2.c (grok_array_decl, delete_sanity, check_member_template,
check_java_method, check_classfn, finish_static_data_member_decl,
grokfield, grokbitfield, grok_function_init,
build_anon_union_vars, coerce_new_type, coerce_delete_type,
check_default_args): Likewise.
* parser.c (cp_parser_decl_specifier_seq): Likewise.
2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert diagnostics to use quoting flag q 2/n
* class.c (build_base_path, add_method, alter_access,
handle_using_decl, check_bases,
maybe_warn_about_overly_private_class, find_final_overrider,
warn_hidden, finish_struct_anon, add_implicitly_declared_members,
check_bitfield_decl, check_field_decls, layout_empty_base,
build_base_field, check_methods, layout_virtual_bases,
warn_about_ambiguous_bases, layout_class_type, finish_struct_1,
resolve_address_of_overloaded_function, instantiate_type,
note_name_declared_in_class): Use format flag "q" for quoting.
2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert diagnostics to use quoting flag q 1/n
* error.c (locate_error): Ignore quoting flag q.
* call.c (build_user_type_conversion_1, build_operator_new_call,
build_object_call, op_error, build_conditional_expr,
build_new_op, build_op_delete_call, enforce_access,
convert_like_real, convert_arg_to_ellipsis, build_x_va_arg,
convert_default_arg, build_over_call, build_new_method_call,
joust, perform_implicit_conversion, initialize_reference): Use the
quoting flag q.
2004-10-03 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/17797
* typeck.c (build_reinterpret_cast): Return if the inner type
is error_mark_node.
2004-10-01 Jan Hubicka <jh@suse.cz>
* semantics.c (expand_body): Update call of tree_rest_of_compilation.
2004-09-30 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (struct lang_decl): Shrink by reordering fields and
turning operator_code and fixed_offset into bitfields.
2004-09-29 Joseph S. Myers <jsm@polyomino.org.uk>
* decl.c (duplicate_decls): Merge TREE_DEPRECATED.
2004-09-29 Jason Merrill <jason@redhat.com>
PR tree-optimization/17697
* decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.
2004-09-28 Jason Merrill <jason@redhat.com>
PR middle-end/17525
* class.c (build_base_field): Set TYPE_MODE.
2004-09-28 Roger Sayle <roger@eyesopen.com>
PR driver/17537
* g++spec.c (lang_specific_driver): Unrecognized libraries, other
than -lc and -lm, may require linking against libstc++.
2004-09-28 Kazu Hirata <kazu@cs.umass.edu>
* tree.c: Fix a comment typo.
2004-09-28 Nathan Sidwell <nathan@codesourcery.com>
* class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove.
(struct secondary_vptr_vtt_init_data_s): New.
(build_vtt_inits): Adjust dfs_walkers.
(dfs_build_secondary_vptr_vtt_inits): Caller data is a
secondary_vptr_vtt_init_data_s structure. Adjust.
(dfs_ctor_vtable_bases_queue_p): Remove.
(dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify.
* pt.c (struct get_template_base_data_s): Remove.
(get_template_base_r): Fold into get_template_base.
(get_template_base): Walk base binfos directly in inheritance
graph order.
2004-09-27 Mark Mitchell <mark@codesourcery.com>
PR c++/17642
* cp-tree.h (fold_if_not_in_template): New function.
* call.c (build_conditional_expr): Use fold_if_not_in_template.
(build_cxx_call): Likewise.
* cvt.c (convert_to_complex): Likewise.
(ocp_convert): Likewise.
(convert): Likewise.
(convert_force): Likewise.
* decl.c (compute_array_index_type): Clear
processing_template_decl while folding array bounds.
* pt.c (convert_nontype_argument): Clear
processing_template_decl while processing non-type argument
initialization.
* tree.c (fold_if_not_in_template): New function.
* typeck.c (build_class_member_access_expr): Use
fold_if_not_in_template.
(build_array_ref): Likewise.
(build_binary_op): Likewise. Do not try to optimize computations
when processing templates.
(cp_pointer_int_sum): Use fold_if_not_in_template.
(pointer_diff): Likewise.
(build_unary_op): Likewise.
(build_reinterpret_cast): Likewise.
(get_delta_difference): Likewise.
(expand_ptrmemfunc_cst): Likewise.
(dubious_conversion_warnings): Likewise.
2004-09-27 Matt Austern <austern@apple.com>
* cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c
(cp_lexer_get_preprocessor_token): Set implicit_extern_c for
tokens that come from headers that are implicitly extern "C".
(struct cp_parser): new one-bit field, implicit_extern_c.
(cp_parser_new): Set parser's implicit_extern_c to false.
(cp_parser_translation_unit): Pop lang context if we were in a
header that was implicitly extern "C".
(cp_parser_declaration_seq_opt): Push/pop lang context as
required by the token's and parser's implicit_extern_c.
2004-09-27 Mark Mitchell <mark@codesourcery.com>
PR c++/17585
* cp-tree.h (shared_member_p): Declare.
* search.c (shared_member_p): Give it external linkage.
* semantics.c (finish_qualified_id_expr): Use it.
(finish_id_expression): Likewise.
PR c++/17585
* semantics.c (finish_id_expression): Do not add "this->" to
static member functions.
2004-09-27 Nathan Sidwell <nathan@codesourcery.com>
PR c++/17681
* error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
* class.c (struct count_depth_data): Remove.
(dfs_depth_post, dfs_depth_q): Remove.
(find_final_overrider): Use number of vbase classes as depth
bound.
* cp-tree.h (types_overlap_p): Remove.
* search.c (struct overlap_info): Remove.
(dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove.
* pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove.
(get_template_base_recursive): Remove. Replace with ...
(get_template_base_r): ... this.
(struct get_template_base_data_s): New.
(get_template_base): Use get_template_base_r via dfs_walk. Always
return NULL on failure.
(unify): Remove error_mark_node check from get_template_base result.
2004-09-24 Paolo Bonzini <bonzini@gnu.org>
* parser.c (cp_parser_expression_stack): Clarify why it is
an array of NUM_PREC_VALUES elements.
(cp_parser_binary_expression): Clarify why we do not need to
handle stack overflow.
2004-09-24 Nathan Sidwell <nathan@codesourcery.com>
PR c++/16889
* search.c (lookup_field_queue_p): Correct check for hidden base.
* search.c (bfs_walk): Remove.
(lookup_member): Use dfs_walk_real.
(dfs_walk_real): Move and adjust documentation from bfs_walk.
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
PR tree-optimization/16372
* decl.c (finish_enum): Make the precision of the enumerated type
the same width as the underlying integer type.
2004-08-25 Mark Mitchell <mark@codesourcery.com>
PR c++/17155
* lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
functions.
* mangle.c (get_identifier_nocopy): Add cast.
* cp-tree.h (mangle_type): Remove.
* mangle.c (globals): GTY it.
(mangle_obstack): New variable.
(name_obstack): Likewise.
(name_base): Likewise.
(write_char): Adjust accordingly.
(write_chars): Likewise.
(write_string): Likewise.
(start_mangling): Initialize G.substitutions only one. Add
ident_p parameter.
(finish_mangling): Use VARRAY_CLEAR to reclaim
storage in G.substitutions. Use obstack_finish.
(init_mangle): Adjust for changes to variable names above.
Initialize G.substitutions.
(mangle_decl_string): Adjust call to start_mangling.
(get_identifier_nocopy): New function.
(mangle_decl): Use it.
(mangle_type_string): Adjust call to start_mangling.
(mangle_special_for_type): Likewise.
(mangle_vtt_for_type): Likewise.
(mangle_ctor_vtbl_for_type): Likewise.
(mangle_thunk): Likewise.
(mangle_guard_variable): Likewise.
(mangle_ref_init_variable): Likewise.
2004-08-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/14428
* pt.c (redeclare_class_template): Check the type of non-type and
template template parameter.
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.
* class.c (finish_struct_1, build_vtbl_initializer): Likewise.
* cp-gimplify.c (cp_gimplify_expr): Likewise.
* cvt.c (cp_convert_to_pointer): Likewise.
* decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
* decl2.c (start_static_initialization_or_destruction,
generate_ctor_or_dtor_function): Likewise.
* except.c (build_throw): Likewise.
* mangle.c (write_integer_cst): Likewise.
* method.c (finish_thunk): Likewise.
* rtti.c (build_headof, get_tinfo_decl_dynamic,
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.
2004-08-25 Adam Nemet <anemet@lnxw.com>
* 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
build_common_tree_nodes call.
2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
PR c++/16889
* (is_subobject_of_p): Resurrect & optimize.
(lookup_field_r): Use it.
2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/16706
* search.c (friend_accessible_p): Increment processing_template_decl
when deal with TEMPLATE_DECL of SCOPE.
2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
PR c++/17149
* semantics.c (check_accessibility_of_qualified_id): Defer check
if qualifying_type is a template parameter.
2004-08-23 Mark Mitchell <mark@codesourcery.com>
PR c++/17163
* pt.c (instantiate_decl): Do not try to apply
DECL_DECLARED_INLINED_P to a VAR_DECL.
* search.c (build_baselink): Fix typo in comment.
2004-08-22 Andrew Pinski <apinski@apple.com>
Revert:
2004-08-22 Andrew Pinski <apinski@apple.com>
PR c++/14029
* typeck.c (build_unary_op): Use &a.b if the folded lowered
expression is not constant.
2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
* name-lookup.c (pushdecl): Rename build_type_copy call.
* tree.c (cp_build_qualified_type_real,
build_exception_variant, handle_java_interface_attribute): Likewise.
2004-08-22 Andrew Pinski <apinski@apple.com>
PR c++/14029
* typeck.c (build_unary_op): Use &a.b if the folded lowered
expression is not constant.
2004-08-20 Mark Mitchell <mark@codesourcery.com>
PR c++/17121
* decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
PR c++/17120
* pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
MODOP_EXPR.
2004-08-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
before calling comp_template_args.
2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
* class.c (build_vtbl_initializer): Use build_int_cst for
negative size types.
* decl.c (complete_array_type): Likewise.
* method.c (finish_thunk): Likewise.
2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
* tree.c: Remove unused mark_local_for_remap_r.
2004-08-19 Eric Christopher <echristo@redhat.com>
* cp-tree.h (cxx_unsave_expr_now): Delete prototype.
* tree.c (cxx_unsave_expr_now): Delete.
(cp_unsave_r): Ditto.
2004-08-19 Mark Mitchell <mark@codesourcery.com>
PR c++/15890
* pt.c (push_template_decl_real): Disallow template allocation
functions with fewer than two parameters.
2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (build_shared_int_cst): Remove.
* tree.c (shared_int_cache): Remove.
(build_shared_int_cst): Remove.
* class.c (finish_struct_1): Use build_int_cst.
2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (finish_enum): Do not copy value node early, copy
later.
* lex.c (cxx_init): Force null_node to be unique.
2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
PR c++/17041
* pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
from input for MODOP_EXPR.
2004-08-18 Mark Mitchell <mark@codesourcery.com>
* pt.c (dependent_template_p): Fix typo in commment.
PR c++/17068
* pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
dependent.
2004-08-17 Mark Mitchell <mark@codesourcery.com>
PR c++/16246
* pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
arguments have the same type as the corresponding parameter.
PR c++/16215
* parser.c (cp_parser_name_lookup_error): If parser->object_scope
is set use it for diagnostic purposes.
(cp_parser_pseudo_destructor_name): Remove special-case error
message.
PR c++/15871
* semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
PR c++/16965
* cp-tree.h (qualified_name_lookup_error): Add parameter.
* name-lookup.c (do_class_using_decl): Restrict set of entities
passed to cp_emit_debug_info_for_using more carefully.
(lookup_qualified_name): Allow lookup_member to return sets of
ambiguous entries.
* parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
(cp_parser_primary_expression): Handle ambiguous lookups.
(cp_parser_template_name): Adjust use of cp_parser_lookup_name.
(cp_parser_template_argument): Likewise.
(cp_parser_elaborate_type_specifier): Likewise.
(cp_parser_namespace_name): Likewise.
(cp_parser_class_name): Likewise.
(cp_parser_lookup_name_simple): Likewise.
* pt.c (tsubst_qualified_id): Handle ambiguous results.
(tsubst_expr): Likewise.
* semantics.c (qualified_name_lookup_error): Add decl paramter.
For ambiguous lookups, print candidates.
2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/6749
* pt.c (instantiate_pending_templates): Add int parameter. Don't
return anything.
* cp-tree.h (instantiate_pending_templates): Adjust prototype.
* decl2.c (finish_file): Adjust call to
instantiate_pending_templates.
2004-08-15 Roger Sayle <roger@eyesopen.com>
* call.c (build_vfield_ref, build_call, build_conditional_expr,
convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
build_java_interface_fn_ref, build_special_member_call,
build_new_method_call, initialize_reference): Replace calls to
build with calls to buildN.
* class.c (build_base_path, convert_to_base_statically,
build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
build_vtbl_initializer): Likewise.
* cp-gimplify.c (genericize_try_block, genericize_catch_block,
gimplify_if_stmt, cp_genericize_r): Likewise.
* cvt.c (convert_to_void): Likewise.
* decl.c (check_initializer, finish_constructor_body,
finish_destructor_body): Likewise.
* error.c (dump_expr): Likewise.
* except.c (build_exc_ptr, expand_start_catch_block, build_throw):
Likewise.
* init.c (perform_member_init, expand_virtual_init,
expand_cleanup_for_base, build_init, expand_default_init,
build_offset_ref, decl_constant_value, build_new, build_new_1,
build_vec_delete_1, build_vec_init, build_delete,
push_base_cleanups, build_vec_delete): Likewise.
* mangle.c (write_integer_cst): Likewise.
* method.c (thunk_adjust, do_build_copy_constructor,
do_build_assign_ref): Likewise.
* pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
unify, build_non_dependent_expr): Likewise.
* rtti.c (build_headof, build_typeid, ifnonnull,
build_dyanmic_cast_1, tinfo_base_init): Likewise.
* semantics.c (begin_compound_stmt, finish_call_expr,
finish_pseudo_destructor_expr, finish_id_expression,
simplify_aggr_init_expr, finalize_nrv_r): Likewise.
* tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
array_type_nelts_total, stabilize_call): Likewise.
* typeck.c (decay_conversion, build_class_member_access_expr,
lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
build_x_unary_op, build_unary_op, unary_complex_lvalue,
build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
check_return_expr): Likewise.
* typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
split_nonconstant_init, store_init_value, build_m_component_ref):
Likewise.
2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
* call.c (convert_class_to_reference,
build_user_type_conversion_1, convert_like_real,
build_java_interface_fn_ref, build_special_member_call): Use
build_int_cst.
* class.c (build_vtbl_initializer): Likewise.
* cp-gimplify.c (cp_gimplify_expr): Likewise.
* cvt.c (cp_convert_to_pointer): Likewise.
* decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
* decl2.c (start_static_initialization_or_destruction,
generate_ctor_or_dtor_function): Likewise.
* except.c (build_throw): Likewise.
* lex.c (cxx_init): Likewise.
* mangle.c (write_integer_cst): Likewise.
* rtti.c (build_headof, get_tinfo_decl_dynamic,
build_dynamic_cast_1, ptr_initializer, ptm_initializer,
get_pseudo_ti_init): Likewise.
* search.c (get_dynamic_cast_base_type): Likewise.
* tree.c (build_shared_int_cst): Likewise.
2004-08-12 Mark Mitchell <mark@codesourcery.com>
PR c++/16273
* class.c (count_depth_data): New type.
(dfs_depth_post): New function.
(dfs_depth_q): Likewise.
(find_final_overrider_data_s): Change type of vpath.
Add vpath_list.
(dfs_find_final_overrider_1): New function.
(dfs_find_final_overrider): Use it.
(dfs_find_final_overrider_q): Adjust use of vpath.
(dfs_find_final_overrider_post): Likewise.
(find_final_overrider): Use dfs_depth. Allocate and deallocate
vpath_list.
2004-08-12 Jan Beulich <jbeulich@novell.com>
* parser.c (cp_parser_asm_definition): Properly consume scope operator
tokens preceding the clobbers. Don't check for scope operator
following inputs. Simplify inputs handling to match that now used for
clobbers.
2004-08-11 Mark Mitchell <mark@codesourcery.com>
PR c++/16698
* except.c (build_throw): Allocate cleanup_type and the function
for __cxa_throw separately.
PR c++/16853
* call.c (standard_conversion): Do not accept conversions between
pointers to members if the class types are unrelated.
PR c++/16618
* parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
char &" instead of just "char &".
PR c++/16870
* pt.c (tsubst): Just return the unknown_type_node.
2004-08-11 Mark Mitchell <mark@codesourcery.com>
PR c++/16964
* parser.c (cp_parser_class_specifier): Robustify.
PR c++/16904
* pt.c (tsubst_copy_and_build): Complain about invalid
qualification.
PR c++/16929
* pt.c (tsubst_default_argument): Clear out current_class_ptr and
current_class_ref while tsubsting.
2004-08-10 Mark Mitchell <mark@codesourcery.com>
PR c++/16971
* parser.c (cp_parser_init_declarator): Robustify.
2004-08-06 Richard Sandiford <rsandifo@redhat.com>
* typeck2.c (process_init_constructor): Guard the missing field warning
with warn_missing_field_initializers rather than extra_warnings.
2004-08-06 Paolo Bonzini <bonzini@gnu.org>
* class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
2004-08-05 Mark Mitchell <mark@codesourcery.com>
* decl.c (start_preparsed_function): Move determine_visibility
call.
* decl2.c (determine_visibility): Incorporate dllexport testing.
2004-08-05 Geoffrey Keating <geoffk@apple.com>
* g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
means that libstdc++ is needed.
2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
* cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
2004-08-04 Geoffrey Keating <geoffk@apple.com>
* decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
than passing it as a parameter to rest_of_decl_compilation.
* decl2.c (grokfield): Use set_user_assembler_name.
2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (complete_array_type): Don't gratuitously copy
maxindex. Its type is always set.
2004-08-04 Paul Brook <paul@codesourcery.com>
* Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
* cp-tree.h (struct language_function): Rename x_dtor_label to
x_cdtor_label.
(dtor_label): Rename ...
(cdtor_label): ... to this.
* decl.c (begin_constructor_body): Remove.
(check_special_function_return_type): Maybe change the return type.
(grokdeclarator): Pass the class type.
(start_preparsed_function): Constructors may need a return label.
(finish_constructor_body, finish_destructor_body): Set the return
value.
(begin_function_body): Don't call begin_constructor_body.
(finish_function): Don't warn for constructors or destructors.
(implicitly_declare_fn): Maybe change the return type.
* optimize.c: Include target.h.
(maybe_clone_body): Remap the function result.
* semantics.c: Include target.h.
(finish_return_stmt): Maybe jump to return label for constructors.
2004-08-03 Mark Mitchell <mark@codesourcery.com>
* class.c (build_vtable): Do not set DECL_VISIBILITY here.
(check_field_decls): Or here.
(check_methods): Or here.
(initialize_array): Don't mess with DECL_CONTEXT.
* cp-tree.h (start_decl): Adjust prototype.
(determine_visibility): New function.
* decl.c (duplicate_decls): Remove checks for hidden "operator
new".
(build_library_fn_1): Give all library functions default
visibility.
(start_decl): Add pop_scope_p parameter. Tidy.
(cp_finish_decl): Do not pop scopes here. Call
determine_visibility for variable definitions.
(start_preparsed_function): Call determine_visibility.
* decl2.c (determine_visibility): New function.
* method.c (use_thunk): Fix formatting.
* parser.c (cp_parser_condition): Adjust calls to start_decl.
(cp_parser_init_declarator): Likewise.
* pt.c (instantiate_decl): Always call pop_nested_class.
* rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
(tinfo_base_init): Likewise.
2004-08-02 Mark Mitchell <mark@codesourcery.com>
PR c++/16707
* name-lookup.c (validate_nonmember_using_decl): Robustify.
2004-08-01 Mark Mitchell <mark@codesourcery.com>
PR c++/16224
* name-lookup.c (decl_namespace): Remove.
(current_decl_namespace): Use decl_namespace_context instead of
decl_namespace.
(push_decl_namespace): Likewise.
(arg_assoc_class): Likewise.
(arg_assoc_type): Likewise.
* pt.c (check_specialization_namespace): New function.
(maybe_process_partial_specialization): Use it.
(register_specialization): Likewise.
PR c++/16489
* cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
* call.c (null_ptr_cst_p): Handle variables with constant
initializers.
* pt.c (convert_nontype_argument): Use
DECL_INTEGRAL_CONSTANT_VAR_P.
* semantics.c (finish_id_expression): Likewise.
PR c++/16529
* decl.c (duplicate_decls): Reject duplicate namespace
declarations.
PR c++/16810
* typeck.c (build_ptrmemfunc): Loosen assertion.
2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
* call.c (z_candidate::template_decl): Rename from template.
(add_template_candidate_real): Adjust member reference.
(joust): Likewise.
2004-07-29 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
(lang_decl_flags): Narrow the width of "languages". Add
repo_available_p.
(DECL_NEEDED_P): Remove.
(FOR_EACH_CLONE): New macro.
(DECL_REPO_AVAILABLE_P): Likewise.
(DECL_TINFO_P): Likewise.
(set_linkage_according_to_type): Declare.
(import_export_vtable): Remove.
(import_export_tinfo): Likewise.
(mark_needed): New function.
(decl_needed_p): Likewise.
(note_vauge_linkage_fn): Likewise.
(init_repo): Change prototype.
(repo_template_used): Remove.
(repo_template_instantiated): Likewise.
(repo_emit_p): New function.
(repo_export_class_p): Likewise.
(no_linkage_check): Change prototype.
* class.c (set_linkage_according_to_type): New function.
(build_vtable): Use it. Do not call import_export_vtable. Set
DECL_IGNORED_P if appropriate.
* decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
(make_rtL_for_nonlocal_decls): Check for template instantiations
explicitly.
(grokfndecl): Adjust call to no_linkage_check.
(set_linkage_for_static_data_member): New function.
(grokvardecl): Use it. Adjust call to no_linkage_check.
(grokdeclarator): Use set_linkage_for_static_data_member.
* decl2.c (note_vague_linkage_fn): New function.
(note_vague_linkage_var): Likewise.
(finish_static_data_member_decl): Use it.
(import_export_vtable): Remove.
(import_export_class): Use repo_export_class_p.
(var_finalized_p): Simplify.
(maybe_emit_vtables): Simplify.
(mark_needed): New function.
(decl_needed_p): Likewise.
(import_export_decl): Add documentation and consistency checks.
Use repo_emit_p. Handle virtual tables and RTTI information
here.
(import_export_tinfo): Remove.
(write_out_vars): Call import_export_decl.
(cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
whenever one is.
(finish_file): Use decl_needed_p. Do not call import_export_decl
for undefined static data members. Do not warn about undefined
inlines when using a repository.
(mark_used): Use note_vague_linkage_fn. Always defer template
instantiations.
* lex.c (cxx_init): Adjust call to init_repo. Always set
flag_unit_at_a-time.
* method.c (synthesize_method): Remove unncessary
import_export_decl call.
(implicitly_declare_fn): Use set_linkage_according_to_type.
* optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
* pt.c (instantiate_class_template): Don't redundantly add classes
to keyed_classes. Don't call repo_template_used.
(tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
templates with internal linkage.
(check_instantiated_args): Adjust call to no_linkage_check.
(instantiate_template): Use FOR_EACH_CLONE.
(mark_definable): New function.
(mark_decl_instantiated): Use it.
(do_decl_instantiation): Adjust tests for explicit instantiation
after "extern template".
(instantiate_class_member): Do not use repo_template_instantiated.
(do_type_instantiation): Simplify.
(instantiate_decl): Use mark_definable. Check repo_emit_p.
Simplify.
* repo.c (repo_get_id): Remove.
(original_repo): Remove.
(IDENTIFIER_REPO_USED): Remove.
(IDENTIFIER_REPO_CHOSEN): Remove.
Remove all #if 0'd code.
(repo_template_used): Remove.
(repo_template_instantiated): Remove.
(temporary_obstack_initialized_p): New variable.
(init_repo): Register with lang_post_pch_load. Avoid creating
identifiers unnecessarily. Don't use original_repo. Close the
file here.
(reopen_repo_file_for_write): Not here.
(finish_repo): Always write out a new repository file.
(repo_emit_p): New function.
(repo_export_class_p): Likewise.
* rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
(involves_incomplete_p): New function.
(tinfo_base_init): Use it.
(ptr_initializer): Remove non_public_ptr parameter.
(ptm_initializer): Likewise.
(get_pseudo_ti_init): Likewise.
(unemitted_tinfo_decl_p): Remove.
(emit_tinfo_decl): Use import_export_decl.
* semantics.c (expand_body): Move updates of static_ctors and
static_dtors to ...
(expand_or_defer_fn): ... here.
* tree.c (no_linkage_check): Add relaxed_p parameter.
2004-07-28 Eric Christopher <echristo@redhat.com>
* cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (struct tree_pair_s): New.
(typedef tree_pair_p): New.
(DEF_VEC_O(tree_pair_s)): New.
(struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
(CLASSTYPE_VCALL_INDICES): Update documentation.
* class.c (get_vcall_index): Adjust.
(add_vcall_offset): Adjust.
2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
* pt.c, typeck.c: Remove spurious carriage returns.
2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/14429
* pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
when the type of ARG is not dependent.
2004-07-26 Geoffrey Keating <geoffk@apple.com>
* g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
(lang_specific_driver): If the C++ or math library options don't
start with '-l', don't count them as added libraries.
2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (xref_basetypes): Adjust base access vector creation.
* rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
access accesses.
* search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
Brian Ryner <bryner@brianryner.com>
PR c++/15000
PR c++/9283
* class.c (check_field_decls): Apply hidden visibility if
-fvisibility-inlines-hidden and inlined unless otherwise specified
(build_vtable): Set vtable visibility to class visibility.
(check_field_decls): Default static member visibility to class
visibility.
(check_methods): Default method visibility to class visibility.
* cp-tree.h: Added CLASSTYPE_VISIBILITY and
CLASSTYPE_VISIBILITY_SPECIFIED macro.
* decl.c (duplicate_decls): New logic for merging definition decls
with declaration decls. Added ignore & warning when non default
applied to global operator new or delete.
* method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
wherever VISIBILITY was changed
* rtti.c (get_tinfo_decl): Set typeinfo visibility to class
visibility.
(tinfo_base_init): Set typeinfo name visibility to class visibility.
2004-07-25 Bernardo Innocenti <bernie@develer.com>
* decl.c: Rename all identifiers named `class' to `cl'.
* cp-tree.h: Likewise.
2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
* typeck2.c (abstract_virtuals_error): Use GGC_NEW.
* name-lookup.c (binding_entry_make): Use GGC_NEW.
(binding_table_construct): Use GGC_CNEWVEC.
(binding_table_new): Use GGC_NEW.
(cxx_binding_make): Likewise.
(begin_scope): Likewise.
(push_to_top_level): Use GCC_CNEW.
* parser.c (cp_token_cache_new): Likewise.
(cp_token_cache_push_token): Likewise.
(cp_lexer_new_main): Likewise.
(cp_lexer_new_from_tokens): Likewise.
(cp_parser_context_new): Likewise.
(cp_parser_new): Likewise.
(cp_lexer_new_from_tokens): Use GGC_NEWVEC.
* lex.c (cxx_make_type): Use GGC_CNEW.
(retrofit_lang_decl): Use GGC_NEWVAR.
(cxx_dup_lang_specific_decl): Likewise.
(copy_lang_type): Likewise.
* decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
(save_function_data): Likewise.
(lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
(cxx_push_function_context): Likewise.
2004-07-25 Richard Henderson <rth@redhat.com>
* decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
DECL_IGNORED_P on RESULT_DECL.
* semantics.c (finalize_nrv): Copy them too.
2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
* search.c (lookup_conversion_operator): Avoid two loops.
(add_conversions): Remove.
(check_hidden_convs, split_conversions,
lookup_conversions_r): New.
(lookup_conversions): Use lookup_conversions_r.
2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (get_template_base): Check type is completable.
2004-07-21 Eric Christopher <echristo@redhat.com>
* decl.c (poplevel): Inline unused variable checking.
Change formatting.
2004-07-21 Paolo Bonzini <bonzini@gnu.org>
* typeck.c (build_binary_op): Do not use RDIV_EXPR for
integer vectors.
2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/14497
* pt.c (check_explicit_specialization): Remove extension to accept
specializations without template headers. Fall-through to normal
processing.
2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/509
* pt.c (determine_specialization): New parameter template_count.
Disambiguate between member templates and member functions counting
the template headers.
(check_explicit_specialization): Update caller.
(tsubst_friend_function): Likewise.
2004-07-20 Steven Bosscher <stevenb@suse.de>
* cp-tree.def (TINST_LEVEL): Make it an 'x' node.
* cp-tree.h (tinst_level_t): New tree type.
(union lang_tree_node): Handle it.
(TINST_LOCATION): New accessor macro.
(make_tinst_level): New prototype.
* cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
* decl.c (cp_tree_node_structure): Likewise.
* error.c (print_instantiation_full_context): Use TINST_LOCATION.
(print_instantiation_partial_context): Likewise.
* pt.c (pop_tinst_level): Likewise.
(push_tinst_level): Use make_tinst_level.
* tree.c (make_tinst_level): New function.
(cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
2004-07-20 Mark Mitchell <mark@codesourcery.com>
* parser.c (cp_parser_simple_type_specifier): Fix typo.
PR c++/16637
* parser.c (cp_parser_simple_type_specifier): Do not record usage
of globally-qualified names.
2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/16175
* error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
cv qualifier.
2004-07-19 Mark Mitchell <mark@codesourcery.com>
PR c++/16623
* cp-tree.h (lang_type_class): Add lazy_assignment_op.
(CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
* class.c (add_implicitly_declared_members): Use
CLASSTYPE_LAZY_ASSIGNMENT_OP.
* method.c (lazily_declare_fn): Clear
CLASSTYPE_LAZY_ASSIGNMENT_OP.
* search.c (lookup_fnfields_1): Check it.
2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (vec_binfo_member): Remove.
* tree.c (vec_binfo_member): Remove.
* cp-tree.h (struct lang_type_class): Remove vfields field.
(CLASSTYPE_VFIELDS): Remove.
(SET_BINFO_NEW_VTABLE_MARKED): Adjust.
* class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
handling.
(dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
(finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
* init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (DEF_VEC_P(tree)): Remove here.
(BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
Moved to common.
(BINFO_LANG_SLOTS): Remove.
* tree.c (copy_binfo): Adjust BINFO creation and accessors.
* decl.c (xref_basetypes): Adjust BINFO creation and accessors.
* class.c (check_bases): Adjust BINFO accessors.
(determine_primary_base, finish_struct_bits,
maybe_warn_about_overly_private_class, warn_hidden,
walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
warn_about_ambiguous_bases, get_vfield_name,
dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
add_vcall_offset_vtbl_entries_r): Likewise.
* dump.c (cp_dump_tree): Likewise.
* init.c (sort_mem_initializers, expand_member_init, build_delete,
push_base_cleanups): Likewise.
* method.c (do_build_copy_constructor, do_build_assign_ref,
synthesize_exception_spec): Likewise.
name-lookup.c (arg_assoc_class): Likewise.
* pt.c (instantiate_class_template,
get_template_base_recursive): Likewise.
* rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
* typeck2.c (process_init_constructor): Likewise.
* search.c (lookup_base_r, dynamic_cast_base_recurse,
dfs_access_in_type, dfs_walk_real, look_for_overrides,
types_overlap_p, copied_binfo, original_binfo): Likewise.
(binfo_for_vtable): Remove
2004-07-20 Steven Bosscher <stevenb@suse.de>
* cp-tree.h (struct lang_decl_flags): Unify the template_info and
thunk_alias, and the access and virtual_offset fields.
(THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
* decl.c (finish_case_label): Update c_add_case_node call.
2004-07-19 Mark Mitchell <mark@codesourcery.com>
Revert patch for PR c++/16623.
2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
* except.c: Remove two spurious carriage returns.
2004-07-19 Mark Mitchell <mark@codesourcery.com>
PR c++/16623
* cp-tree.h (lang_type_class): Add lazy_assignment_op.
(CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
* class.c (add_implicitly_declared_members): Use
CLASSTYPE_LAZY_ASSIGNMENT_OP.
* method.c (lazily_declare_fn): Clear
CLASSTYPE_LAZY_ASSIGNMENT_OP.
* search.c (lookup_fnfields_1): Check it.
2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
* class.c (add_method): Delay adding the slot until the end.
(determine_primary_base): Adjust VEC_iterate invokation.
(resort_type_method_vec, finish_struct_methods, warn_hidden,
walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
build_vtbl_initializer): Likewise.
* init.c (sort_mem_initializers, build_delete, push_base_cleanups,
build_vbase_delete): Likewise.
* method.c (do_build_copy_constructor): Likewise.
* name-lookup.c (new_class_binding, print_binding_level,
poplevel_class, store_class_bindings, push_to_top_level,
pop_from_top_level): Likewise.
* pt.c (check_explicit_specialization): Likewise.
* search.c (lookup_conversion_operator, lookup_fnfields_1,
get_pure_virtuals, add_conversions, dfs_check_overlap,
binfo_for_vbase): Likewise.
2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/12170
* pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
innermost set of template arguments during deduction. Simplify.
2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
* typeck.c (build_modify_expr, build_x_modify_expr): Set
TREE_NO_WARNING on assignments with an operator other than '='.
2004-07-10 Steven Bosscher <stevenb@suse.de>
Joseph S. Myers <jsm@polyomino.org.uk>
* cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
* decl2.c (grokfield): Don't check current_class_depth via
unused TREE_COMPLEXITY.
* semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
to avoid the missing parentheses warning.
Don't set C_SET_EXP_ORIGINAL_CODE.
2004-07-18 Mark Mitchell <mark@codesourcery.com>
* tree.c (no_linkage_helper): Remove.
(no_linkage_check): Don't use walk_tree_without_duplicates.
* mangle.c (write_expression): Issue a sorry for zero-operand
functional casts.
2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/13092
* init.c (build_offset_ref): Build SCOPE_REF with non-null
TREE_TYPE for non-dependent names.
* typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
* pt.c (type_dependent_expression_p): Handle SCOPE_REF with
unknown_type_node as its TREE_TYPE.
* cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
* error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
(dump_expr) <SCOPE_REF case>: Likewise.
2004-07-17 Jason Merrill <jason@redhat.com>
PR c++/16115
* call.c (type_passed_as): Make the invisible reference type
__restrict.
* cp-gimplify.c (gimplify_cleanup_stmt): Rename to
cp_genericize_r. Handle invisible reference lowering.
(is_invisiref_parm): New fn.
(cp_genericize): Adjust the types of invisible reference parms.
Don't repeat the walk for clones.
* decl.c (store_parm_decls): Don't generate any code for clones.
2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
* cp-tree.h (builtin_function): Declare.
2004-07-16 Mark Mitchell <mark@codesourcery.com>
* class.c (finish_struct_methods): Remove unncessary code.
(add_implicitly_declared_members): Create declarations for default
constructors and copy constructors lazily.
* cp-tree.h (lang_type_class): Remove lazy_default_ctor and
lazy_copy_ctor.
(CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
(CLASSTYPE_LAZY_COPY_CTOR): Likewise.
* decl2.c (check_classfn): Robustify.
(locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
(locate_ctor): Handle lazy default constructors.
(locate_copy): Handle lazy copy constructors.
(implicitly_declare_fn): Make sure we're looking at the
TYPE_MAIN_VARIANT for a class before creating functions. Don't
set TYPE_HAS_CONSTRUCTOR.
(lazily_declare_fn): New function.
* name-lookup.c (constructor_name_full): Simplify.
* search.c (lookup_fnfields_1): Lazily create methods, as
necessary.
(lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
2004-07-16 Steven Bosscher <stevenb@suse.de>
* cp-tree.h (struct lang_type): Don't have three GTY options on a
single bit GTY desc.
2004-07-16 Richard Henderson <rth@redhat.com>
* cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
* cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
* tree.c (cp_copy_res_decl_for_inlining): Remove.
2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
* class.c (finish_struct_bits): Use for loop.
(propagate_binfo_offsets): Do primary binfo outside of loop.
PR c++/16583
* dump.c (cp_dump_tree): Don't dump the bases if there's no
binfo.
* pt.c (tsubst) <TREE_BINFO case>: We should never get here.
2004-07-15 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (lang_type_class): Remove has_real_assign_ref and
has_abstract_assign_ref. Make methods a VEC(tree) *.
(TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
(CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
(CLASSTYPE_DESTRUCTORS): Likewise.
(TYPE_HAS_REAL_ASSIGN_REF): Remove.
(TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
(add_method): Change prototoype.
* class.c (add_method): Remove error_p parameter. Adjust for
changes to CLASSTYPE_METHOD_VEC.
(handle_using_decl): Adjust call to add_method.
(maybe_warn_about_overly_private_class): Adjust for
changes to CLASSTYPE_METHOD_VEC.
(resort_type_method_vec): Likewise.
(finish_struct_methods): Likewise.
(check_for_override): Likewise.
(warn_hidden): Likewise.
(add_implicitly_declared_members): Defer creation of assignment
operators. Adjust call to add_method.
(clone_function_decl): Adjust call to add_method.
(check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
(finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
* decl.c (grok_special_member_properties): Don't set
TYPE_HAS_ABSTRACT_ASSIGN_REF.
* decl2.c (check_classfn): Adjust for
changes to CLASSTYPE_METHOD_VEC.
* method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
(locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
(locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
(implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
cp_finish_decl.
* pt.c (check_explicit_specialization): Adjust for
changes to CLASSTYPE_METHOD_VEC.
(instantiate_class_template): Do not set
TYPE_HAS_ABSTRACT_ASSIGN_REF.
* ptree.c (cxx_print_type): Don't try to print
CLASSTYPE_METHOD_VEC.
* rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
* search.c (lookup_field_r): Adjust for
changes to CLASSTYPE_METHOD_VEC.
(lookup_fnfields): Likewise.
(lookup_conversion_operator): Likewise.
(lookup_fnfields_1): Likewise. Create assignment operators
lazily.
(look_for_overrides_here): Adjust for
changes to CLASSTYPE_METHOD_VEC.
(add_conversions): Likewise.
* semantics.c (finish_member_declaration): Adjust call to add_method.
2004-07-15 Jason Merrill <jason@redhat.com>
* cp-lang.c (cxx_types_compatible_p): To the middle-end,
references and pointers are compatible.
2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (xref_basetypes): Refactor.
* tree.c (copy_base_binfos): Replace with ...
(copy_binfo): ... this. Deep copy the given binfo, (not the just
bases of the given base).
* cp-tree.h (copy_base_binfo): Remove.
(copy_binfo): Declare.
2004-07-15 Mark Mitchell <mark@codesourcery.com>
* name-lookup.c (set_inherited_value_binding_p): Add class_type
parameter.
(get_class_binding): Adjust.
(push_class_level_binding): Don't use set_inherited_value_binding_p.
2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
* class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
* decl.c (xref_basetypes): Set it here.
* class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
Don't check for incomplete base.
(get_vfield_name): Simplify while loop.
* decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
2004-07-14 Mark Mitchell <mark@codesourcery.com>
* lex.c (cxx_make_type): Remove call to get_pointer_type.
* cp-tree.h (IDENTIFIER_VALUE): Remove.
(BINFO_PUSHDECLS_MARKED): Likewise.
(maybe_inject_for_scope_var): Likewise.
(push_class_decls): Likewise.
* name-lookup.h (push_class_binding): Remove.
(innermost_non_namespace_value): New function.
(outer_binding): Likewise.
* class.c (add_method): Push bindings before adding to
TYPE_METHODS.
(restore_class_cache): Do not restore class_shadowed.
(pushclass): Do not add USING_DECLs. Do not call
push_class_decls.
* config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
* decl.c (pushdecl): Use outer_binding.
(poplevel): Set the scope for an out-of-scope for-loop declaration
appropriately.
(cp_finish_decl): Don't call maybe_inject_for_scope_var.
* name-lookup.c (new_class_binding): New function.
(push_binding): Use it.
(pushdecl): Use innermost_non_namespace_value.
(maybe_inject_for_scope_var): Remove.
(push_class_binding): Remove.
(set_inherited_value_binding_p): New function.
(get_class_binding): New function.
(push_class_level_binding): Assert that the current_class_type is
being defined.
(outer_binding): New function.
(innermost_non_namespace_value): Likewise.
(lookup_name_real): Use outer_binding.
(lookup_name_current_level): Ignore out-of-scope variables.
* pt.c (check_template_shadow): Use innermost_non_namespace_value.
(lookup_template_class): Likewise.
* search.c (dfs_push_type_decls): Remove.
(dfs_push_decls): Likewise.
(setup_class_bindings): Likewise.
(lookup_field_1): Handle USING_DECLs from dependent scopes.
(marked_pushdecls_p): Remove.
(unmarked_pushdecls_p): Remove.
(marked_identifiers): Remove.
(setup_class_bindings): Remove.
(dfs_push_type_decls): Remove.
(dfs_push_decls): Remove.
(push_class_decls): Remove.
2004-07-13 Mark Mitchell <mark@codesourcery.com>
PR c++/16518
PR c++/16337
* decl.c (grokvardecl): Make declspecs parameter const.
(grokdeclarator): Likewise. Adjust accordingly.
* decl.h (grokdeclarator): Adjust declaration.
* parser.c (cp_parser_init_declarator): Do not clear
decl_specifiers->attributes.
* cp-tree.h (lang_identifier): Remove class_value.
(IDENTIFIER_CLASS_VALUE): Remove.
(pop_class_decls): Likewise.
(init_search_processing): Likewise.
* class.c (handle_using_decl): Use lookup_member, not
IDENTIFIER_CLASS_VALUE.
(restore_class_cache): New function, split out from ...
(pushclass): ... here. Do not call clear_identifier_class_values.
(invalidate_class_lookup_cache): Do not clear
IDENTIFIER_CLASS_VALUE.
(popclass): Do not call pop_class_decls.
(maybe_note_name_used_in_class): Do not save names looked up after
the class is complete. Use lookup_member, not
IDENTIFIER_CLASS_VALUE.
* config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
* decl.c (cxx_init_decl_processing): Do not call
init_search_processing.
* method.c (do_build_copy_constructor): Remove unnecessary code.
(do_build_assign_ref): Likewise.
* name-lookup.c (pushdecl): Use lookup_member, not
IDENTIFIER_CLASS_VALUE.
(set_identifier_type_value_with_scope): Set TREE_TYPE on the
type_shadowed list.
(poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
(push_class_binding): Do not set it.
(clear_identifier_class_values): Remove.
(push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
(store_binding): Do not save it.
(pop_from_top_level): Do not restore it.
* name-lookup.h (cxx_saved_binding): Remove class_value.
(clear_identifier_class_values): Remove.
* ptree.c (cxx_print_identifier): Do not print
IDENTIFIER_CLASS_VALUE.
* search.c (search_obstack): Remove.
(push_stack_level): Remove.
(pop_stack_level): Remove.
(search_level): Remove.
(search_stack): Remove.
(lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
(setup_class_bindings): Use IDENTIFIER_MARKED, not
IDENTIFIER_CLASS_VALUE.
(marked_identifiers): New variable.
(push_class_decls): Clear IDENTIFIER_MARKED.
(pop_class_decls): Don't call pop_search_level.
(init_search_processing): Remove.
2004-07-12 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (get_aggr_typedef): Remove.
* init.c (get_aggr_typedef): Likewise.
* name-lookup.c (push_class_level_binding): Simplify.
2004-07-12 Andrew Pinski <apinski@apple.com>
PR c++/16475
Revert:
2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
PR c++/16276
* rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
is not public.
2004-07-12 Eric Christopher <echristo@redhat.com>
* parser.c (cp_parser_class_head): Remove unused variable.
2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
* decl.c (grok_op_properties): Reject [de-]allocation functions
declared in a namespace, or declared as static.
2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (make_binfo): Remove.
* decl.c (xref_basetypes): Use make_tree_binfo directly.
* tree.h (copy_base_binfos): Likewise.
(make_binfo): Remove.
* call.c (build_user_type_conversion_1, build_new_op,
check_constructor_callable, build_temp,
perform_direct_initialization_of_possible): Pass type directly to
lookup_fnfields & build_special_member_call.
(build_special_member_call): Accept a type, and complete it.
* class.c (finish_stuct_bits): Copy the BINFOs here.
* cvt.c (ocp_convert): Pass type directly to
build_special_member_call.
* decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
(xref_basetypes): Allocate the binfo here. Adjust.
* init.c (build_init, build_new_1): Pass type directly to
build_special_member_call.
* lex.c (cxx_make_type): Do not allocate binfo here.
* name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
* parser.c (cp_parser_class_head): Always call xref_basetypes.
* pt.c (instantiate_class_template): Likewise. Inhibit access
checking for template friends.
* ptree.c (cxx_print_type): Adjust record printing.
* search.c (lookup_base): When taking a type, complete it before
looking for a binfo.
(lookup_member): Delay completing a type.
(push_class_decls): Don't walk an incomplete type.
(lookup_conversions): Likewise.
* semantics.c (finish_stmt_expr_expr): Pass type directly to
build_special_member_call.
* tree.c (copy_base_binfos): Adjust.
(make_binfo): Likewise.
* typeck.c (build_modify_expr): Pass type directly to
build_special_member_call.
* typeck2.c (process_init_constructor): Check a binfo exists.
(build_m_component_ref): Allow accessing an incomplete type.
(build_functional_cast): Pass type directly to
build_special_member_call.
2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/2204
* config-lang.in (gtfiles): Add typeck2.c.
* Make-lang.in: Tweak typeck2.c dependencies, and add rule for
gt-cp-typeck2.h.
* cp-tree.h: Declare complete_type_check_abstract.
* typeck2.c (pat_calc_hash, pat_compare,
complete_type_check_abstract): New functions.
(abstract_virtuals_error): If the type is abstract, register the
declaration within abstract_pending_vars for further checks.
Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
* decl.c (cp_finish_decl): Do not strip array types.
(create_array_type_for_decl): Check for abstractness of the element
type.
(complete_vars): Call complete_type_check_abstract.
* class.c (finish_struct): Prepare a list of virtual functions for
template types, and call complete_vars on it to check for abstractness.
2004-07-12 Paolo Bonzini <bonzini@gnu.org>
PR tree-optimization/14107
* decl.c (finish_function): Remove temporary band-aid.
2004-07-11 Mark Mitchell <mark@codesourcery.com>
* call.c (build_operator_new_call): Avoid using push_to_top_level.
(build_new_op): Adjust call to lookup_function_nonclass.
* name-lookup.c (identifier_type_value): Adjust call to
lookup_name_real.
(lookup_name_real): Add block_p parameter.
(lookup_name_nonclass): Adjust call to lookup_name_real.
(lookup_function_nonclass): Likewise.
(lookup_name): Likewise.
* name-lookup.h (lookup_name_real): Change prototype.
(lookup_name_nonclass): Likewise.
* parser.c (cp_parser_lookup_name): Likewise.
* cp-tree.h (saved_scope): Make old_bindings a vector.
(unuse_fields): Remove.
* name-lookup.h (cxx_saved_binding): Define it.
* class.c (pushclass): Don't use unuse_fields.
* name-lookup.c (cxx_saved_binding_make): Remove.
(store_binding): Add new bindings to a vector, using an
accumulator style, rather than adding them to a list.
(store_bindings): Adjust accordingly.
(store_class_bindings): Likewise.
(push_to_top_level): Likewise.
(pop_from_top_level): Likewise.
* optimize.c (maybe_clone_body): Must push_to_top_level and
pop_from_top_level calls outside of loop.
* parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
calls here from cp_parser_late_parsing_default_args.
(cp_parser_save_default_args): Record the class type in which the
function is declared.
(cp_parser_late_parsing_default_args): Do not call
push_nested_class/pop_nested_class.
* search.c (dfs_unuse_fields): Remove.
(unuse_fields): Remove.
2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
* cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
* cp-tree.h (poplevel): Declare.
(set_block): Remove.
* decl.c (set_block): Remove.
2004-07-10 Mike Stump <mrs@apple.com>
* decl2.c (import_export_class): Never export/import vtables
with inline key functions.
2004-07-09 Steven Bosscher <stevenb@suse.de>
* typeck.c (c_expand_asm_operands): Remove.
2004-07-09 Mike Stump <mrs@apple.com>
* typeck.c (build_class_member_access_expr): Skip null deref
warning when we don't dereference it.
2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/8211
PR c++/16165
* class.c (check_field_decls): Improve -Weffc++ warning: do not
warn for pointers to functions/members, or for classes without
destructors.
2004-07-08 Mark Mitchell <mark@codesourcery.com>
* name-lookup.h (struct cp_binding_level): Update documentation
for class_shadowed.
2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/16169
* typeck.c (check_return_expr): Improve -Weffc++ warning: handle
returning CALL_EXPR, and non-reference return type.
2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
* name-lookup.c (push_binding): Use VEC_reserve.
2004-07-08 Richard Henderson <rth@redhat.com>
* cp-tree.h (expand_eh_spec_block): Remove.
2004-07-07 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (saved_scope): Remove x_previous_class_type and
x_previous_class_values; add x_previous_class_level.
(previous_class_type): Remove.
(previous_class_values): Remove.
(previous_class_level): New macro.
* class.c (pushclass): Restore the identifier cache more
expeditiously.
(invalidate_class_lookup_cache): Use vector for class_shadowed and
previous_class_values.
* decl.c (poplevel): Likewise.
* name-lookup.c (cxx_binding_init): New function.
(cxx_binding_make): Use it.
(push_binding): For a binding in a class level, use a vector of
cp_class_binding nodes.
(push_binding_level): New function.
(begin_scope): Use it.
(leave_scope): Do not put class binding levels on the free list.
(print_binding_level): Adjust for the fact that class_shadowed is
a vector.
(poplevel_class): Likewise.
(clear_identifier_class_values): Likewise.
(push_class_level_binding): Likewise.
(set_class_shadows): Remove.
(store_binding): New function.
(store_class_bindings): New function.
(push_to_top_level): Use store_class_bindings as appropriate.
(pop_from_top_level): Use previous_class_level, not
previous_class_type.
* name-lookup.h (cp_class_binding): New type.
(cp_binding_level): Use a vector object for class_shadowed.
(push_binding_level): Declare.
(set_class_shadows): Remove.
2004-07-07 Andrew Pinski <apinski@apple.com>
* class.c (instantiate_type): BUFFER_REF is dead.
* lex.c (init_operators): IN_EXPR is dead.
2004-07-07 Jason Merrill <jason@redhat.com>
PR c++/16334
* call.c (build_new_op): Give overload warnings for built-in
candidates.
2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
PR c++/16276
* rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
is not public.
2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
* class.c (build_primary_vtable, check_bases,
determine_primary_base, finish_struct_bits,
maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
get_basefndecls, warn_hidden, walk_subobject_offsets,
build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
finish_struct_1, get_vfield_name, contains_empty_class_p,
dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
BINFO macros.
* decl.c (xref_basetypes): Likewise.
* dump.c (cp_dump_tree): Likewise.
* error.c (dump_expr): Likewise.
* init.c (sort_mem_initializers, expand_member_init,
push_base_cleanups): Likewise.
* method.c (do_build_copy_constructor, do_build_assign_reg,
synthesize_exception_spec): Likewise.
* name-lookup.c (arg_assoc_class): Likewise.
* pt.c (instantiate_class_template, tsubst,
get_template_base_recursive): Likewise.
* ptree.c (cxx_print_type): Likewise.
* rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
* search.c (lookup_base_r, dynamic_cast_base_recurse,
dfs_access_in_type, access_in_type, lookup_field_queue_p,
bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
binfo_for_vtable, copied_binfo, original_binfo): Likewise
* tree.c (copy_base_binfos, make_binfo): Likewise.
* typeck.c (commmon_base_type): Likewise
* typeck2.c (process_init_constructor): Likewise
2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
* decl.c (check_tag_decl): Name redeclared type in diagnostic.
2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/3671
* pt.c (convert_nontype_argument): Disallow conversions between
different enumeration types.
2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (BINFO_MARKED): Remove.
(BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
(SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
* class.c (build_base_path): Use BINFO_VIRTUAL_P.
(mark_primary_bases, determine_primary_base, base_derived_from,
dfs_find_final_overrider, dfs_find_final_overrider_q,
dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
dfs_modify_vtables, walk_subobject_offsets,
layout_nonempty_base_or_field, build_base_field,
build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
build_ctor_vtbl_group, accumulate_vtble_inits,
dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
add_vcall_offset_vtbl_entries_1): Likewise.
* decl.c (xref_basetypes): Incoming virtual base indicated by
TREE_TYPE. Adjust.
* dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
* init.c (finish_init_stmts, sort_mem_initializers,
emit_mem_initializers, build_vtble_address, expand_member_init,
push_base_cleanups): Likewise.
* method.c (do_build_copy_constructor): Likewise.
* pt.c (instantiate_class_template,
get_template_base_recursive): Likewise.
* rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
get_pseudo_ti_desc): Likewise.
* search.c (lookup_base_r, dynamic_cast_base_recurse,
binfo_from_vbase, binfo_via_virtual, copied_binfo,
original_binfo): Likewise.
* semantics.c (finish_base_specifier): Virtualness is indicated
by TREE_TYPE.
* tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
2004-07-06 Mark Mitchell <mark@codesourcery.com>
Revert:
2004-06-24 Jason Merrill <jason@redhat.com>
PR c++/16115
* decl.c (grokparms): Give the PARM_DECL reference type if the
parameter is passed by invisible reference.
2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* cp-lang.c (cp_var_mod_type_p): Add extra arg.
* decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
* pt.c (check_instantiated_args, unify): Likewise.
2004-07-05 Phil Edwards <phil@codesourcery.com>
* Make-lang.in (check-c++, lang_checks): Add some comments.
2004-07-05 Zack Weinberg <zack@codesourcery.com>
* cp-mudflap.c: Delete file.
* Makefile.in: Remove all references to cp-mudflap.o.
2004-07-05 Zack Weinberg <zack@codesourcery.com>
* decl.c (cxx_init_decl_processing): Call
build_common_tree_nodes before creating the global NAMESPACE_DECL.
2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/2518
* call.c (build_operator_new_call): Look only at global scope.
2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
* call.c (enforce_access): Expect TREE_BINFO.
* class.c (binfo_ctor_vtable): Check TREE_BINFO.
* cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
(BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
Adjust.
(BINFO_LANG_ELTS): Remove.
(BINFO_LANG_SLOTS): New.
(TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
(CLASSTYPE_TEMPLATE_INFO): Adjust.
* pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
* search.c (lookup_member): Check TREE_BINFO.
* semantics.c (perform_or_defer_access_check): Likewise.
(check_accessibility_of_qualified_id): Check
deferred_access_no_check.
* tree.c (make_binfo): Use make_tree_binfo.
2004-07-04 Mark Mitchell <mark@codesourcery.com>
* method.c (implicitly_declare_fn): Set linkage of generated
functions.
2004-07-04 Richard Henderson <rth@redhat.com>
* typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
PR c++/3761
* name-lookup.c (push_class_level_binding): Don't pass a
TREE_LIST of ambiguous names to check_template_shadow as it
only handles declarations. Instead, pull the declaration
out and pass that.
2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/14971
* pt.c (check_explicit_specialization): Clarify error message.
2004-07-02 Richard Henderson <rth@redhat.com>
* tree.c (cp_unsave_r): Update remap_save_expr call.
2004-07-02 Mark Mitchell <mark@codesourcery.com>
PR c++/16240
* mangle.c (write_template_arg): Correct mangling.
PR c++/16297
* decl.c (grokdeclarator): Robustify.
2004-07-01 Richard Henderson <rth@redhat.com>
* class.c (fixed_type_or_null): Don't handle RTL_EXPR.
* method.c (synthesize_method): Don't clear_last_expr.
* name-lookup.c (maybe_push_cleanup_level): Likewise.
2004-07-01 Nick Clifton <nickc@redhat.com>
* decl2.c (import_export_class): Invoke the
import_export_class field in the gcc_target structure if it is not
empty.
2004-06-30 Richard Henderson (rth@redhat.com>
* decl.c (start_preparsed_function): Don't set immediate_size_expand.
* method.c (use_thunk): Likewise.
2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
* call.c (build_over_call), typeck.c (build_function_call): Call
check_function_arguments instead of check_function_format.
2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
* call.c (build_over_call), typeck.c (build_function_call): Update
calls to check_function_format.
2004-06-30 Richard Henderson <rth@redhat.com>
* call.c (build_over_call): Use __builtin_memcpy for copying
CLASS_AS_BASE rather than funny casting.
2004-06-30 Richard Henderson <rth@redhat.com>
* init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
TYPE_SIZE_UNIT of full_type.
2004-06-30 Per Bothner <per@bothner.com>
Conditionally compile support for --enable-mapped_location.
* decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
* decl2.c: If USE_MAPPED_LOCATION, don't do some line number
adjustments - which I don't understand.
* error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
* error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
(print_instantiation_partial_context): Use expand_location.
* decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
* name-lookup.c: Likewise.
* lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
* name-lookup.c: Use input_line macro.
* parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
(cp_parser_statement): Rename locaal variable statement_locus to
statement_location and use SET_EXPR_LOCATION macro.
* pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
* tree.c (cp_walk_subtrees): Likewise.
2004-06-29 Per Bothner <per@bothner.com>
* tree.c (build_min_nt, build_min, build_min_non_dep):
Don't set TREE_COMPLEXITY from input_line.
2004-06-29 Paul Brook <paul@codesourcery.com>
* init.c: Include target.h.
(get_cookie_size): Remove and replace with target hook.
Update callers.
(build_new_1): Store the element size in the cookie.
2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
PR c++/16260
* parser.c (cp_parser_template_declaration_after_export): Disable
access checks here ...
(cp_parser_class_specifier): ... not here.
2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
TREE_CHECK macro.
2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (struct deferred_access): Move to ...
* semantics.c (struct deferred_access): ... here. Adjust.
(deferred_access_stack): Make a VEC(deferred_access),
(deferred_access_free_list): Remove.
(deferred_access_no_check): New.
(push_deferring_access_checks, resume_deferring_access_checks,
stop_deferring_access_checks, pop_deferring_access_checks,
get_deferred_access_checks, pop_to_parent_deferring_access_checks,
perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
PR c++/16174
* call.c (build_temp): Declare.
(check_constructor_callable): New.
(reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
CONSTRUCTOR_CALLABLE.
(convert_like_real, initialize_reference): Use
check_constructor_callable.
* cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
(LOOKUP_*): Renumber.
2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
* friend.c (add_friend): Only perform access checks when context
is a class.
* lex.c (cxx_make_type): Only create a binfo for aggregate types.
* parser.c (cp_parser_class_specifier): Disable access checks here
when parsing the body of a templated class.
* semantics.c (perform_or_defer_access_checks): Reorder to allow
NULL binfos when not checking access.
2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
Use vector API for vbase list.
* cp-tree.h: Include vec.h
(DEF_VEC_P (tree)): New type.
(struct lang_type_class): Change vbase's member type.
(binfo_for_vbase): Declare.
* class.c (determine_primary_base, base_derived_from,
update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
build_vtbl_initializer): Adjust.