gcc/gcc/cp/ChangeLog

7958 lines
277 KiB
Plaintext
Raw Normal View History

2005-04-15 Kazu Hirata <kazu@cs.umass.edu>
* cp-tree.h (lang_type_class): Remove redefined. Move
java_interface into where redefined was. Increment the width
of dummy.
(TYPE_REDEFINED): Remove.
2005-04-14 Kazu Hirata <kazu@cs.umass.edu>
* cp-tree.h (SET_TMPL_ARG, ENUM_TI_TEMPLATE, ENUM_TI_ARGS,
CLASSTYPE_TEMPLATE_LEVEL): Remove.
2005-04-11 Mark Mitchell <mark@codesourcery.com>
* decl2.c (determine_visibility): Don't use export_class_data.
(import_export_decl): Honor TARGET_CXX_CLASS_DATA_ALWAYS_WEAK and
TARGET_CXX_DETERMINE_CLASS_DATA_VISIBILITY.
2005-04-09 Kazu Hirata <kazu@cs.umass.edu>
* cp-tree.h (cxx_alignof): Remove.
* cp-tree.h (DECL_ARRAY_DELETE_OPERATOR_P): Remove.
* cp-tree.h (EXCEPTION_CLEANUP_NAME, B_SET, B_CLR, B_TST,
CONV_STATIC_CAST): Remove.
* pt.c (UNIFY_ALLOW_MAX_CORRECTION): Remove.
* cp-tree.h (VF_BINFO_VALUE, VF_BASETYPE_VALUE): Remove.
* cp-tree.h (cp_deprecated): Remove.
c-common.def: Move FOR_STMT... ./ * c-common.def: Move FOR_STMT, WHILE_STMT, DO_STMT, BREAK_STMT, CONTINUE_STMT, and SWITCH_STMT to cp/cp-tree.def. * c-common.h (WHILE_COND, WHILE_BODY): Move to cp/cp-tree.h. (DO_COND, DO_BODY): Likewise. (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY): Likewise. (SWITCH_STMT_COND, SWITCH_STMT_BODY, SWITCH_STMT_TYPE): Likewise. (c_common_stmt_codes): Remove FOR_STMT, WHILE_STMT, DO_STMT, BREAK_STMT, CONTINUE_STMT, and SWITCH_STMT. (build_continue_stmt, build_break_stmt): Don't declare. (c_do_switch_warnings): Update declaration. * c-gimplify.c (enum bc_t): Remove. (struct c_gimplify_ctx, ctxp): Remove. (push_context, pop_context): Remove static functions. (c_genericize): Don't call push_context or pop_context. (begin_bc_block, finish_bc_block): Remove static functions. (build_bc_goto): Likewise. (gimplify_c_loop): Likewise. (gimplify_for_stmt, gimplify_while_stmt): Likewise. (gimplify_do_stmt, gimplify_switch_stmt): Likewise. (c_gimplify_expr): Remove handling of FOR_STMT, WHILE_STMT, DO_STMT, SWITCH_STMT, CONTINUE_STMT, BREAK_STMT. * c-common.c (c_do_switch_warnings): Rename from c_do_switch_warnings_1. (c_do_switch_warnings) [old version]: Remove. (c_do_switch_expr_warnings): Remove. * c-typeck.c (c_finish_case): Call new c_do_switch_warnings function instead of c_do_switch_expr_warnings. * c-dump.c (c_dump_tree): Remove handling of BREAK_STMT, CONTINUE_STMT, DO_STMT, FOR_STMT, SWITCH_STMT, and WHILE_STMT. * c-pretty-print.c (pp_c_statement): Likewise. * c-semantics.c (build_break_stmt, build_continue_stmt): Remove. cp/ * cp-tree.def: Define FOR_STMT, WHILE_STMT, DO_STMT, BREAK_STMT, CONTINUE_STMT, SWITCH_STMT. * cp-tree.h (cp_stmt_codes): Add FOR_STMT, WHILE_STMT, DO_STMT, BREAK_STMT, CONTINUE_STMT, SWITCH_STMT. (WHILE_COND, WHILE_BODY): Define. (DO_COND, DO_BODY): Define. (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY): Define. (SWITCH_STMT_COND, SWITCH_STMT_BODY, SWITCH_STMT_TYPE): Define. * cp-gimplify.c (enum bc_t): Define. (struct cp_gimplify_ctx, ctxp): Define. (push_context, pop_context): New static functions. (begin_bc_block, finish_bc_block): New static functions. (build_bc_goto): New static function. (gimplify_cp_loop, gimplify_for_stmt): New static functions. (gimplify_while_stmt, gimplify_do_stmt): Likewise. (gimplify_switch_stmt): Likewise. (cp_gimplify_expr): Handle FOR_STMT, WHILE_STMT, DO_STMT, SWITCH_STMT, CONTINUE_STMT, BREAK_STMT. (cp_genericize): Call push_context and pop_context. * semantics.c (finish_break_stmt): Just call build_stmt (BREAK_STMT) rather than build_break_stmt. (finish_continue_stmt): Corresponding change. * decl.c (pop_switch): Update call to c_do_switch_warnings for new parameters. * cxx-pretty-print.c (pp_cxx_statement): Handle SWITCH_STMT, WHILE_STMT, DO_STMT, FOR_STMT, BREAK_STMT, CONTINUE_STMT. * dump.c (cp_dump_tree): Likewise. From-SVN: r97885
2005-04-09 05:18:18 +02:00
2005-04-08 Ian Lance Taylor <ian@airs.com>
* cp-tree.def: Define FOR_STMT, WHILE_STMT, DO_STMT, BREAK_STMT,
CONTINUE_STMT, SWITCH_STMT.
* cp-tree.h (cp_stmt_codes): Add FOR_STMT, WHILE_STMT, DO_STMT,
BREAK_STMT, CONTINUE_STMT, SWITCH_STMT.
(WHILE_COND, WHILE_BODY): Define.
(DO_COND, DO_BODY): Define.
(FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY): Define.
(SWITCH_STMT_COND, SWITCH_STMT_BODY, SWITCH_STMT_TYPE): Define.
* cp-gimplify.c (enum bc_t): Define.
(struct cp_gimplify_ctx, ctxp): Define.
(push_context, pop_context): New static functions.
(begin_bc_block, finish_bc_block): New static functions.
(build_bc_goto): New static function.
(gimplify_cp_loop, gimplify_for_stmt): New static functions.
(gimplify_while_stmt, gimplify_do_stmt): Likewise.
(gimplify_switch_stmt): Likewise.
(cp_gimplify_expr): Handle FOR_STMT, WHILE_STMT, DO_STMT,
SWITCH_STMT, CONTINUE_STMT, BREAK_STMT.
(cp_genericize): Call push_context and pop_context.
* semantics.c (finish_break_stmt): Just call build_stmt
(BREAK_STMT) rather than build_break_stmt.
(finish_continue_stmt): Corresponding change.
* decl.c (pop_switch): Update call to c_do_switch_warnings for new
parameters.
* cxx-pretty-print.c (pp_cxx_statement): Handle SWITCH_STMT,
WHILE_STMT, DO_STMT, FOR_STMT, BREAK_STMT, CONTINUE_STMT.
* dump.c (cp_dump_tree): Likewise.
2005-04-08 Mark Mitchell <mark@codesourcery.com>
PR c++/20905
* parser.c (cp_parser_type_specifier_seq): Add is_condition
parameter.
(cp_parser_new_type_id): Pass it.
(cp_parser_condition): Likewise.
(cp_parser_conversion_type_id): Likewise.
(cp_parser_type_id): Likewise.
(cp_parser_type_specifier_seq): In a condition, do not allow
invalid type-specifier combinations.
(cp_parser_exception_declaration): Adjust call to
cp_parser_type_specifier_seq.
* cp-tree.def (TINST_LEVEL): Document TINST_IN_SYSTEM_HEADER_P.
* cp-tree.h (struct tinst_level): Add in_system_header_p.
(TINST_IN_SYSTEM_HEADER_P): New macro.
(make_tinst_level): Remove.
* pt.c (lookup_template_class): Preserve DECL_IN_SYSTEM_HEADER on
the instantiated class.
(push_tinst_level): Do not use make_tinst_level. Set
TINST_IN_SYSTEM_HEADER_P.
(pop_tinst_level): Likewise.
(instantiate_class_template): Set in_system_header.
(instantiate_pending_templates): Likewise.
* tree.c (make_tinst_level): Remove.
2005-04-06 Joseph S. Myers <joseph@codesourcery.com>
* decl.c (start_decl): Apply pending #pragma weak regardless of
scope.
2005-04-06 Mark Mitchell <mark@codesourcery.com>
PR c++/20212
* pt.c (regenerate_decl_from_template): Copy attributes for
parameters from the pattern to the instantiation.
2005-04-05 Mark Mitchell <mark@codesourcery.com>
PR c++/20734
* cp-tree.def (OFFSET_REF): Correct comments.
* init.c (build_offset_ref): Remove misleading comment.
* typeck.c (build_unary_op): Handle pointer-to-member creation
here, rather than ...
(unary_complex_lvalue): ... here.
2005-04-06 Jason Merrill <jason@redhat.com>
PR c++/19312
* tree.c (stabilize_init): Don't bother trying to stabilize
something with no side-effects.
2005-04-05 20:21:00 +02:00
2005-04-05 Mark Mitchell <mark@codesourcery.com>
PR c++/20763
* decl.c (grokdeclarator): Correct attribute handling.
2005-04-05 Mark Mitchell <mark@codesourcery.com>
PR c++/19159
* decl2.c (import_export_decl): Use non-COMDAT external linkage
for virtual tables, typeinfo, etc. that will be emitted in only
one translation unit on systems without weak symbols.
2005-04-04 Mark Mitchell <mark@codesourcery.com>
PR c++/20679
* parser.c (cp_parser_template_name): Fix thinko.
2005-04-04 Nathan Sidwell <nathan@codesourcery.com>
PR c++/20746
* method.c (use_thunk): Protect covariant pointer return
adjustments from NULL pointers.
2005-04-04 Jan Hubicka <jh@suse.cz>
* decl2.c (finish_objects): Revert my previous patch.
(cp_finish_file): Likewise.
2005-04-03 Kazu Hirata <kazu@cs.umass.edu>
* pt.c: Fix comment typos.
2005-04-03 Nathan Sidwell <nathan@codesourcery.com>
PR c++/20723
* pt.c (more_specialized_fn): Member functions are unordered wrt
non-members. Conversion operators are unordered wrt other
functions.
2005-04-01 Nathan Sidwell <nathan@codesourcery.com>
* call.c (add_template_candidates_real): Remove length parameter
from fn_type_unification call.
* class.c (resolve_address_of_overloaded_function): Likewise
* cp-tree.h (fn_type_unification): Remove length parameter.
* pt.c (get_bindings_overload): Remove.
(get_bindings_real): Rename to ...
(get_bindings): ... here. Remove length and strict
parameters. Change return type flag to boolean. Remove original
forwarding function.
(determine_specialization): Adjust get_bindings call.
(fn_type_unification): Remove length parameter. Adjust.
(type_unification_real): Remove length parameter. Adjust.
(resolve_overloaded_unification): Adjust get_bindings call.
(try_one_overload): Simplify confusing cascaded if control flow.
(unify): Remove length paramter from type_unification_real call.
(most_specialized_instantiation): Adjust get_bindings calls.
(most_specialized): Likewise.
2005-03-31 Nathan Sidwell <nathan@codesourcery.com>
PR c++/19203, implement DR 214
* call.c (joust): Use more_specialized_fn.
* cp-tree.h (DEDUCE_ORDER): Remove.
(more_specialized): Replace with ...
(more_specialized_fn): ... this.
* pt.c (maybe_adjust_types_for_deduction): Remove DEDUCE_ORDER
case.
(type_unification_real): Remove DEDUCE_ORDER case.
(more_specialized): Replace with ...
(more_specialized_fn): ... this. Implement DR 214.
(most_specialized_instantiation): Use get_bindings_real directly.
2005-03-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
PR c++/18644
* call.c (build_new_op): Remove check for -Wsynth.
[multiple changes] 2005-03-31 Jan Hubicka <jh@suse.cz> 2004-11-02 Jan Hubicka <jh@suse.cz> * cgraph.c (cgraph_varpool_node_name): New function. (dump_cgraph_varpool_node): New function. (dump_varpool): New function. * cgraphunit.c (cgraph_optimize): Dump varpool. 2004-10-16 Jan Hubicka <jh@suse.cz> * cgraph.c (decide_is_variable_needed): New function. (cgraph_varpool_finalize_decl): Use it. * cgraphunit.c (cgraph_optimize): Assemble_pending_decls when not doing unit-at-a-time. * final.c (output_addr_const): Do not call mark_referenced. * passes.c (rest_of_decl_compilation): ifdef out DECL_RTL_SET_P hack; always go via cgraph. * toplev.c (wrapup_global_declarations): Kill non-unit-at-a-time code. (check_global_declarations): Ifdef out code clearing DECL_RTL. * tree-optimize.c (execute_inline): Mark functions called. * i386.c (output_pic_addr_const): Do not call mark_decl_referenced. 2004-10-11 Jan Hubicka <jh@suse.cz> * cgraph.c (cgraph_varpool_first_unanalyzed_node): New global voriable (cgraph_varpool_last_needed_node): New static variable. (enqueue_needed_varpool_node): Break out from ...; add items to the end of queue; update first pointers. (cgraph_varpool_mark_needed_node): ... here. (cgraph_varpool_finalize_decl): Use enqueue_needed_varpool_node. (cgraph_varpool_assemble_pending_decls): Move to cgraphunit.c * cgraph.h (cgraph_varpool_node): Add analyzed field. (cgraph_varpool_first_unanalyzed_node): Declare. * cgraphunit.c: Include output.h. (cgraph_varpool_analyze_pending_decls): New function. (cgraph_varpool_assemble_pending_decls): Move from cgraph.c; bail out for errors, analyze pending decls. (cgraph_finalize_compilation_unit): Only analyze decls. (cgraph_optimize): Assemble the decls after expanding. From-SVN: r97287
2005-03-31 00:28:02 +02:00
2005-03-31 Jan Hubicka <jh@suse.cz>
* decl2.c (finish_objects): Mark ctor as needed.
(cp_finish_file): Output variables only in nonunit-at-a-time.
2005-03-29 Richard Henderson <rth@redhat.com>
PR c/20519
* decl.c (cp_complete_array_type): Rename from complete_array_type.
Use the new complete_array_type in c-common.c. Update all callers.
* cp-tree.h (cp_complete_array_type): Update to match.
2005-03-24 Geoffrey Keating <geoffk@apple.com>
* typeck.c (build_static_cast_1): Allow scalar_cast between
any integral, floating, or enumeration type.
2005-03-24 Steven Bosscher <stevenb@suse.de>
* typeck.c (comptypes): First determine if the types are compatible
from a target-independent point of view. Check target attributes
last.
* class.c (build_base_path):
(build_vbase_offset_vtbl_entries):
(add_vcall_offset): Replace fold (buildN (...)) with fold_buildN.
* error.c (dump_expr): Likewise.
* init.c (build_zero_init, expand_cleanup_for_base,
build_vec_delete_1): Likewise.
* mangle.c (write_integer_cst): Likewise.
* method.c (thunk_adjust): Likewise.
* pt.c (convert_nontype_argument, tsubst, unify): Likewise.
* tree.c (cxx_print_statistics, array_type_nelts_total): Likewise.
* typeck.c (build_ptrmemfunc_access_expr,
(get_member_function_from_ptrfunc): Likewise.
2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
* cp-objcp-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
* cp-tree.h (perform_integral_promotions): Remove.
(default_conversion): Add.
2005-03-22 Mark Mitchell <mark@codesourcery.com>
* parser.c (cp_parser_warn_min_max): New function.
(cp_parser_binary_expression): Use it.
(cp_parser_assignment_operator_opt): Likewise.
(cp_parser_operator): Likewise.
2005-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/19980
* decl.c (start_preparsed_function): Robustify.
2005-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/20499
* parser.c (cp_parser_class_head): Return NULL_TREE when
encountering a redefinition.
2005-03-22 Nathan Sidwell <nathan@codesourcery.com>
PR c++/20465
PR c++/20381
* typeck.c (build_ptrmemfunc): Allow OFFSET_REF when processing a
template.
2005-03-21 Paolo Carlini <pcarlini@suse.de>
PR c++/20461
PR c++/20536
* init.c (emit_mem_initializers): Don't crash on undefined
types.
2005-03-21 Paolo Carlini <pcarlini@suse.de>
PR c++/20147
* semantics.c (finish_stmt_expr_expr): Return immediately
if error_operand_p (expr).
2005-03-21 Joseph S. Myers <joseph@codesourcery.com>
* cp-tree.h (lvalue_or_else, lvalue_p): New.
* typeck.c (lvalue_or_else): New. Call lvalue_error.
2005-03-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/20240
* decl.c (decls_match): Compare context of VAR_DECL.
2005-03-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/20333
* parser.c (cp_parser_postfix_expression) <case RID_TYPENAME>:
Check the return value of cp_parser_nested_name_specifier.
2005-03-18 Paolo Carlini <pcarlini@suse.de>
PR c++/20463
* parser.c (cp_parser_diagnose_invalid_type_name):
Check TYPE_BINFO (current_class_type) before attempting
to emit inform messages.
2005-03-17 Paolo Carlini <pcarlini@suse.de>
PR c++/19966
* cp-tree.h (grok_op_properties): Change return type to void.
* decl.c (grok_op_properties): Return early - don't check the
arity - in case of a static member or an operator that cannot
be non-member; tidy a bit.
2005-03-17 Nathan Sidwell <nathan@codesourcery.com>
PR c++/20186
* pt.c (contains_dependent_cast_p): Remove.
(fold_non_dependent_expr): Don't use it.
(value_dependent_expression_p): Use a switch statement.
reference_exprs can be dependent.
2005-03-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/4403
PR c++/9783, DR433
* name-lookup.c (pushtag): Skip template parameter scope when
scope is ts_global. Don't push tag into template parameter
scope.
* pt.c (instantiate_class_template): Reorder friend class
template substitution to handle non-dependent friend class
that hasn't been previously declared.
Friend class name lookup 5/n PR c++/1016 Friend class name lookup 5/n PR c++/1016 * cp-tree.h (pushtag): Adjust declaration. * decl.c (lookup_and_check_tag): Call lookup_type_scope if lookup_name fails. (xref_tag): Adjust call to pushtag. Make hidden class visible. (start_enum): Adjust call to pushtag. * name-lookup.c (ambiguous_decl): Ignore hidden names. (qualify_lookup): Change return type to bool. (hidden_name_p): New function. (lookup_namespace_name, unqualified_namespace_lookup, lookup_name_real): Use it. (lookup_type_scope): Update comments. (maybe_process_template_type_declaration): Change parameter name from globalize to is_friend. (pushtag): Change globalize parameter of type int to tag_scope. Hide name if introduced by friend declaration. * name-lookup.h (hidden_name_p): Add declaration. * parser.c (cp_parser_lookup_name): Don't deal with hidden name here. * pt.c (push_template_decl_real): Make hidden class template visible. (lookup_template_class, instantiate_class_template): Adjust call to pushtag. * semantics.c (begin_class_definition): Likewise. * rtti.c (init_rtti_processing, build_dynamic_cast_1, tinfo_base_init, emit_support_tinfos): Use ts_current instead of ts_global. * g++.dg/lookup/hidden-class1.C: New test. * g++.dg/lookup/hidden-class2.C: Likewise. * g++.dg/lookup/hidden-class3.C: Likewise. * g++.dg/lookup/hidden-class4.C: Likewise. * g++.dg/lookup/hidden-class5.C: Likewise. * g++.dg/lookup/hidden-class6.C: Likewise. * g++.dg/lookup/hidden-class7.C: Likewise. * g++.dg/lookup/hidden-class8.C: Likewise. * g++.dg/lookup/hidden-class9.C: Likewise. * g++.dg/lookup/hidden-temp-class1.C: Likewise. * g++.dg/lookup/hidden-temp-class2.C: Likewise. * g++.dg/lookup/hidden-temp-class3.C: Likewise. * g++.dg/lookup/hidden-temp-class4.C: Likewise. * g++.dg/lookup/hidden-temp-class5.C: Likewise. * g++.dg/lookup/hidden-temp-class6.C: Likewise. * g++.dg/lookup/hidden-temp-class7.C: Likewise. * g++.dg/lookup/hidden-temp-class8.C: Likewise. * g++.dg/lookup/hidden-temp-class9.C: Likewise. * g++.dg/lookup/hidden-temp-class10.C: Likewise. * g++.dg/lookup/hidden-temp-class11.C: Likewise. From-SVN: r96430
2005-03-14 15:33:54 +01:00
2005-03-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
Friend class name lookup 5/n
PR c++/1016
* cp-tree.h (pushtag): Adjust declaration.
* decl.c (lookup_and_check_tag): Call lookup_type_scope if
lookup_name fails.
(xref_tag): Adjust call to pushtag. Make hidden class visible.
(start_enum): Adjust call to pushtag.
* name-lookup.c (ambiguous_decl): Ignore hidden names.
(qualify_lookup): Change return type to bool.
(hidden_name_p): New function.
(lookup_namespace_name, unqualified_namespace_lookup,
lookup_name_real): Use it.
(lookup_type_scope): Update comments.
(maybe_process_template_type_declaration): Change parameter name
from globalize to is_friend.
(pushtag): Change globalize parameter of type int to tag_scope.
Hide name if introduced by friend declaration.
* name-lookup.h (hidden_name_p): Add declaration.
* parser.c (cp_parser_lookup_name): Don't deal with hidden name
here.
* pt.c (push_template_decl_real): Make hidden class template
visible.
(lookup_template_class, instantiate_class_template): Adjust call
to pushtag.
* semantics.c (begin_class_definition): Likewise.
* rtti.c (init_rtti_processing, build_dynamic_cast_1,
tinfo_base_init, emit_support_tinfos): Use ts_current instead of
ts_global.
2005-03-13 Mark Mitchell <mark@codesourcery.com>
PR c++/20157
* pt.c (determine_specialization): Reject non-specializations.
2005-03-11 Per Bothner <per@bothner.com>
* cp-tree.h (struct cp_declarator): New id_loc field.
* cp/parser.c (cp_lexer_get_preprocessor_token): Set cp_token's
location using c_lex_with_flags, instead of input_location.
(cp_parser_direct_declarator): Set declarator's id_loc from
cp_token's id_loc.
2005-03-10 Jakub Jelinek <jakub@redhat.com>
PR c++/18384, c++/18327
* decl.c (reshape_init_array): Use UHWI type for max_index_cst
and index. Convert max_index to size_type_node if it isn't
host_integerp (, 1).
2005-03-09 Mark Mitchell <mark@codesourcery.com>
PR c++/20208
* pt.c (tsubst_decl): Apply array-to-pointer and
function-to-pointer conversions to function arguments.
(regenerate_decl_from_template): Likewise.
2005-03-09 Paolo Carlini <pcarlini@suse.de>
PR c++/16859
* decl.c (complete_array_type): In pedantic mode, return
3 for an empty initializer list as the initializer for an
array of unknown bound (8.5.1/4).
(maybe_deduce_size_from_array_init): Fix final test to use
the above.
2005-03-08 Nathan Sidwell <nathan@codesourcery.com>
PR c++/20186
* pt.c (contains_dependent_cast_p): New.
(fold_non_dependent_expr): Call it.
2005-03-08 Mark Mitchell <mark@codesourcery.com>
PR c++/20142
* cp-tree.h (target_type): Remove.
* decl.c (layout_var_decl): Remove #if 0'd code.
(cp_finish_decl): Remove dead code.
* init.c (build_vec_init): When determining whether or not the
element type has an asignment operator, look through all array
dimensions.
* typeck.c (target_type): Remove.
2005-03-07 Mark Mitchell <mark@codesourcery.com>
* class.c (finish_struct_1): Do not warn about non-virtual
destructors in Java classes.
2005-03-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/19311
* init.c (build_offset_ref): Don't build non-dependent SCOPE_REF.
* pt.c (build_non_dependent_expr): Don't build NON_DEPENDENT_EXPR
for OFFSET_TYPE.
* typeck.c (build_x_unary_op): Don't build non-dependent SCOPE_REF.
Also set PTRMEM_OK_P for NON_DEPENDENT_EXPR.
(build_unary_op): Handle building ADDR_EXPR of OFFSET_REF inside
template.
2005-03-02 Alexandre Oliva <aoliva@redhat.com>
* name-lookup.c (push_overloaded_decl): Don't error if the new
decl matches the old one.
* decl.c (redeclaration_error_message): Likewise.
2005-03-01 Per Bothner <per@bothner.com>
* decl.c (finish_function): Use SET_EXPR_LOCATION instead of
unavailable annotate_with_file_line, if USE_MAPPED_LOCATION.
2005-03-01 Nathan Sidwell <nathan@codesourcery.com>
PR c++/20232
* class.c (update_vtable_entry_for_fn): Don't crash on invalid
covariancy.
* cp-tree.g (THUNK_TARGET): Expand comment.
* method.c (use_thunk): Make sure we also use the target, if that
is a thunk.
2005-02-27 Jakub Jelinek <jakub@redhat.com>
PR c++/20206
* decl.c (cxx_comdat_group): Put thunks for
TARGET_USE_LOCAL_THUNK_ALIAS_P (function) functions into the same
comdat group as the thunk target.
2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
* call.c, class.c, cp-tree.h, decl2.c, error.c, init.c, mangle.c,
parser.c: Fix comment typo(s).
2005-02-24 Jakub Jelinek <jakub@redhat.com>
PR c++/20175
* decl.c (reshape_init): Don't warn about missing braces if STRING_CST
initializes a char/wchar_t array.
2005-02-23 Mark Mitchell <mark@codesourcery.com>
PR c++/19878
* decl.c (grokvardecl): Set DECL_INTERFACE_KNOWN for declarations
with internal linkage.
2005-02-23 Alexandre Oliva <aoliva@redhat.com>
* decl.c (grokvardecl): Don't exempt anonymous types from having
linkage for variables that have linkage other than "C".
2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
* cp-objcp-common.h, error.c: Update copyright.
2005-02-22 Mark Mitchell <mark@codesourcery.com>
PR c++/20073
* decl.c (start_decl_1): Don't clear TREE_READONLY.
(cp_finish_decl): Likewise.
(complete_vars): Call cp_apply_type_quals_to_decl.
* typeck.c (cp_apply_type_quals): Avoid setting TREE_READONLY in
cases where that's not valid.
PR c++/19991
* init.c (integral_constant_value): Iterate if the value of a decl
is itself a constant.
PR c++/20152
* parser.c (cp_parser_class_head): Check for redefintions here.
* semantics.c (begin_class_definition): Not here.
PR c++/20153
* decl2.c (build_anon_union_vars): Add type parameter.
(finish_anon_union): Pass it.
PR c++/20148
* error.c (dump_expr): Do not print the body of a BIND_EXPR.
Handle STATEMENT_LIST.
PR c++/19883
* parser.c (cp_parser_direct_declarator): Always complain about
non-constant array bounds when in a function scope.
* semantics.c (finish_id_expression): Do not mark dependent names
as non-constant.
2005-02-21 Douglas Gregor <dgregor@cs.indiana.edu>
PR c++/19076
PR c++/6628
* cp-tree.h (cp_apply_type_quals_to_decl): Declared.
* decl.c (grokdeclarator): Pedwarn about qualifying a function
type.
Add qualifiers when declaring a typedef of a function type.
Member function pointers pick up the qualifiers of the typedef
used to declare them.
Don't complain about creating cv-qualified function types.
Complain about qualified function typedefs that are used to
declare non-static member functions or free functions.
Use cp_apply_type_quals_to_decl.
(start_preparsed_function): Use cp_apply_type_quals_to_decl.
(grokclassfn): Use cp_apply_type_quals_to_decl.
* error.c (dump_type_suffix): Print qualifiers for function
types.
* pt.c (tsubst_decl): Use cp_apply_type_quals_to_decl.
(tsubst): When substituting a function type into a member
pointer type, pass along the qualifiers.
(unify): Unify member pointers to member function pointers.
* tree.c (cp_build_qualified_type_real): Function types may be
qualified. This includes restrict qualifiers.
* typeck.c (cp_apply_type_quals_to_decl): New function to replace
use of c_apply_type_quals_to_decl. Drops qualifiers that are being
added to function types.
2005-02-20 Zack Weinberg <zack@codesourcery.com>
PR 18785
* cp-objcp-common.h (LANG_HOOKS_TO_TARGET_CHARSET): Set to
c_common_to_target_charset. Delete bogus comment.
2005-02-18 Richard Henderson <rth@redhat.com>
PR libstdc++/10606
* except.c (do_get_exception_ptr): New.
(expand_start_catch_block): Use it.
2005-02-19 Jakub Jelinek <jakub@redhat.com>
* decl.c (start_decl_1): Only check TYPE_NEEDS_CONSTRUCTING
if type is not error_mark_node.
2005-01-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/19508
* decl2.c (grokfield): Do not apply attributes to template parameters
as they are ignored by tsubst anyway.
2005-02-18 Jakub Jelinek <jakub@redhat.com>
PR c++/19813
* decl.c (start_decl_1): Clear TREE_READONLY flag if
its type has TYPE_NEEDS_CONSTRUCTING.
(complete_vars): Likewise.
2005-02-17 Alexandre Oliva <aoliva@redhat.com>
PR c++/20028
* class.c (finish_struct): Initialize TYPE_SIZE_UNIT of a
template along with TYPE_SIZE.
PR c++/20022
* semantics.c (perform_deferred_access_checks): Use
get_deferred_access_checks to get the top of the stack.
2005-02-15 Alexandre Oliva <aoliva@redhat.com>
PR c++/17788
* class.c (add_implicitly_declared_members, check_field_decl)
(check_field_decls, check_bases): Remove arguments, tests and
assignments of cant_have_default_ctor-related variables.
2005-02-15 Alexandre Oliva <aoliva@redhat.com>
* decl2.c (mark_used): Set the source location of the used decl to
the current input location here...
* method.c (synthesize_method): ... not here. Set input_location
from the decl instead.
2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
PR c++/19608
* parser.c (cp_parser_late_parsing_for_member): Use
current_function_decl as scope to push to and from.
PR c++/19884
* pt.c (check_explicit_specialization): Make sure namespace
binding lookup found an overloaded function.
(lookup_template_function): Just assert FNS is an overloaded
function.
PR c++/19895
* decl.c (grokdeclarator): Check for error mark node in ptrmem
construction.
2005-02-14 Alexandre Oliva <aoliva@redhat.com>
PR c++/17816
* decl.c (redeclaration_error_message): Report redefinition of
pure virtual function.
2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
PR c++/19891
* class.c (build_simple_base_path): Build the component_ref
directly.
(update_vtable_entry_for_fn): Walk the covariant's binfo chain
rather than using lookup_base.
* search.c (dfs_walk_once): Add non-recursive assert check.
* typeck.c (build_class_member_access_expr): It is possible for
the member type to be both const and volatile.
2005-02-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/14479
PR c++/19487
* pt.c (maybe_check_template_type): Remove.
* cp-tree.h (maybe_check_template_type): Remove prototype.
* name-lookup.c (maybe_process_template_type_declaration): Don't
use maybe_check_template_type.
2005-02-11 Richard Henderson <rth@redhat.com>
PR c++/19632
* pt.c (get_mostly_instantiated_function_type): Save and restore
flag_access_control instead of push/pop_access_scope.
2005-02-10 Mark Mitchell <mark@codesourcery.com>
PR c++/19755
* decl.c (reshape_init): Issue warnings about missing braces.
2005-02-11 Kazu Hirata <kazu@cs.umass.edu>
* cp-tree.def, except.c, ptree.c: Update copyright.
2005-02-09 Mark Mitchell <mark@codesourcery.com>
PR c++/19811
* call.c (build_op_delete_call): Check COMPLETE_TYPE_P before
attempting name lookup.
* parser.c (cp_parser_unqualified_id): Initialize type_decl.
PR c++/19787
* call.c (initialize_reference): Robustify.
PR ++/19732
* decl.c (grokdeclarator): Check for invalid use of destructor
names.
PR c++/19762
* parser.c (cp_parser_unqualified_id): Avoid creating destructor
names with invalid types.
PR c++/19826
* parser.c (cp_parser_direct_declarator): Allow type-dependent
expressions as array bounds.
PR c++/19739
* parser.c (cp_parser_attributes_list): Allow empty lists.
re PR c++/19733 (ICE on invalid destructor call) PR c++/19733 * class.c (add_method): Don't set TYPE_HAS_DESTRUCTOR. (check_bases): Give warnings about a base class with a non-virtual destructor, even if it is implicit. (finish_struct_bits): Don't copy TYPE_HAS_DESTRUCTOR. (maybe_warn_about_overly_private_class): Don't use TYPE_HAS_DESTRUCTOR. (finish_struct_methods): Don't set TYPE_HAS_DESTRUCTOR. (check_for_override): Give it external linkage. (add_implicitly_declared_members): Generate destructors lazily. (check_field_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not TYPE_HAS_DESTRUCTOR. (check_bases_and_members): Call check_methods before check_field_decls. (check_bases_and_members): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not TYPE_HAS_DESTRUCTOR. (finish_struct_1): Do not use TYPE_HAS_DESTRUCTOR. * cp-tree.def (PSEUDO_DTOR_EXPR): Document. * cp-tree.h (TYPE_HAS_DESTRUCTOR): Remove. (lang_type_class): Add lazy_destructor. (CLASSTYPE_LAZY_DESTRUCTOR): New macro. (CLASSTYPE_DESTRUCTORS): Robustify. (TYPE_HAS_DESTRUCTOR): Remove. (check_for_override): Declare. (build_vbase_delete): Remove. * cvt.c (convert_to_void): Issue errors about pseudo-destructor expressions. * decl.c (cxx_maybe_build_cleanup): Remove dead code. * except.c (dtor_nothrow): Lazily create destructors if necessary. (build_throw): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. * init.c (build_delete): Lazily create destructors, if necessary. (build_vbase_delete): Remove. * method.c (locate_dtor): Simplify. (implicitly_declare_fn): Add support for destructors. * parser.c (cp_parser_lookup_name): Lazily create destructors, if necessary. * pt.c (check_explicit_specialization): Don't use TYPE_HAS_DESTRUCTOR. (instantiate_class_template): Likewise. * ptree.c (cxx_print_type): Don't print TYPE_HAS_DESTRUCTOR. * rtti.c (emit_support_tinfos): Robustify. * search.c (lookup_fnfields_1): Lazily create destructors. * typeck.c (build_class_member_access_expr): Remove PSEUDO_DTOR_EXPR handling. (lookup_destructor): Likewise. PR c++/19733 * g++.dg/parse/crash23.C: New test. * g++.dg/warn/Weff1.C: New test. From-SVN: r94759
2005-02-09 03:53:41 +01:00
2005-02-08 Mark Mitchell <mark@codesourcery.com>
PR c++/19733
* class.c (add_method): Don't set TYPE_HAS_DESTRUCTOR.
(check_bases): Give warnings about a base class with a
non-virtual destructor, even if it is implicit.
(finish_struct_bits): Don't copy TYPE_HAS_DESTRUCTOR.
(maybe_warn_about_overly_private_class): Don't use
TYPE_HAS_DESTRUCTOR.
(finish_struct_methods): Don't set TYPE_HAS_DESTRUCTOR.
(check_for_override): Give it external linkage.
(add_implicitly_declared_members): Generate destructors lazily.
(check_field_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
TYPE_HAS_DESTRUCTOR.
(check_bases_and_members): Call check_methods before
check_field_decls.
(check_bases_and_members): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
TYPE_HAS_DESTRUCTOR.
(finish_struct_1): Do not use TYPE_HAS_DESTRUCTOR.
* cp-tree.def (PSEUDO_DTOR_EXPR): Document.
* cp-tree.h (TYPE_HAS_DESTRUCTOR): Remove.
(lang_type_class): Add lazy_destructor.
(CLASSTYPE_LAZY_DESTRUCTOR): New macro.
(CLASSTYPE_DESTRUCTORS): Robustify.
(TYPE_HAS_DESTRUCTOR): Remove.
(check_for_override): Declare.
(build_vbase_delete): Remove.
* cvt.c (convert_to_void): Issue errors about pseudo-destructor
expressions.
* decl.c (cxx_maybe_build_cleanup): Remove dead code.
* except.c (dtor_nothrow): Lazily create destructors if necessary.
(build_throw): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
* init.c (build_delete): Lazily create destructors, if necessary.
(build_vbase_delete): Remove.
* method.c (locate_dtor): Simplify.
(implicitly_declare_fn): Add support for destructors.
* parser.c (cp_parser_lookup_name): Lazily create destructors, if
necessary.
* pt.c (check_explicit_specialization): Don't use
TYPE_HAS_DESTRUCTOR.
(instantiate_class_template): Likewise.
* ptree.c (cxx_print_type): Don't print TYPE_HAS_DESTRUCTOR.
* rtti.c (emit_support_tinfos): Robustify.
* search.c (lookup_fnfields_1): Lazily create destructors.
* typeck.c (build_class_member_access_expr): Remove
PSEUDO_DTOR_EXPR handling.
(lookup_destructor): Likewise.
2005-02-08 Kazu Hirata <kazu@cs.umass.edu>
* cxx-pretty-print.c, cxx-pretty-print.h, decl.h: Update
copyright.
2005-02-07 Mark Mitchell <mark@codesourcery.com>
* parser.c (cp_lexer_start_debugging): Avoid arithmetic operations
on boolean variables.
(cp_lexer_stop_debugging): Likewise.
2005-02-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/17401
* parser.c (cp_parser_pure_specifier): Emit a specific error
message with an invalid pure specifier.
* decl2.c (grok_function_init): Remove.
(grokfield): An initializer for a method is a always a pure
specifier.
2005-02-02 Matt Austern <austern@apple.com>
PR c++/19628
* cp-tree.h (builtin_valid_in_constant_expr_p): Declare.
* parser.c (cp_parser_postfix_expression): Accept function call in
constant expression if builtin_valid_in_constant_expr_p is true
for that function.
* pt.c (value_dependent_expression_p): Handle CALL_EXPRs properly.
* semantics.c (finish_id_expression): Accept function call in constant
expression if builtin_valid_in_constant_expr_p is true for that
function.
* tree.c (builtin_valid_in_constant_expr_p): New.
2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/17413
* pt.c (check_instantiated_args): Improve error message.
Fix logic when to print its second part.
2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
* cp-tree.h (complete_type_or_else): Remove macro.
(complete_type_or_diagnostic): Rename to complete_type_or_else
and remove last argument.
* typeck.c (complete_type_or_diagnostic): Rename to
complete_type_or_else and remove last argument.
2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
* cp-tree.h (commonparms): Remove prototype.
(convert_arguments): Likewise.
(PFN_FROM_PTRMEMFUNC): Remove.
* typeck.c (commonparms): Make static.
(convert_arguments): Add prototype. Make static.
(PFN_FROM_PTRMEMFUNC): Replace by pfn_from_ptrmemfunc.
2005-01-31 Mark Mitchell <mark@codesourcery.com>
* parser.c (cp_parser_primary_expression): Don't complain about
floating-point literals in integral constant expressions when
!pedantic.
2005-02-01 Alexandre Oliva <aoliva@redhat.com>
* parser.c (cp_parser_template_id): Revert comment patch too.
PR c++/18757
PR c++/19366
PR c++/19499
* parser.c (cp_parser_template_id): Revert 2004-12-09's patch.
Issue an error when creating the template id.
* pt.c (fn_type_unification): Return early if the explicit
template arg list is an error_mark_node.
decl.c (build_enumerator): Do not issue duplicate error messages about invalid enumeration constants. * decl.c (build_enumerator): Do not issue duplicate error messages about invalid enumeration constants. * parser.c (cp_parser_non_integral_constant_expression): Always set parser->non_integral_constant_expression_p. (cp_parser_primary_expression): Add cast_p parameter. Issue errors about invalid uses of floating-point literals in cast-expressions. (cp_parser_postfix_expression): Add cast_p parameter. (cp_parser_open_square_expression): Pass it. (cp_parser_parenthesized_expression_list): Add cast_p parameter. (cp_parser_unary_expression): Likewise. (cp_parser_new_placement): Pass it. (cp_parser_direct_new_declarator): Likewise. (cp_parser_new_initializer): Likewise. (cp_parser_cast_expression): Add cast_p parameter. (cp_parser_binary_expression): Likewise. (cp_parser_question_colon_clause): Likewise. (cp_parser_assignment_expression): Likewise. (cp_parser_expression): Likewise. (cp_parser_constant_expression): If an integral constant expression is invalid, return error_mark_node. (cp_parser_expression_statement): Pass cast_p. (cp_parser_condition): Likewise. (cp_parser_iteration_statement): Likewise. (cp_parser_jump_statement): Likewise. (cp_parser_mem_initializer): Likewise. (cp_parser_template_argument): Likewise. (cp_parser_parameter_declaration): Likewise. (cp_parser_initializer): Likewise. (cp_parser_throw_expression): Likewise. (cp_parser_attribute_list): Likewise. (cp_parser_simple_cast_expression): Likewise. (cp_parser_functional_cast): Likewise. (cp_parser_late_parsing_default_args): Likewise. (cp_parser_sizeof_operand): Save/restore non_integral_constant_expression_p. * include/std/std_limits.h (numeric_limits<float>::has_denorm): Add required cast. (numeric_limits<double>::has_denorm): Likewise. (numeric_limits<long double>::has_denorm): Likewise. * g++.dg/other/warning1.C: Adjust error messags. * g++.dg/parse/constant5.C: New test. From-SVN: r94512
2005-02-01 02:01:34 +01:00
2005-01-31 Mark Mitchell <mark@codesourcery.com>
* decl.c (build_enumerator): Do not issue duplicate error messages
about invalid enumeration constants.
* parser.c (cp_parser_non_integral_constant_expression): Always
set parser->non_integral_constant_expression_p.
(cp_parser_primary_expression): Add cast_p parameter. Issue
errors about invalid uses of floating-point literals in
cast-expressions.
(cp_parser_postfix_expression): Add cast_p parameter.
(cp_parser_open_square_expression): Pass it.
(cp_parser_parenthesized_expression_list): Add cast_p parameter.
(cp_parser_unary_expression): Likewise.
(cp_parser_new_placement): Pass it.
(cp_parser_direct_new_declarator): Likewise.
(cp_parser_new_initializer): Likewise.
(cp_parser_cast_expression): Add cast_p parameter.
(cp_parser_binary_expression): Likewise.
(cp_parser_question_colon_clause): Likewise.
(cp_parser_assignment_expression): Likewise.
(cp_parser_expression): Likewise.
(cp_parser_constant_expression): If an integral constant
expression is invalid, return error_mark_node.
(cp_parser_expression_statement): Pass cast_p.
(cp_parser_condition): Likewise.
(cp_parser_iteration_statement): Likewise.
(cp_parser_jump_statement): Likewise.
(cp_parser_mem_initializer): Likewise.
(cp_parser_template_argument): Likewise.
(cp_parser_parameter_declaration): Likewise.
(cp_parser_initializer): Likewise.
(cp_parser_throw_expression): Likewise.
(cp_parser_attribute_list): Likewise.
(cp_parser_simple_cast_expression): Likewise.
(cp_parser_functional_cast): Likewise.
(cp_parser_late_parsing_default_args): Likewise.
(cp_parser_sizeof_operand): Save/restore
non_integral_constant_expression_p.
2005-01-31 Mike Stump <mrs@apple.com>
* parser.c (cp_lexer_new_main): Get the first token, first, before
doing anything.
2005-01-31 Mark Mitchell <mark@codesourcery.com>
* decl.c (start_decl): Add missing parentheses.
2005-01-30 Mark Mitchell <mark@codesourcery.com>
PR c++/19555
* cp-tree.h (DECL_USE_TEMPLATE): Expand documentation.
* decl.c (duplicate_decls): Do not discard
DECL_IMPLICIT_INSTANTIATION when merging declarations.
(start_decl): Do not SET_DECL_TEMPLATE_SPECIALIZATION for
variables that do not have DECL_USE_TEMPLATE.
PR c++/19395
* decl.c (grokdeclarator): Refactor code so that qualified names
are never allowed as the declarator in a typedef.
PR c++/19367
* name-lookup.c (do_nonmember_using_decl): Avoid overloading
builtin declarations.
PR c++/19457
* call.c (convert_like_real): Inline call to
dubious_conversion_warnings here.
* cp-tree.h (dubious_conversion_warnings): Remove.
* semantics.c (finish_unary_op_expr): Copy INTEGER_CSTs before
setting TREE_NEGATED_INT.
* typeck.c (dubious_conversion_warnings): Remove.
PR c++/19349
* name-lookup.c (pushdecl_namespace_level): Avoid accessing free'd
memory.
2005-01-28 Mark Mitchell <mark@codesourcery.com>
PR c++/19253
* parser.c (cp_parser_diagnose_invalid_type_name): Commit to
tentative parses.
PR c++/19667
* pt.c (redeclare_class_template): Robustify.
2005-01-27 Steven Bosscher <stevenb@suse.de>
* decl.c (finish_case_label): Use SWITCH_STMT accessor macros
instead of SWITCH_EXPR ones.
* pt.c (tsubst_expr): Likewise.
* semantics.c (begin_switch_stmt, finish_switch_cond,
finish_switch_stmt): Likewise.
2005-01-26 J"orn Rennecke <joern.rennecke@st.com>
PR c++/18370
2005-01-26 20:02:32 +01:00
* parser.c (cp_parser_initializer_clause): Initialize *non_constant_p.
2005-01-25 Andrew Pinski <pinskia@physics.uc.edu>
* class.c (abort_fndecl_addr): New variable.
(build_vtbl_initializer): If we have a pure virtual function
share the abort function's address.
Include gt-cp-class.h at the end.
* config-lang.in (gtfiles): Add cp/class.c.
2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
* cxx-pretty-print.c (pp_cxx_statement): Add prototype. Make static.
(pp_cxx_function_definition): Make static.
* cxx-pretty-print.h (pp_cxx_statement): Remove prototype.
(pp_cxx_function_definition): Likewise.
2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
* name-lookup.c (print_binding_level): Make static.
(constructor_name_full): Make static inline.
(current_decl_namespace): Make static.
* name-lookup.h (constructor_name_full): Remove prototype.
(print_binding_level): Likewise.
(current_decl_namespace): Likewise.
2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
* decl.h (debug_bindings_indentation): Remove.
2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
* typeck.c: Fix a comment typo.
2005-01-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/19208
* pt.c (fold_decl_constant_value): Always call fold_non_dependent_expr
at least once.
(tsubst): Use fold_decl_constant_value in place of a bare call to
integral_constant_value.
2005-01-20 Kazu Hirata <kazu@cs.umass.edu>
* typeck.c (more_qualified_p): Remove.
* cp-tree.h: Remove the corresponding prototype.
2005-01-19 Matt Austern <austern@apple.com>
* typeck.c (comptypes): Handle return code from objc_comptypes
correctly.
2005-01-19 Kazu Hirata <kazu@cs.umass.edu>
* cp-tree.h, name-lookup.h: Remove unused prototypes.
2005-01-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/19375
* semantics.c (finish_id_expression): Disable access checking for
already lookuped FIELD_DECL.
2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
* decl.c (delete_block): Remove.
* cp-tree.h: Remove the corresponding prototype.
* decl.c (vtable_decl_p, vtype_decl_p, walk_globals_data,
walk_vtables_r, walk_vtables, walk_globals_r, walk_globals):
Remove.
* cp-tree.h: Remove the corresponding prototypes.
* tree.c (count_functions, bound_pmf_p, cp_is_overload_p,
cp_update_decl_after_saving, name_p): Remove.
* cp-tree.h: Remove the corresponding prototypes.
2005-01-18 Andrew Pinski <pinskia@physics.uc.edu>
PR c/19472
* semantics.c (finish_asm_stmt): Strip nops off
input memory operands.
2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
* Make-lang.in, call.c, cvt.c, init.c, rtti.c, tree.c,
typeck2.c: Update copyright.
2005-01-16 Kazu Hirata <kazu@cs.umass.edu>
* class.c (get_enclosing_class): Remove.
* cp-tree.h: Remove the corresponding prototypes.
* cvt.c (convert_lvalue): Remove.
* cp-tree.h: Remove the corresponding prototype.
* pt.c (tinst_for_decl): Remove.
* cp-tree.h: Remove the corresponding prototypes.
* tree.c (hash_chainon): Remove.
* cp-tree.h: Remove the corresponding prototypes.
2005-01-15 Jakub Jelinek <jakub@redhat.com>
PR c++/19263
* typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy
of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified.
2005-01-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Make-lang.in (cp-warn): Don't append $(WERROR).
2005-01-10 Kazu Hirata <kazu@cs.umass.edu>
* cp-tree.h: Fix a comment typo.
2005-01-07 Nathan Sidwell <nathan@codesourcery.com>
PR c++/19298
* pt.c (tsubst_qualified_id): Call convert_from_reference.
2005-01-06 Mark Mitchell <mark@codesourcery.com>
PR c++/19244
* class.c (add_implicitly_declared_members): Remove dead code.
* decl.c (grokfndecl): Add sfk parameter. Use it do set
DECL_CONSTRUCTOR_P.
(grokdeclarator): Adjust calls to grokfndecl.
* method.c (implicitly_declare_fn): Improve documentation.
* parser.c (cp_parser_direct_declarator): Do not consider a
function to be a constructor if the containing class was
originally anonymous.
2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/17154
* search.c (lookup_field_1): Handle using declaration in
class template partial specialization.
2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/19258
* pt.c (push_access_scope): Handle friend defined in class.
(pop_access_scope): Likewise.
2005-01-06 Nathan Sidwell <nathan@codesourcery.com>
PR c++/19270
* pt.c (tsubst_copy) <ARRAY_REF case>: Handle separately.
(tsubst_copy_and_build) <ARRAY_REF case>: Remove obsolete
array-new handling code. Use build_x_binary_op.
2005-01-05 Nathan Sidwell <nathan@codesourcery.com>
PR c++/19030
* cp-tree.h (start_decl): Take pointer to pushed scope, not bool.
* name-lookup.h (push_scope): Return pushed scope, not flag.
* name-lookup.c (push_scope): Return scope that should be popped,
not a flag.
* decl.c (start_decl): Adjust.
(grokfndecl): Adjust scope push and pop.
* decl2.c (check_classfn): Likewise.
* parser.c (cp_parser_condition, cp_parser_conversion_function_id,
cp_parser_init_declarator, cp_parser_direct_declarator,
cp_parser_class_specifier, cp_parser_class_head,
cp_parser_lookup_name,
cp_parser_constructor_declarator_p): Likewise.
* pt.c (instantiate_class_template,
resolve_typename_type): Likewise.
2005-01-03 Volker Reichelt <reichelt@igpm.rwth-aaachen.de>
PR c++/14136
* parser.c (cp_parser_unqualified_id): Do not issue error message
for typedef-name as destructor declarator when performing an
uncommitted tentative parse.
2005-01-01 Steven Bosscher <stevenb@suse.de>
PR middle-end/17544
* decl.c (finish_function): Fix comment. Annotate the compiler
generated return with the current file name and line 0.
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.
Add memory barriers to the double-checked locking used for static initialization. libstdc++: Add memory barriers to the double-checked locking used for static initialization. * libsupc++/guard.cc (__test_and_acquire): Define default. (_GLIBCXX_GUARD_TEST_AND_ACQUIRE, __set_and_release) (_GLIBCXX_GUARD_SET_AND_RELEASE): Likewise. (recursion_push, recursion_pop): New abstraction functions. (__cxa_guard_acquire): Use _GLIBCXX_GUARD_TEST_AND_ACQUIRE. (__cxa_guard_release): Use _GLIBCXX_GUARD_SET_AND_RELEASE. * config/cpu/generic/cxxabi_tweaks.h (_GLIBCXX_GUARD_TEST): Rename from _GLIBCXX_GUARD_ACQUIRE and reverse sense. (_GLIBCXX_GUARD_SET): Rename from _GLIBCXX_GUARD_RELEASE. * config/cpu/arm/cxxabi_tweaks.h: Likewise. * config/cpu/alpha/atomic_word.h (_GLIBCXX_READ_MEM_BARRIER) (_GLIBCXX_WRITE_MEM_BARRIER): Define. * config/cpu/powerpc/atomic_word.h: Likewise. * config/cpu/sparc/atomic_word.h: Likewise. * config/cpu/generic/atomic_word.h: Define them, commented out. * include/bits/atomicity.h: Define defaults. * config/cpu/ia64/atomic_word.h (__test_and_acquire) (__set_and_release): New inlines. (_GLIBCXX_GUARD_TEST_AND_ACQUIRE): Define. (_GLIBCXX_GUARD_SET_AND_RELEASE): Define. * libsupc++/guard.cc (acquire_1): Use __builtin_trap instead of abort(); gcc: * doc/tm.texi (TARGET_RELAXED_ORDERING): Document. * target.h (struct gcc_target): Add relaxed_ordering field. * target-def.h (TARGET_RELAXED_ORDERING): Define default. (TARGET_INITIALIZER): Add it. * config/alpha/alpha.c (TARGET_RELAXED_ORDERING): Define. * config/ia64/ia64.c (TARGET_RELAXED_ORDERING): Define. * config/rs6000/rs6000.c (TARGET_RELAXED_ORDERING): Define. * config/sparc/sparc.c (TARGET_RELAXED_ORDERING): Define. * cp/decl.c (expand_static_init): Don't use shortcut if targetm.relaxed_ordering. From-SVN: r92659
2004-12-28 05:36:54 +01:00
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>
2004-12-17 17:02:12 +01:00
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.
re PR c++/18803 (rejects access to operator() in template) cp: 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. testsuite: PR c++/18803 * g++.dg/template/operator5.C: New. From-SVN: r91863
2004-12-08 09:36:09 +01:00
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.
re PR c++/18368 (C++ error message regression) 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. PR c++/18674 * g++.old-deja/g++.brendan/crash16.C: Adjust error messages. * g++.old-deja/g++.law/ctors5.C: Likewise. * g++.old-deja/g++.other/crash25.C: Likewise. PR c++/18674 * g++.dg/template/error16.C: New test. PR c++/18512 * g++.dg/template/crash29.C: New test. From-SVN: r91483
2004-11-29 21:10:18 +01:00
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.
re PR c++/18368 (C++ error message regression) 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. PR c++/18674 * g++.old-deja/g++.brendan/crash16.C: Adjust error messages. * g++.old-deja/g++.law/ctors5.C: Likewise. * g++.old-deja/g++.other/crash25.C: Likewise. PR c++/18674 * g++.dg/template/error16.C: New test. PR c++/18512 * g++.dg/template/crash29.C: New test. From-SVN: r91483
2004-11-29 21:10:18 +01:00
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.
re PR c++/18001 (Badly formatted error message (quotation problem)) PR c++/18001 * c-common.h (lvalue_use): Move here from c-ctypeck.c. (lvalue_or_else): Declare. * c-common.c (lvalue_or_else): Move here from c-typeck.c. * c-typeck.c (lvalue_use): Remove. (lvalue_or_else): Remove. PR c++/18556 * toplev.c (check_global_declarations): Set DECL_IGNORED_P on unemitted variables with static storage duration. 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. PR c++/18445 * g++.dg/template/crash28.C: Likewise. PR c++/18001 * g++.dg/expr/unary2.C: Adjust lvalue messages. * g++.dg/ext/lvaddr.C: Likewise. * g++.dg/opt/pr7503-3.C: Likewise. PR c++/18466 * g++.dg/parse/qualified3.C: New test. * g++.old-deja/g++.other/friend7.C: Remove bogus qualification. PR c++/18545 * g++.dg/expr/return1.C: New test. From-SVN: r91301
2004-11-25 18:11:37 +01:00
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.
builtins.c, [...]: Avoid "`" as left quote, using "'" or %q, %< and %> as appropriate. * builtins.c, c-common.c, c-decl.c, c-format.c, c-format.h, c-parse.in, c-pch.c, c-pragma.c, collect2.c, final.c, gcc.c, gcov.c, opts.c, pretty-print.h, protoize.c, reg-stack.c, rtl.c, tlink.c, config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c, config/avr/avr.c, config/c4x/c4x.c, config/darwin.c, config/frv/frv.c, config/h8300/h8300.c, config/i386/i386.c, config/i386/winnt.c, config/ia64/ia64.c, config/ip2k/ip2k.c, config/iq2000/iq2000.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c, config/m68k/m68k.c, config/m68k/m68k.h, config/mcore/mcore.c, config/mips/mips.c, config/mmix/mmix.c, config/ns32k/ns32k.c, config/rs6000/host-darwin.c, config/rs6000/rs6000.c, config/s390/s390.c, config/sh/sh.c, config/sh/symbian.c, config/stormy16/stormy16.c, config/v850/v850.c: Avoid "`" as left quote, using "'" or %q, %< and %> as appropriate. Use %' as apostrophe in diagnostics where applicable. Use %< and %> in place of '' quotes where applicable. Use %qs in place of %<%s%>. Consistently quote __builtin function names. ada: * misc.c (gnat_handle_option): Use %< and %> for quoting in warning message. cp: * 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. objc: * objc-act.c: Use %q, %< and %> for quoting in diagnostics. testsuite: * gcc.dg/builtin-prefetch-1.c: Adjust expected messages. From-SVN: r90337
2004-11-09 11:13:30 +01:00
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.
1004-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.
1004-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.
parser.c (cp_token_position): New typedef. * 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. From-SVN: r89320
2004-10-20 09:25:35 +02:00
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.
call.c (struct conversion): Add base_p. * 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. * g++.dg/conversion/reinterpret1.C: Adjust error markers. * g++.dg/conversion/const2.C: New test. * g++.dg/expr/reinterpret2.C: New test. * g++.dg/expr/reinterpret3.C: New test. * g++.dg/expr/cast2.C: New test. * g++.dg/expr/copy1.C: New test. * g++.dg/other/conversion1.C: Change error message. * g++.dg/parse/comma1.C: Use __extension__ to allow casts from function pointers to void *. * g++.old-deja/g++.mike/p10148.C: Likewise. From-SVN: r89300
2004-10-20 01:24:20 +02:00
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.
Convert diagnostics to use quoting flag q 7/n cp/ 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. testsuite/ * g++.dg/overload/pmf1.C: Adjust quoting marks. * g++.dg/warn/incomplete1.C: Likewise. * g++.dg/template/qualttp20.C: Likewise. From-SVN: r88854
2004-10-10 23:36:42 +02:00
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):
Convert diagnostics to use quoting flag q 7/n cp/ 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. testsuite/ * g++.dg/overload/pmf1.C: Adjust quoting marks. * g++.dg/warn/incomplete1.C: Likewise. * g++.dg/template/qualttp20.C: Likewise. From-SVN: r88854
2004-10-10 23:36:42 +02:00
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,
Convert diagnostics to use quoting flag q 7/n cp/ 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. testsuite/ * g++.dg/overload/pmf1.C: Adjust quoting marks. * g++.dg/warn/incomplete1.C: Likewise. * g++.dg/template/qualttp20.C: Likewise. From-SVN: r88854
2004-10-10 23:36:42 +02:00
build_m_component_ref, require_complete_eh_spec_types): Likewise.
* tree.c (cp_build_qualified_type_real,
Convert diagnostics to use quoting flag q 7/n cp/ 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. testsuite/ * g++.dg/overload/pmf1.C: Adjust quoting marks. * g++.dg/warn/incomplete1.C: Likewise. * g++.dg/template/qualttp20.C: Likewise. From-SVN: r88854
2004-10-10 23:36:42 +02:00
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,
Convert diagnostics to use quoting flag q 7/n cp/ 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. testsuite/ * g++.dg/overload/pmf1.C: Adjust quoting marks. * g++.dg/warn/incomplete1.C: Likewise. * g++.dg/template/qualttp20.C: Likewise. From-SVN: r88854
2004-10-10 23:36:42 +02:00
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.
cp-tree.h (dfs_walk, [...]): Remove. * 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. From-SVN: r88738
2004-10-08 11:33:55 +02:00
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 22:14:42 +02:00
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.
Convert diagnostics to use quoting flag q 4/n Convert diagnostics to use quoting flag q 4/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. testsuite/ merlin[1:17]% cd build ~ merlin[1:17]% ls ~/build 3 4 4.0.0 c++0x r tree merlin[1:17]% cd 4.0.0 ~/build merlin[1:17]% cd gcc ~/build/4.0.0 merlin[1:17]% make check-g++ ~/build/4.0.0/gcc (rootme=`${PWDCMD-pwd}`; export rootme; \ srcdir=`cd /home/gdr/redhat/egcs/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ cd testsuite; \ EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ if [ -f ${rootme}/../expect/expect ] ; then \ TCL_LIBRARY=`cd .. ; cd /home/gdr/redhat/egcs/gcc/../tcl/library ; ${PWDCMD-pwd}` ; \ export TCL_LIBRARY ; fi ; \ `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool g++ ) Test Run By gdr on Tue Oct 5 01:18:04 2004 Native configuration is i686-pc-linux-gnu === g++ tests === Schedule of variations: unix Running target unix Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. Using /usr/share/dejagnu/config/unix.exp as generic interface file for target. Using /home/gdr/redhat/egcs/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. Running /home/gdr/redhat/egcs/gcc/testsuite/g++.dg/bprob/bprob.exp ... Running /home/gdr/redhat/egcs/gcc/testsuite/g++.dg/charset/charset.exp ...Running /home/gdr/redhat/egcs/gcc/testsuite/g++.dg/compat/compat.exp ...Running /home/gdr/redhat/egcs/gcc/testsuite/g++.dg/debug/debug.exp ... Running /home/gdr/redhat/egcs/gcc/testsuite/g++.dg/dg.exp ... FAIL: g++.dg/other/classkey1.C (test for errors, line 9) FAIL: g++.dg/other/classkey1.C (test for errors, line 11) FAIL: g++.dg/other/classkey1.C (test for errors, line 14) FAIL: g++.dg/other/classkey1.C (test for errors, line 17) FAIL: g++.dg/other/classkey1.C (test for excess errors) FAIL: g++.dg/parse/error15.C (test for errors, line 13) FAIL: g++.dg/parse/error15.C (test for errors, line 14) FAIL: g++.dg/parse/error15.C (test for errors, line 15) FAIL: g++.dg/parse/error15.C (test for errors, line 21) FAIL: g++.dg/parse/error15.C (test for errors, line 22) FAIL: g++.dg/parse/error15.C (test for errors, line 23) FAIL: g++.dg/parse/error15.C (test for errors, line 31) FAIL: g++.dg/parse/error15.C (test for errors, line 32) FAIL: g++.dg/parse/error15.C (test for errors, line 33) FAIL: g++.dg/parse/error15.C (test for excess errors) XPASS: g++.dg/rtti/tinfo1.C scan-assembler _ZTIP9CTemplateIhE: XPASS: g++.dg/rtti/tinfo1.C scan-assembler-not .globl[ \t]+_ZTIP9CTemplateIhE XPASS: g++.dg/rtti/tinfo1.C scan-assembler-not .section[^\n\r]*_ZTIP9CTemplateIhE[^\n\r]*FAIL: g++.dg/template/meminit2.C (test for errors, line 10) FAIL: g++.dg/template/meminit2.C (test for errors, line 11) FAIL: g++.dg/template/meminit2.C (test for excess errors) Running /home/gdr/redhat/egcs/gcc/testsuite/g++.dg/gcov/gcov.exp ... FAIL: 102:is -:should be 1 FAIL: g++.dg/gcov/gcov-1.C gcov: 1 failures in line counts, 0 in branch percentamerlin[1:27]% make check-g++ ~/build/4.0.0/gcc (rootme=`${PWDCMD-pwd}`; export rootme; \ srcdir=`cd /home/gdr/redhat/egcs/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ cd testsuite; \ EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ if [ -f ${rootme}/../expect/expect ] ; then \ TCL_LIBRARY=`cd .. ; cd /home/gdr/redhat/egcs/gcc/../tcl/library ; ${PWDCMD-pwd}` ; \ export TCL_LIBRARY ; fi ; \ `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool g++ ) Test Run By gdr on Tue Oct 5 01:27:39 2004 Native configuration is i686-pc-linux-gnu === g++ tests === Schedule of variations: unix Running target unix Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. Using /usr/share/dejagnu/config/unix.exp as generic interface file for tar method.c cfns.gperf cxx-pretty-print.c method.c.~1.315.~ cfns.h cxx-pretty-print.h name-lookup.c ChangeLog decl2.c name-lookup.c.~1.85.~ ChangeLog.1 decl.c name-lookup.h ChangeLog.~1.4404.~ decl.h NEWS ChangeLog.2 dump.c operators.def ChangeLog.3 error.c optimize.c ChangeLog.egcs except.c parser.c ChangeLog.tree-ssa expr.c parser.c.~1.258.~ class.c friend.c pt.c config-lang.in g++spec.c ptree.c cp-gimplify.c init.c repo.c cp-lang.c init.c.~1.396.~ rtti.c cp-objcp-common.c lang-specs.h search.c cp-objcp-common.h lex.c semantics.c cp-tree.def lex.c.~1.349.~ tree.c cp-tree.h Make-lang.in typeck2.c CVS mangle.c typeck.c merlin[7:37]% cvs -z9 diff -p > ~/d-5.patch ~/redhat/egcs/gcc/cp Enter passphrase for RSA key '/home/gdr/.ssh/identity': cvs [diff aborted]: received interrupt signal merlin[7:37]% cvs -z9 diff -p > ~/d-5.patch ~/redhat/egcs/gcc/cp Warning: Remote host denied X11 forwarding. Warning: Remote host denied authentication agent forwarding. cvs diff: Diffing . merlin[7:38]% l ~/d-5.patch ~/redhat/egcs/gcc/cp merlin[7:39]% cvs -z9 diff -p > ~/d-5.patch ~/redhat/egcs/gcc/cp Warning: Remote host denied X11 forwarding. Warning: Remote host denied authentication agent forwarding. cvs diff: Diffing . merlin[7:40]% l ~/d-5.patch ~/redhat/egcs/gcc/cp You have new mail. merlin[8:21]% cvs -z9 commit ~/redhat/egcs/gcc/cp merlin[8:21]% cd . ~/redhat/egcs/gcc/cp merlin[8:21]% cvs -z9 commit cp testsuite ~/redhat/egcs/gcc/cp cvs commit: nothing known about `cp' cvs commit: nothing known about `testsuite' cvs [commit aborted]: correct above errors first! merlin[8:21]% cd .. ~/redhat/egcs/gcc/cp merlin[8:21]% cvs -z9 commit cp testsuite ~/redhat/egcs/gcc cvs commit: Examining cp cvs commit: Examining testsuite cvs commit: Examining testsuite/ada cvs commit: Examining testsuite/ada/acats cvs commit: Examining testsuite/ada/acats/support cvs commit: Examining testsuite/ada/acats/tests cvs commit: Examining testsuite/ada/acats/tests/a cvs commit: Examining testsuite/ada/acats/tests/c2 cvs commit: Examining testsuite/ada/acats/tests/c3 cvs commit: Examining testsuite/ada/acats/tests/c4 cvs commit: Examining testsuite/ada/acats/tests/c5 cvs commit: Examining testsuite/ada/acats/tests/c6 cvs commit: Examining testsuite/ada/acats/tests/c7 cvs commit: Examining testsuite/ada/acats/tests/c8 cvs commit: Examining testsuite/ada/acats/tests/c9 cvs commit: Examining testsuite/ada/acats/tests/ca cvs commit: Examining testsuite/ada/acats/tests/cb cvs commit: Examining testsuite/ada/acats/tests/cc cvs commit: Examining testsuite/ada/acats/tests/cd cvs commit: Examining testsuite/ada/acats/tests/ce cvs commit: Examining testsuite/ada/acats/tests/cxa cvs commit: Examining testsuite/ada/acats/tests/cxb cvs commit: Examining testsuite/ada/acats/tests/cxf cvs commit: Examining testsuite/ada/acats/tests/cxg cvs commit: Examining testsuite/ada/acats/tests/cxh cvs commit: Examining testsuite/ada/acats/tests/cz cvs commit: Examining testsuite/ada/acats/tests/d cvs commit: Examining testsuite/ada/acats/tests/e cvs commit: Examining testsuite/ada/acats/tests/gcc cvs commit: Examining testsuite/ada/acats/tests/l cvs commit: Examining testsuite/config cvs commit: Examining testsuite/consistency.vlad cvs commit: Examining testsuite/consistency.vlad/layout cvs commit: Examining testsuite/consistency.vlad/layout/i960-97r2-results cvs commit: Examining testsuite/g++.dg cvs commit: Examining testsuite/g++.dg/abi cvs commit: Examining testsuite/g++.dg/bprob cvs commit: Examining testsuite/g++.dg/charset cvs commit: Examining testsuite/g++.dg/compat cvs commit: Examining testsuite/g++.dg/compat/abi cvs commit: Examinin From-SVN: r88552
2004-10-05 15:28:07 +02:00
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,
Convert diagnostics to use quoting flag q 4/n Convert diagnostics to use quoting flag q 4/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. testsuite/ merlin[1:17]% cd build ~ merlin[1:17]% ls ~/build 3 4 4.0.0 c++0x r tree merlin[1:17]% cd 4.0.0 ~/build merlin[1:17]% cd gcc ~/build/4.0.0 merlin[1:17]% make check-g++ ~/build/4.0.0/gcc (rootme=`${PWDCMD-pwd}`; export rootme; \ srcdir=`cd /home/gdr/redhat/egcs/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ cd testsuite; \ EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ if [ -f ${rootme}/../expect/expect ] ; then \ TCL_LIBRARY=`cd .. ; cd /home/gdr/redhat/egcs/gcc/../tcl/library ; ${PWDCMD-pwd}` ; \ export TCL_LIBRARY ; fi ; \ `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool g++ ) Test Run By gdr on Tue Oct 5 01:18:04 2004 Native configuration is i686-pc-linux-gnu === g++ tests === Schedule of variations: unix Running target unix Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. Using /usr/share/dejagnu/config/unix.exp as generic interface file for target. Using /home/gdr/redhat/egcs/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. Running /home/gdr/redhat/egcs/gcc/testsuite/g++.dg/bprob/bprob.exp ... Running /home/gdr/redhat/egcs/gcc/testsuite/g++.dg/charset/charset.exp ...Running /home/gdr/redhat/egcs/gcc/testsuite/g++.dg/compat/compat.exp ...Running /home/gdr/redhat/egcs/gcc/testsuite/g++.dg/debug/debug.exp ... Running /home/gdr/redhat/egcs/gcc/testsuite/g++.dg/dg.exp ... FAIL: g++.dg/other/classkey1.C (test for errors, line 9) FAIL: g++.dg/other/classkey1.C (test for errors, line 11) FAIL: g++.dg/other/classkey1.C (test for errors, line 14) FAIL: g++.dg/other/classkey1.C (test for errors, line 17) FAIL: g++.dg/other/classkey1.C (test for excess errors) FAIL: g++.dg/parse/error15.C (test for errors, line 13) FAIL: g++.dg/parse/error15.C (test for errors, line 14) FAIL: g++.dg/parse/error15.C (test for errors, line 15) FAIL: g++.dg/parse/error15.C (test for errors, line 21) FAIL: g++.dg/parse/error15.C (test for errors, line 22) FAIL: g++.dg/parse/error15.C (test for errors, line 23) FAIL: g++.dg/parse/error15.C (test for errors, line 31) FAIL: g++.dg/parse/error15.C (test for errors, line 32) FAIL: g++.dg/parse/error15.C (test for errors, line 33) FAIL: g++.dg/parse/error15.C (test for excess errors) XPASS: g++.dg/rtti/tinfo1.C scan-assembler _ZTIP9CTemplateIhE: XPASS: g++.dg/rtti/tinfo1.C scan-assembler-not .globl[ \t]+_ZTIP9CTemplateIhE XPASS: g++.dg/rtti/tinfo1.C scan-assembler-not .section[^\n\r]*_ZTIP9CTemplateIhE[^\n\r]*FAIL: g++.dg/template/meminit2.C (test for errors, line 10) FAIL: g++.dg/template/meminit2.C (test for errors, line 11) FAIL: g++.dg/template/meminit2.C (test for excess errors) Running /home/gdr/redhat/egcs/gcc/testsuite/g++.dg/gcov/gcov.exp ... FAIL: 102:is -:should be 1 FAIL: g++.dg/gcov/gcov-1.C gcov: 1 failures in line counts, 0 in branch percentamerlin[1:27]% make check-g++ ~/build/4.0.0/gcc (rootme=`${PWDCMD-pwd}`; export rootme; \ srcdir=`cd /home/gdr/redhat/egcs/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ cd testsuite; \ EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ if [ -f ${rootme}/../expect/expect ] ; then \ TCL_LIBRARY=`cd .. ; cd /home/gdr/redhat/egcs/gcc/../tcl/library ; ${PWDCMD-pwd}` ; \ export TCL_LIBRARY ; fi ; \ `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool g++ ) Test Run By gdr on Tue Oct 5 01:27:39 2004 Native configuration is i686-pc-linux-gnu === g++ tests === Schedule of variations: unix Running target unix Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. Using /usr/share/dejagnu/config/unix.exp as generic interface file for tar method.c cfns.gperf cxx-pretty-print.c method.c.~1.315.~ cfns.h cxx-pretty-print.h name-lookup.c ChangeLog decl2.c name-lookup.c.~1.85.~ ChangeLog.1 decl.c name-lookup.h ChangeLog.~1.4404.~ decl.h NEWS ChangeLog.2 dump.c operators.def ChangeLog.3 error.c optimize.c ChangeLog.egcs except.c parser.c ChangeLog.tree-ssa expr.c parser.c.~1.258.~ class.c friend.c pt.c config-lang.in g++spec.c ptree.c cp-gimplify.c init.c repo.c cp-lang.c init.c.~1.396.~ rtti.c cp-objcp-common.c lang-specs.h search.c cp-objcp-common.h lex.c semantics.c cp-tree.def lex.c.~1.349.~ tree.c cp-tree.h Make-lang.in typeck2.c CVS mangle.c typeck.c merlin[7:37]% cvs -z9 diff -p > ~/d-5.patch ~/redhat/egcs/gcc/cp Enter passphrase for RSA key '/home/gdr/.ssh/identity': cvs [diff aborted]: received interrupt signal merlin[7:37]% cvs -z9 diff -p > ~/d-5.patch ~/redhat/egcs/gcc/cp Warning: Remote host denied X11 forwarding. Warning: Remote host denied authentication agent forwarding. cvs diff: Diffing . merlin[7:38]% l ~/d-5.patch ~/redhat/egcs/gcc/cp merlin[7:39]% cvs -z9 diff -p > ~/d-5.patch ~/redhat/egcs/gcc/cp Warning: Remote host denied X11 forwarding. Warning: Remote host denied authentication agent forwarding. cvs diff: Diffing . merlin[7:40]% l ~/d-5.patch ~/redhat/egcs/gcc/cp You have new mail. merlin[8:21]% cvs -z9 commit ~/redhat/egcs/gcc/cp merlin[8:21]% cd . ~/redhat/egcs/gcc/cp merlin[8:21]% cvs -z9 commit cp testsuite ~/redhat/egcs/gcc/cp cvs commit: nothing known about `cp' cvs commit: nothing known about `testsuite' cvs [commit aborted]: correct above errors first! merlin[8:21]% cd .. ~/redhat/egcs/gcc/cp merlin[8:21]% cvs -z9 commit cp testsuite ~/redhat/egcs/gcc cvs commit: Examining cp cvs commit: Examining testsuite cvs commit: Examining testsuite/ada cvs commit: Examining testsuite/ada/acats cvs commit: Examining testsuite/ada/acats/support cvs commit: Examining testsuite/ada/acats/tests cvs commit: Examining testsuite/ada/acats/tests/a cvs commit: Examining testsuite/ada/acats/tests/c2 cvs commit: Examining testsuite/ada/acats/tests/c3 cvs commit: Examining testsuite/ada/acats/tests/c4 cvs commit: Examining testsuite/ada/acats/tests/c5 cvs commit: Examining testsuite/ada/acats/tests/c6 cvs commit: Examining testsuite/ada/acats/tests/c7 cvs commit: Examining testsuite/ada/acats/tests/c8 cvs commit: Examining testsuite/ada/acats/tests/c9 cvs commit: Examining testsuite/ada/acats/tests/ca cvs commit: Examining testsuite/ada/acats/tests/cb cvs commit: Examining testsuite/ada/acats/tests/cc cvs commit: Examining testsuite/ada/acats/tests/cd cvs commit: Examining testsuite/ada/acats/tests/ce cvs commit: Examining testsuite/ada/acats/tests/cxa cvs commit: Examining testsuite/ada/acats/tests/cxb cvs commit: Examining testsuite/ada/acats/tests/cxf cvs commit: Examining testsuite/ada/acats/tests/cxg cvs commit: Examining testsuite/ada/acats/tests/cxh cvs commit: Examining testsuite/ada/acats/tests/cz cvs commit: Examining testsuite/ada/acats/tests/d cvs commit: Examining testsuite/ada/acats/tests/e cvs commit: Examining testsuite/ada/acats/tests/gcc cvs commit: Examining testsuite/ada/acats/tests/l cvs commit: Examining testsuite/config cvs commit: Examining testsuite/consistency.vlad cvs commit: Examining testsuite/consistency.vlad/layout cvs commit: Examining testsuite/consistency.vlad/layout/i960-97r2-results cvs commit: Examining testsuite/g++.dg cvs commit: Examining testsuite/g++.dg/abi cvs commit: Examining testsuite/g++.dg/bprob cvs commit: Examining testsuite/g++.dg/charset cvs commit: Examining testsuite/g++.dg/compat cvs commit: Examining testsuite/g++.dg/compat/abi cvs commit: Examinin From-SVN: r88552
2004-10-05 15:28:07 +02:00
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,
Convert diagnostics to use quoting flag q 4/n Convert diagnostics to use quoting flag q 4/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. testsuite/ merlin[1:17]% cd build ~ merlin[1:17]% ls ~/build 3 4 4.0.0 c++0x r tree merlin[1:17]% cd 4.0.0 ~/build merlin[1:17]% cd gcc ~/build/4.0.0 merlin[1:17]% make check-g++ ~/build/4.0.0/gcc (rootme=`${PWDCMD-pwd}`; export rootme; \ srcdir=`cd /home/gdr/redhat/egcs/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ cd testsuite; \ EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ if [ -f ${rootme}/../expect/expect ] ; then \ TCL_LIBRARY=`cd .. ; cd /home/gdr/redhat/egcs/gcc/../tcl/library ; ${PWDCMD-pwd}` ; \ export TCL_LIBRARY ; fi ; \ `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool g++ ) Test Run By gdr on Tue Oct 5 01:18:04 2004 Native configuration is i686-pc-linux-gnu === g++ tests === Schedule of variations: unix Running target unix Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. Using /usr/share/dejagnu/config/unix.exp as generic interface file for target. Using /home/gdr/redhat/egcs/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. Running /home/gdr/redhat/egcs/gcc/testsuite/g++.dg/bprob/bprob.exp ... Running /home/gdr/redhat/egcs/gcc/testsuite/g++.dg/charset/charset.exp ...Running /home/gdr/redhat/egcs/gcc/testsuite/g++.dg/compat/compat.exp ...Running /home/gdr/redhat/egcs/gcc/testsuite/g++.dg/debug/debug.exp ... Running /home/gdr/redhat/egcs/gcc/testsuite/g++.dg/dg.exp ... FAIL: g++.dg/other/classkey1.C (test for errors, line 9) FAIL: g++.dg/other/classkey1.C (test for errors, line 11) FAIL: g++.dg/other/classkey1.C (test for errors, line 14) FAIL: g++.dg/other/classkey1.C (test for errors, line 17) FAIL: g++.dg/other/classkey1.C (test for excess errors) FAIL: g++.dg/parse/error15.C (test for errors, line 13) FAIL: g++.dg/parse/error15.C (test for errors, line 14) FAIL: g++.dg/parse/error15.C (test for errors, line 15) FAIL: g++.dg/parse/error15.C (test for errors, line 21) FAIL: g++.dg/parse/error15.C (test for errors, line 22) FAIL: g++.dg/parse/error15.C (test for errors, line 23) FAIL: g++.dg/parse/error15.C (test for errors, line 31) FAIL: g++.dg/parse/error15.C (test for errors, line 32) FAIL: g++.dg/parse/error15.C (test for errors, line 33) FAIL: g++.dg/parse/error15.C (test for excess errors) XPASS: g++.dg/rtti/tinfo1.C scan-assembler _ZTIP9CTemplateIhE: XPASS: g++.dg/rtti/tinfo1.C scan-assembler-not .globl[ \t]+_ZTIP9CTemplateIhE XPASS: g++.dg/rtti/tinfo1.C scan-assembler-not .section[^\n\r]*_ZTIP9CTemplateIhE[^\n\r]*FAIL: g++.dg/template/meminit2.C (test for errors, line 10) FAIL: g++.dg/template/meminit2.C (test for errors, line 11) FAIL: g++.dg/template/meminit2.C (test for excess errors) Running /home/gdr/redhat/egcs/gcc/testsuite/g++.dg/gcov/gcov.exp ... FAIL: 102:is -:should be 1 FAIL: g++.dg/gcov/gcov-1.C gcov: 1 failures in line counts, 0 in branch percentamerlin[1:27]% make check-g++ ~/build/4.0.0/gcc (rootme=`${PWDCMD-pwd}`; export rootme; \ srcdir=`cd /home/gdr/redhat/egcs/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ cd testsuite; \ EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ if [ -f ${rootme}/../expect/expect ] ; then \ TCL_LIBRARY=`cd .. ; cd /home/gdr/redhat/egcs/gcc/../tcl/library ; ${PWDCMD-pwd}` ; \ export TCL_LIBRARY ; fi ; \ `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool g++ ) Test Run By gdr on Tue Oct 5 01:27:39 2004 Native configuration is i686-pc-linux-gnu === g++ tests === Schedule of variations: unix Running target unix Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. Using /usr/share/dejagnu/config/unix.exp as generic interface file for tar method.c cfns.gperf cxx-pretty-print.c method.c.~1.315.~ cfns.h cxx-pretty-print.h name-lookup.c ChangeLog decl2.c name-lookup.c.~1.85.~ ChangeLog.1 decl.c name-lookup.h ChangeLog.~1.4404.~ decl.h NEWS ChangeLog.2 dump.c operators.def ChangeLog.3 error.c optimize.c ChangeLog.egcs except.c parser.c ChangeLog.tree-ssa expr.c parser.c.~1.258.~ class.c friend.c pt.c config-lang.in g++spec.c ptree.c cp-gimplify.c init.c repo.c cp-lang.c init.c.~1.396.~ rtti.c cp-objcp-common.c lang-specs.h search.c cp-objcp-common.h lex.c semantics.c cp-tree.def lex.c.~1.349.~ tree.c cp-tree.h Make-lang.in typeck2.c CVS mangle.c typeck.c merlin[7:37]% cvs -z9 diff -p > ~/d-5.patch ~/redhat/egcs/gcc/cp Enter passphrase for RSA key '/home/gdr/.ssh/identity': cvs [diff aborted]: received interrupt signal merlin[7:37]% cvs -z9 diff -p > ~/d-5.patch ~/redhat/egcs/gcc/cp Warning: Remote host denied X11 forwarding. Warning: Remote host denied authentication agent forwarding. cvs diff: Diffing . merlin[7:38]% l ~/d-5.patch ~/redhat/egcs/gcc/cp merlin[7:39]% cvs -z9 diff -p > ~/d-5.patch ~/redhat/egcs/gcc/cp Warning: Remote host denied X11 forwarding. Warning: Remote host denied authentication agent forwarding. cvs diff: Diffing . merlin[7:40]% l ~/d-5.patch ~/redhat/egcs/gcc/cp You have new mail. merlin[8:21]% cvs -z9 commit ~/redhat/egcs/gcc/cp merlin[8:21]% cd . ~/redhat/egcs/gcc/cp merlin[8:21]% cvs -z9 commit cp testsuite ~/redhat/egcs/gcc/cp cvs commit: nothing known about `cp' cvs commit: nothing known about `testsuite' cvs [commit aborted]: correct above errors first! merlin[8:21]% cd .. ~/redhat/egcs/gcc/cp merlin[8:21]% cvs -z9 commit cp testsuite ~/redhat/egcs/gcc cvs commit: Examining cp cvs commit: Examining testsuite cvs commit: Examining testsuite/ada cvs commit: Examining testsuite/ada/acats cvs commit: Examining testsuite/ada/acats/support cvs commit: Examining testsuite/ada/acats/tests cvs commit: Examining testsuite/ada/acats/tests/a cvs commit: Examining testsuite/ada/acats/tests/c2 cvs commit: Examining testsuite/ada/acats/tests/c3 cvs commit: Examining testsuite/ada/acats/tests/c4 cvs commit: Examining testsuite/ada/acats/tests/c5 cvs commit: Examining testsuite/ada/acats/tests/c6 cvs commit: Examining testsuite/ada/acats/tests/c7 cvs commit: Examining testsuite/ada/acats/tests/c8 cvs commit: Examining testsuite/ada/acats/tests/c9 cvs commit: Examining testsuite/ada/acats/tests/ca cvs commit: Examining testsuite/ada/acats/tests/cb cvs commit: Examining testsuite/ada/acats/tests/cc cvs commit: Examining testsuite/ada/acats/tests/cd cvs commit: Examining testsuite/ada/acats/tests/ce cvs commit: Examining testsuite/ada/acats/tests/cxa cvs commit: Examining testsuite/ada/acats/tests/cxb cvs commit: Examining testsuite/ada/acats/tests/cxf cvs commit: Examining testsuite/ada/acats/tests/cxg cvs commit: Examining testsuite/ada/acats/tests/cxh cvs commit: Examining testsuite/ada/acats/tests/cz cvs commit: Examining testsuite/ada/acats/tests/d cvs commit: Examining testsuite/ada/acats/tests/e cvs commit: Examining testsuite/ada/acats/tests/gcc cvs commit: Examining testsuite/ada/acats/tests/l cvs commit: Examining testsuite/config cvs commit: Examining testsuite/consistency.vlad cvs commit: Examining testsuite/consistency.vlad/layout cvs commit: Examining testsuite/consistency.vlad/layout/i960-97r2-results cvs commit: Examining testsuite/g++.dg cvs commit: Examining testsuite/g++.dg/abi cvs commit: Examining testsuite/g++.dg/bprob cvs commit: Examining testsuite/g++.dg/charset cvs commit: Examining testsuite/g++.dg/compat cvs commit: Examining testsuite/g++.dg/compat/abi cvs commit: Examinin From-SVN: r88552
2004-10-05 15:28:07 +02:00
ambiguous_decl, lookup_namespace_name, add_function): Likewise.
* method.c (use_thunk): Likewise.
* lex.c (unqualified_name_lookup_error,
Convert diagnostics to use quoting flag q 4/n Convert diagnostics to use quoting flag q 4/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. testsuite/ merlin[1:17]% cd build ~ merlin[1:17]% ls ~/build 3 4 4.0.0 c++0x r tree merlin[1:17]% cd 4.0.0 ~/build merlin[1:17]% cd gcc ~/build/4.0.0 merlin[1:17]% make check-g++ ~/build/4.0.0/gcc (rootme=`${PWDCMD-pwd}`; export rootme; \ srcdir=`cd /home/gdr/redhat/egcs/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ cd testsuite; \ EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ if [ -f ${rootme}/../expect/expect ] ; then \ TCL_LIBRARY=`cd .. ; cd /home/gdr/redhat/egcs/gcc/../tcl/library ; ${PWDCMD-pwd}` ; \ export TCL_LIBRARY ; fi ; \ `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool g++ ) Test Run By gdr on Tue Oct 5 01:18:04 2004 Native configuration is i686-pc-linux-gnu === g++ tests === Schedule of variations: unix Running target unix Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. Using /usr/share/dejagnu/config/unix.exp as generic interface file for target. Using /home/gdr/redhat/egcs/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. Running /home/gdr/redhat/egcs/gcc/testsuite/g++.dg/bprob/bprob.exp ... Running /home/gdr/redhat/egcs/gcc/testsuite/g++.dg/charset/charset.exp ...Running /home/gdr/redhat/egcs/gcc/testsuite/g++.dg/compat/compat.exp ...Running /home/gdr/redhat/egcs/gcc/testsuite/g++.dg/debug/debug.exp ... Running /home/gdr/redhat/egcs/gcc/testsuite/g++.dg/dg.exp ... FAIL: g++.dg/other/classkey1.C (test for errors, line 9) FAIL: g++.dg/other/classkey1.C (test for errors, line 11) FAIL: g++.dg/other/classkey1.C (test for errors, line 14) FAIL: g++.dg/other/classkey1.C (test for errors, line 17) FAIL: g++.dg/other/classkey1.C (test for excess errors) FAIL: g++.dg/parse/error15.C (test for errors, line 13) FAIL: g++.dg/parse/error15.C (test for errors, line 14) FAIL: g++.dg/parse/error15.C (test for errors, line 15) FAIL: g++.dg/parse/error15.C (test for errors, line 21) FAIL: g++.dg/parse/error15.C (test for errors, line 22) FAIL: g++.dg/parse/error15.C (test for errors, line 23) FAIL: g++.dg/parse/error15.C (test for errors, line 31) FAIL: g++.dg/parse/error15.C (test for errors, line 32) FAIL: g++.dg/parse/error15.C (test for errors, line 33) FAIL: g++.dg/parse/error15.C (test for excess errors) XPASS: g++.dg/rtti/tinfo1.C scan-assembler _ZTIP9CTemplateIhE: XPASS: g++.dg/rtti/tinfo1.C scan-assembler-not .globl[ \t]+_ZTIP9CTemplateIhE XPASS: g++.dg/rtti/tinfo1.C scan-assembler-not .section[^\n\r]*_ZTIP9CTemplateIhE[^\n\r]*FAIL: g++.dg/template/meminit2.C (test for errors, line 10) FAIL: g++.dg/template/meminit2.C (test for errors, line 11) FAIL: g++.dg/template/meminit2.C (test for excess errors) Running /home/gdr/redhat/egcs/gcc/testsuite/g++.dg/gcov/gcov.exp ... FAIL: 102:is -:should be 1 FAIL: g++.dg/gcov/gcov-1.C gcov: 1 failures in line counts, 0 in branch percentamerlin[1:27]% make check-g++ ~/build/4.0.0/gcc (rootme=`${PWDCMD-pwd}`; export rootme; \ srcdir=`cd /home/gdr/redhat/egcs/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ cd testsuite; \ EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ if [ -f ${rootme}/../expect/expect ] ; then \ TCL_LIBRARY=`cd .. ; cd /home/gdr/redhat/egcs/gcc/../tcl/library ; ${PWDCMD-pwd}` ; \ export TCL_LIBRARY ; fi ; \ `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool g++ ) Test Run By gdr on Tue Oct 5 01:27:39 2004 Native configuration is i686-pc-linux-gnu === g++ tests === Schedule of variations: unix Running target unix Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. Using /usr/share/dejagnu/config/unix.exp as generic interface file for tar method.c cfns.gperf cxx-pretty-print.c method.c.~1.315.~ cfns.h cxx-pretty-print.h name-lookup.c ChangeLog decl2.c name-lookup.c.~1.85.~ ChangeLog.1 decl.c name-lookup.h ChangeLog.~1.4404.~ decl.h NEWS ChangeLog.2 dump.c operators.def ChangeLog.3 error.c optimize.c ChangeLog.egcs except.c parser.c ChangeLog.tree-ssa expr.c parser.c.~1.258.~ class.c friend.c pt.c config-lang.in g++spec.c ptree.c cp-gimplify.c init.c repo.c cp-lang.c init.c.~1.396.~ rtti.c cp-objcp-common.c lang-specs.h search.c cp-objcp-common.h lex.c semantics.c cp-tree.def lex.c.~1.349.~ tree.c cp-tree.h Make-lang.in typeck2.c CVS mangle.c typeck.c merlin[7:37]% cvs -z9 diff -p > ~/d-5.patch ~/redhat/egcs/gcc/cp Enter passphrase for RSA key '/home/gdr/.ssh/identity': cvs [diff aborted]: received interrupt signal merlin[7:37]% cvs -z9 diff -p > ~/d-5.patch ~/redhat/egcs/gcc/cp Warning: Remote host denied X11 forwarding. Warning: Remote host denied authentication agent forwarding. cvs diff: Diffing . merlin[7:38]% l ~/d-5.patch ~/redhat/egcs/gcc/cp merlin[7:39]% cvs -z9 diff -p > ~/d-5.patch ~/redhat/egcs/gcc/cp Warning: Remote host denied X11 forwarding. Warning: Remote host denied authentication agent forwarding. cvs diff: Diffing . merlin[7:40]% l ~/d-5.patch ~/redhat/egcs/gcc/cp You have new mail. merlin[8:21]% cvs -z9 commit ~/redhat/egcs/gcc/cp merlin[8:21]% cd . ~/redhat/egcs/gcc/cp merlin[8:21]% cvs -z9 commit cp testsuite ~/redhat/egcs/gcc/cp cvs commit: nothing known about `cp' cvs commit: nothing known about `testsuite' cvs [commit aborted]: correct above errors first! merlin[8:21]% cd .. ~/redhat/egcs/gcc/cp merlin[8:21]% cvs -z9 commit cp testsuite ~/redhat/egcs/gcc cvs commit: Examining cp cvs commit: Examining testsuite cvs commit: Examining testsuite/ada cvs commit: Examining testsuite/ada/acats cvs commit: Examining testsuite/ada/acats/support cvs commit: Examining testsuite/ada/acats/tests cvs commit: Examining testsuite/ada/acats/tests/a cvs commit: Examining testsuite/ada/acats/tests/c2 cvs commit: Examining testsuite/ada/acats/tests/c3 cvs commit: Examining testsuite/ada/acats/tests/c4 cvs commit: Examining testsuite/ada/acats/tests/c5 cvs commit: Examining testsuite/ada/acats/tests/c6 cvs commit: Examining testsuite/ada/acats/tests/c7 cvs commit: Examining testsuite/ada/acats/tests/c8 cvs commit: Examining testsuite/ada/acats/tests/c9 cvs commit: Examining testsuite/ada/acats/tests/ca cvs commit: Examining testsuite/ada/acats/tests/cb cvs commit: Examining testsuite/ada/acats/tests/cc cvs commit: Examining testsuite/ada/acats/tests/cd cvs commit: Examining testsuite/ada/acats/tests/ce cvs commit: Examining testsuite/ada/acats/tests/cxa cvs commit: Examining testsuite/ada/acats/tests/cxb cvs commit: Examining testsuite/ada/acats/tests/cxf cvs commit: Examining testsuite/ada/acats/tests/cxg cvs commit: Examining testsuite/ada/acats/tests/cxh cvs commit: Examining testsuite/ada/acats/tests/cz cvs commit: Examining testsuite/ada/acats/tests/d cvs commit: Examining testsuite/ada/acats/tests/e cvs commit: Examining testsuite/ada/acats/tests/gcc cvs commit: Examining testsuite/ada/acats/tests/l cvs commit: Examining testsuite/config cvs commit: Examining testsuite/consistency.vlad cvs commit: Examining testsuite/consistency.vlad/layout cvs commit: Examining testsuite/consistency.vlad/layout/i960-97r2-results cvs commit: Examining testsuite/g++.dg cvs commit: Examining testsuite/g++.dg/abi cvs commit: Examining testsuite/g++.dg/bprob cvs commit: Examining testsuite/g++.dg/charset cvs commit: Examining testsuite/g++.dg/compat cvs commit: Examining testsuite/g++.dg/compat/abi cvs commit: Examinin From-SVN: r88552
2004-10-05 15:28:07 +02:00
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.
decl.c (grokfndecl): If ::main is found not to return int, correct it after issuing a diagnostic. gcc/cp: * 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. gcc/testsuite: * g++.dg/ext/complit1.C * g++.dg/other/error2.C * g++.dg/other/nontype-1.C * g++.dg/parse/crash11.C * g++.dg/parse/crash12.C * g++.dg/parse/error15.C * g++.dg/parse/error4.C * g++.dg/parse/tmpl-outside1.C * g++.dg/parse/too-many-tmpl-args1.C * g++.dg/template/dependent-expr3.C * g++.dg/template/error10.C * g++.dg/template/instantiate1.C * g++.dg/template/vtable2.C * g++.dg/warn/Wshadow-1.C * g++.dg/warn/weak1.C * g++.old-deja/g++.brendan/crash16.C * g++.old-deja/g++.brendan/crash18.C * g++.old-deja/g++.brendan/crash48.C * g++.old-deja/g++.brendan/crash49.C * g++.old-deja/g++.brendan/crash55.C * g++.old-deja/g++.brendan/crash56.C * g++.old-deja/g++.brendan/crash8.C * g++.old-deja/g++.brendan/enum11.C * g++.old-deja/g++.brendan/enum8.C * g++.old-deja/g++.brendan/enum9.C * g++.old-deja/g++.brendan/friend3.C * g++.old-deja/g++.brendan/misc14.C * g++.old-deja/g++.bugs/900402_02.C * g++.old-deja/g++.bugs/900404_03.C * g++.old-deja/g++.bugs/900404_04.C * g++.old-deja/g++.bugs/900428_03.C * g++.old-deja/g++.jason/crash4.C * g++.old-deja/g++.jason/overload21.C * g++.old-deja/g++.jason/redecl1.C * g++.old-deja/g++.jason/report.C * g++.old-deja/g++.jason/rfg10.C * g++.old-deja/g++.jason/template30.C * g++.old-deja/g++.law/arm12.C * g++.old-deja/g++.law/ctors5.C * g++.old-deja/g++.law/cvt20.C * g++.old-deja/g++.law/init10.C * g++.old-deja/g++.law/init8.C * g++.old-deja/g++.law/visibility17.C * g++.old-deja/g++.law/visibility7.C * g++.old-deja/g++.mike/net8.C * g++.old-deja/g++.mike/p646.C * g++.old-deja/g++.mike/p700.C * g++.old-deja/g++.mike/p701.C * g++.old-deja/g++.mike/p811.C * g++.old-deja/g++.ns/template13.C * g++.old-deja/g++.other/array3.C * g++.old-deja/g++.other/crash25.C * g++.old-deja/g++.other/dtor3.C * g++.old-deja/g++.other/dtor4.C * g++.old-deja/g++.other/main1.C * g++.old-deja/g++.other/warn7.C * g++.old-deja/g++.pt/crash11.C * g++.old-deja/g++.pt/crash36.C * g++.old-deja/g++.pt/spec22.C * g++.old-deja/g++.pt/spec9.C * g++.old-deja/g++.pt/ttp52.C * g++.old-deja/g++.robertl/eb103.C * g++.old-deja/g++.robertl/eb121.C * g++.old-deja/g++.robertl/eb22.C * g++.old-deja/g++.robertl/eb8.C: Update locations and/or regexps of dg-error markers. Remove markers for some bogus messages that are no longer issued. libstdc++-v3: * testsuite/20_util/memory/auto_ptr/assign_neg.cc * testsuite/23_containers/map/operators/1_neg.cc * testsuite/23_containers/set/operators/1_neg.cc: Update locations and/or regexps of dg-error markers. From-SVN: r87985
2004-09-23 23:27:25 +02:00
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.
decl.c (grokfndecl): If ::main is found not to return int, correct it after issuing a diagnostic. gcc/cp: * 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. gcc/testsuite: * g++.dg/ext/complit1.C * g++.dg/other/error2.C * g++.dg/other/nontype-1.C * g++.dg/parse/crash11.C * g++.dg/parse/crash12.C * g++.dg/parse/error15.C * g++.dg/parse/error4.C * g++.dg/parse/tmpl-outside1.C * g++.dg/parse/too-many-tmpl-args1.C * g++.dg/template/dependent-expr3.C * g++.dg/template/error10.C * g++.dg/template/instantiate1.C * g++.dg/template/vtable2.C * g++.dg/warn/Wshadow-1.C * g++.dg/warn/weak1.C * g++.old-deja/g++.brendan/crash16.C * g++.old-deja/g++.brendan/crash18.C * g++.old-deja/g++.brendan/crash48.C * g++.old-deja/g++.brendan/crash49.C * g++.old-deja/g++.brendan/crash55.C * g++.old-deja/g++.brendan/crash56.C * g++.old-deja/g++.brendan/crash8.C * g++.old-deja/g++.brendan/enum11.C * g++.old-deja/g++.brendan/enum8.C * g++.old-deja/g++.brendan/enum9.C * g++.old-deja/g++.brendan/friend3.C * g++.old-deja/g++.brendan/misc14.C * g++.old-deja/g++.bugs/900402_02.C * g++.old-deja/g++.bugs/900404_03.C * g++.old-deja/g++.bugs/900404_04.C * g++.old-deja/g++.bugs/900428_03.C * g++.old-deja/g++.jason/crash4.C * g++.old-deja/g++.jason/overload21.C * g++.old-deja/g++.jason/redecl1.C * g++.old-deja/g++.jason/report.C * g++.old-deja/g++.jason/rfg10.C * g++.old-deja/g++.jason/template30.C * g++.old-deja/g++.law/arm12.C * g++.old-deja/g++.law/ctors5.C * g++.old-deja/g++.law/cvt20.C * g++.old-deja/g++.law/init10.C * g++.old-deja/g++.law/init8.C * g++.old-deja/g++.law/visibility17.C * g++.old-deja/g++.law/visibility7.C * g++.old-deja/g++.mike/net8.C * g++.old-deja/g++.mike/p646.C * g++.old-deja/g++.mike/p700.C * g++.old-deja/g++.mike/p701.C * g++.old-deja/g++.mike/p811.C * g++.old-deja/g++.ns/template13.C * g++.old-deja/g++.other/array3.C * g++.old-deja/g++.other/crash25.C * g++.old-deja/g++.other/dtor3.C * g++.old-deja/g++.other/dtor4.C * g++.old-deja/g++.other/main1.C * g++.old-deja/g++.other/warn7.C * g++.old-deja/g++.pt/crash11.C * g++.old-deja/g++.pt/crash36.C * g++.old-deja/g++.pt/spec22.C * g++.old-deja/g++.pt/spec9.C * g++.old-deja/g++.pt/ttp52.C * g++.old-deja/g++.robertl/eb103.C * g++.old-deja/g++.robertl/eb121.C * g++.old-deja/g++.robertl/eb22.C * g++.old-deja/g++.robertl/eb8.C: Update locations and/or regexps of dg-error markers. Remove markers for some bogus messages that are no longer issued. libstdc++-v3: * testsuite/20_util/memory/auto_ptr/assign_neg.cc * testsuite/23_containers/map/operators/1_neg.cc * testsuite/23_containers/set/operators/1_neg.cc: Update locations and/or regexps of dg-error markers. From-SVN: r87985
2004-09-23 23:27:25 +02:00
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.
c-common.c (fix_string_type): Build the unqualified array type unconditionally... 2004-09-20 Matt Austern <austern@apple.com> Zack Weinberg <zack@codesourcery.com> * c-common.c (fix_string_type): Build the unqualified array type unconditionally, then use c_build_qualified_type to get the proper const-qualified variant, and set its TYPE_MAIN_VARIANT to refer to the unqualified type. * c-lex.c (c_lex_return_raw_string): New global. (c_lex_with_flags): Honor it. * c-pragma.h: Declare it. cp: * 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. From-SVN: r87786
2004-09-21 04:22:45 +02:00
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.
alias.c (find_base_decl): Remove unreachable case '3' block. 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com> Zack Weinberg <zack@codesourcery.com> * alias.c (find_base_decl): Remove unreachable case '3' block. * expr.c (safe_from_p): Abort if passed a type. * tree-gimple.c (recalculate_side_effects): Abort if passed anything other than an expression. * tree-ssa-pre.c (phi_translate): Return expr immediately if is_gimple_min_invariant is true for it. Reorder cases for clarity. Abort on un-handled tree classes. (valid_in_set): Likewise. * tree.c (tree_code_class_strings): New static data. * tree.h (enum tree_code_class): New. (tree_code_class_strings): Declare. (TREE_CODE_CLASS_STRING, EXCEPTIONAL_CLASS_P, CONSTANT_CLASS_P) (REFERENCE_CLASS_P, COMPARISON_CLASS_P, UNARY_CLASS_P, BINARY_CLASS_P) (STATEMENT_CLASS_P, EXPRESSION_CLASS_P, IS_TYPE_OR_DECL_P): New macros. (TYPE_P, DECL_P, IS_NON_TYPE_CODE_CLASS, IS_EXPR_CODE_CLASS) (checking macros, EXPR_LOCATION, SET_EXPR_LOCATION, EXPR_LOCUS): Update. * tree.def, c-common.def, objc/objc-tree.def: Use tree_code_class enumeration constants instead of code letters. * alias.c, builtins.c, c-common.c, c-format.c, c-lang.c, c-pragma.c * c-typeck.c, cgraphunit.c, convert.c, dbxout.c, dwarf2out.c * emit-rtl.c expr.c, fold-const.c, gimplify.c, lambda-code.c * langhooks.c, langhooks.h, predict.c, print-tree.c, reload1.c, stmt.c * tree-browser.c, tree-cfg.c, tree-chrec.c, tree-complex.c, tree-dfa.c * tree-dump.c, tree-eh.c, tree-gimple.c, tree-inline.c, tree-nested.c * tree-outof-ssa.c, tree-pretty-print.c, tree-sra.c, tree-ssa-ccp.c * tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-forwprop.c, tree-ssa-live.c * tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-operands.c * tree-ssa-phiopt.c, tree-ssa-pre.c, tree-ssa-propagate.c * tree-ssa.c, tree-ssanames.c, tree-tailcall.c, tree.c, varasm.c * config/sol2-c.c, config/arm/arm.c, config/i386/winnt.c * config/pa/pa.c, config/pa/pa.h, config/sh/sh.c, objc/objc-lang.c Update to match. * LANGUAGES: Add note about change. ada: * ada-tree.def: Use tree_code_class enumeration constants instead of code letters. * ada-tree.h, decl.c, misc.c, trans.c, utils.c, utils2.c: Update for new tree-class enumeration constants. cp: * 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. fortran: * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class enumeration constants. java: * java-tree.def: Use tree_code_class enumeration constants instead of code letters. * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for new tree-class enumeration constants. treelang: * treetree.c: Update for new tree-class enumeration constants. From-SVN: r87675
2004-09-17 23:55:02 +02:00
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>
alias.c (find_base_decl): Remove unreachable case '3' block. 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com> Zack Weinberg <zack@codesourcery.com> * alias.c (find_base_decl): Remove unreachable case '3' block. * expr.c (safe_from_p): Abort if passed a type. * tree-gimple.c (recalculate_side_effects): Abort if passed anything other than an expression. * tree-ssa-pre.c (phi_translate): Return expr immediately if is_gimple_min_invariant is true for it. Reorder cases for clarity. Abort on un-handled tree classes. (valid_in_set): Likewise. * tree.c (tree_code_class_strings): New static data. * tree.h (enum tree_code_class): New. (tree_code_class_strings): Declare. (TREE_CODE_CLASS_STRING, EXCEPTIONAL_CLASS_P, CONSTANT_CLASS_P) (REFERENCE_CLASS_P, COMPARISON_CLASS_P, UNARY_CLASS_P, BINARY_CLASS_P) (STATEMENT_CLASS_P, EXPRESSION_CLASS_P, IS_TYPE_OR_DECL_P): New macros. (TYPE_P, DECL_P, IS_NON_TYPE_CODE_CLASS, IS_EXPR_CODE_CLASS) (checking macros, EXPR_LOCATION, SET_EXPR_LOCATION, EXPR_LOCUS): Update. * tree.def, c-common.def, objc/objc-tree.def: Use tree_code_class enumeration constants instead of code letters. * alias.c, builtins.c, c-common.c, c-format.c, c-lang.c, c-pragma.c * c-typeck.c, cgraphunit.c, convert.c, dbxout.c, dwarf2out.c * emit-rtl.c expr.c, fold-const.c, gimplify.c, lambda-code.c * langhooks.c, langhooks.h, predict.c, print-tree.c, reload1.c, stmt.c * tree-browser.c, tree-cfg.c, tree-chrec.c, tree-complex.c, tree-dfa.c * tree-dump.c, tree-eh.c, tree-gimple.c, tree-inline.c, tree-nested.c * tree-outof-ssa.c, tree-pretty-print.c, tree-sra.c, tree-ssa-ccp.c * tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-forwprop.c, tree-ssa-live.c * tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-operands.c * tree-ssa-phiopt.c, tree-ssa-pre.c, tree-ssa-propagate.c * tree-ssa.c, tree-ssanames.c, tree-tailcall.c, tree.c, varasm.c * config/sol2-c.c, config/arm/arm.c, config/i386/winnt.c * config/pa/pa.c, config/pa/pa.h, config/sh/sh.c, objc/objc-lang.c Update to match. * LANGUAGES: Add note about change. ada: * ada-tree.def: Use tree_code_class enumeration constants instead of code letters. * ada-tree.h, decl.c, misc.c, trans.c, utils.c, utils2.c: Update for new tree-class enumeration constants. cp: * 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. fortran: * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class enumeration constants. java: * java-tree.def: Use tree_code_class enumeration constants instead of code letters. * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for new tree-class enumeration constants. treelang: * treetree.c: Update for new tree-class enumeration constants. From-SVN: r87675
2004-09-17 23:55:02 +02:00
* 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.
configure.ac: Check for COMDAT support. * configure.ac: Check for COMDAT support. Robustify check for SHF_MERGE support. * configure: Regenerated. * config.in: Likewise. * langhooks-def.h (lhd_comdat_group): New function. (LANG_HOOKS_COMDAT_GROUP): New macro. (LANG_HOOKS_DECLS): Use it. * langhooks.c (lhd_comdat_group): Define. * langhooks.h (lang_hooks_for_decls): Add comdat_group. * output.h (named_section_flags): Make it a macro. (named_section_real): New function. (default_no_named_section): Add decl parameter. (default_elf_asm_named_section): Likewise. (default_coff_asm_named_section): Likewise. (default_pe_asm_named_section): Likewise. * target.h (gcc_target): Adjust type of named_section. * varasm.c (named_section_flags): Rename to named_section_real. Add decl parameter. (default_no_named_section): Add decl parameter. (default_elf_asm_named_section): Use COMDAT, if available. Deal with the case that ASM_COMMENT_START is "@". (default_coff_asm_named_section): Add decl parameter. (default_pe_asm_named_section): Likewise. * config/alpha/alpha.c (vms_asm_named_section): Add decl parameter. (unicosmk_asm_named_section): Likewise. * config/arm/arm.c (arm_elf_asm_named_section): Remove. * config/arm/elf.h (TARGET_ASM_NAMED_SECTION): Likewise. * config/c4x/c4x.c (c4x_asm_named_section): Add decl parameter. * config/cris/cris-protos.h (cris_target_asm_named_section): Likewise. * config/cris/cris.c (cris_target_asm_named_section): Likewise. * config/h8300/h8300.c (h8300_asm_named_section): Likewise. * config/i386/i386-protos.h (i386_pe_asm_named_section): Likewise. * config/i386/winnt.c (i386_pe_asm_named_section): Likewise. * config/m68k/m68k.c (m68k_coff_asm_named_section): Likewise. * config/mcore/mcore.c (mcore_asm_named_section): Likewise. * config/rs6000/rs6000.c (rs6000_xcoff_asm_named_section): Likewise. * config/sparc/sparc.c (sparce_elf_asm_named_section): Likewise. * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define. * cp-tree.h (cxx_comdat_group): Declare. * decl.c (cxx_comdat_group): New function. From-SVN: r87557
2004-09-15 19:03:22 +02:00
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
alias.c (find_base_decl): Remove unreachable case '3' block. 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com> Zack Weinberg <zack@codesourcery.com> * alias.c (find_base_decl): Remove unreachable case '3' block. * expr.c (safe_from_p): Abort if passed a type. * tree-gimple.c (recalculate_side_effects): Abort if passed anything other than an expression. * tree-ssa-pre.c (phi_translate): Return expr immediately if is_gimple_min_invariant is true for it. Reorder cases for clarity. Abort on un-handled tree classes. (valid_in_set): Likewise. * tree.c (tree_code_class_strings): New static data. * tree.h (enum tree_code_class): New. (tree_code_class_strings): Declare. (TREE_CODE_CLASS_STRING, EXCEPTIONAL_CLASS_P, CONSTANT_CLASS_P) (REFERENCE_CLASS_P, COMPARISON_CLASS_P, UNARY_CLASS_P, BINARY_CLASS_P) (STATEMENT_CLASS_P, EXPRESSION_CLASS_P, IS_TYPE_OR_DECL_P): New macros. (TYPE_P, DECL_P, IS_NON_TYPE_CODE_CLASS, IS_EXPR_CODE_CLASS) (checking macros, EXPR_LOCATION, SET_EXPR_LOCATION, EXPR_LOCUS): Update. * tree.def, c-common.def, objc/objc-tree.def: Use tree_code_class enumeration constants instead of code letters. * alias.c, builtins.c, c-common.c, c-format.c, c-lang.c, c-pragma.c * c-typeck.c, cgraphunit.c, convert.c, dbxout.c, dwarf2out.c * emit-rtl.c expr.c, fold-const.c, gimplify.c, lambda-code.c * langhooks.c, langhooks.h, predict.c, print-tree.c, reload1.c, stmt.c * tree-browser.c, tree-cfg.c, tree-chrec.c, tree-complex.c, tree-dfa.c * tree-dump.c, tree-eh.c, tree-gimple.c, tree-inline.c, tree-nested.c * tree-outof-ssa.c, tree-pretty-print.c, tree-sra.c, tree-ssa-ccp.c * tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-forwprop.c, tree-ssa-live.c * tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-operands.c * tree-ssa-phiopt.c, tree-ssa-pre.c, tree-ssa-propagate.c * tree-ssa.c, tree-ssanames.c, tree-tailcall.c, tree.c, varasm.c * config/sol2-c.c, config/arm/arm.c, config/i386/winnt.c * config/pa/pa.c, config/pa/pa.h, config/sh/sh.c, objc/objc-lang.c Update to match. * LANGUAGES: Add note about change. ada: * ada-tree.def: Use tree_code_class enumeration constants instead of code letters. * ada-tree.h, decl.c, misc.c, trans.c, utils.c, utils2.c: Update for new tree-class enumeration constants. cp: * 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. fortran: * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class enumeration constants. java: * java-tree.def: Use tree_code_class enumeration constants instead of code letters. * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for new tree-class enumeration constants. treelang: * treetree.c: Update for new tree-class enumeration constants. From-SVN: r87675
2004-09-17 23:55:02 +02:00
* 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.
configure.in: Remove target-libstdc++-v3 from noconfigdirs for *-*-netware... / * configure.in: Remove target-libstdc++-v3 from noconfigdirs for *-*-netware, but add target-libmudflap. Consolidate *-*-netware targets (of which really only i?86 exists) into a single entry. * configure: Likewise. gcc/ * config.gcc: Resurrect NetWare as a target. Handle special case of Novell linker to be used (specified through --with-ld=) and threading model of either Posix (default) or NKS. * config/i386/i386.c (ix86_return_pops_args): Conditionalize popping of incoming hidden argument on KEEP_AGGREGATE_RETURN_POINTER. * config/i386/i386.h (KEEP_AGGREGATE_RETURN_POINTER): New. * config/i386/netware.c, config/i386/netware.h: New. * config/i386/nwld.c, config/i386/nwld.h: New. * config/i386/netware-crt0.c: New. * config/i386/netware-libgcc.c: New. * config/i386/netware-libgcc.def: New. * config/i386/netware-libgcc.exp: New. * config/i386/t-netware, config/i386/t-nwld: New. * gthr-nks.h: New. * doc/install.texi: Document NKS threading model. gcc/cp/ * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather than "-lm". gcc/testsuite/ * g++.dg/abi/bitfield5.C: Use -mno-ms-bitfields. * g++.old-deja/g++.jason/thunk2.C: xfail for NetWare. * g++.old-deja/g++.law/profile1.C: xfail for NetWare. * g++.old-deja/g++.other/store-expr1.C: xfail for NetWare. * gcc.c-torture/compile/20001109-1.c: xfail for NetWare. * gcc.c-torture/compile/20001109-2.c: xfail for NetWare. * gcc.c-torture/execute/multi-ix.c: Use __builtin_bzero rather than the non-portable bzero. * gcc.dg/20010912-1.c: xfail for NetWare. * gcc.dg/20020426-2.c: xfail for NetWare. * gcc.dg/20021014-1.c: xfail for NetWare. * gcc.dg/20021018-1.c: xfail for NetWare. * gcc.dg/20030213-1.c: xfail for NetWare. * gcc.dg/20030225-1.c: xfail for NetWare. * gcc.dg/20030708-1.c: xfail for NetWare. * gcc.dg/builtins-config.h: Also exclude NetWare. * gcc.dg/format/format.h: Define restrict only if not already defined. * gcc.dg/nest.c: xfail for NetWare. * gcc.dg/special/gcsec-1.c: Don't pass -static for NetWare. * lib/target-supports.exp (check_visibility_available): Exclude NetWare. fixincludes/ * inclhack.def: Suppress exception_structure and math_exception for NetWare headers. * fixincl.x: Regenerate. libstdc++-v3/ * crossconfig.m4: Add NetWare as a target. * configure: Regenerate. From-SVN: r87040
2004-09-03 20:10:08 +02:00
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.
Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o. 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. From-SVN: r86837
2004-08-31 20:51:08 +02:00
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,
Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o. 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. From-SVN: r86837
2004-08-31 20:51:08 +02:00
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.
call.c (check_dtor_name): Replace abort with gcc_assert or gcc_unreachable. * 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. From-SVN: r86778
2004-08-30 17:28:48 +02:00
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.
re PR c++/13684 (local static object variable constructed once but ctors and dtors called multiple times on same memory when called in multiple threads) PR c++/13684 * cp/decl.c (expand_static_init): Use thread-safety API. (register_dtor_fn): Return the call, don't expand it. * cp/tree.c (add_stmt_to_compound): New fn. (stabilize_call): Use it. * gimplify.c (gimplify_cleanup_point_expr): Handle CLEANUP_EH_ONLY. (gimple_push_cleanup): Add eh_only parm. (gimplify_target_expr): Pass it. * c.opt (-fno-threadsafe-statics): New option. * c-opts.c (c_common_handle_option): Handle it. * c-common.h (flag_threadsafe_statics): Declare it. * c-common.c (flag_threadsafe_statics): Record it. * doc/invoke.texi: Document it. * tsystem.h (_GNU_SOURCE): Define. * gthr-posix.h (__gthread_recursive_mutex_t): New typedef. (__GTHREAD_RECURSIVE_MUTEX_INIT): New macro. (__GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION): New macro. (__gthread_recursive_mutex_init_function): New fn. (__gthread_recursive_mutex_lock): New fn. (__gthread_recursive_mutex_trylock): New fn. (__gthread_recursive_mutex_unlock): New fn. * gthr-solaris.h, gthr-single.h, gthr-dce.h: Likewise. * gthr-win32.h, gthr-vxworks.h: Likewise. * gthr.h: Document. * libsupc++/guard.cc (static_mutex): Internal class implementing a recursive mutex which controls initialization of local statics. (__gnu_cxx::recursive_init): New exception class. (__cxa_guard_acquire): Deal with locking and recursion detection. (acquire_1, __cxa_guard_abort, __cxa_guard_release): Likewise. From-SVN: r86687
2004-08-28 04:33:54 +02:00
2004-08-27 Jason Merrill <jason@redhat.com>
PR c++/16851
* tree.c (stabilize_init): See through a COMPOUND_EXPR.
re PR c++/13684 (local static object variable constructed once but ctors and dtors called multiple times on same memory when called in multiple threads) PR c++/13684 * cp/decl.c (expand_static_init): Use thread-safety API. (register_dtor_fn): Return the call, don't expand it. * cp/tree.c (add_stmt_to_compound): New fn. (stabilize_call): Use it. * gimplify.c (gimplify_cleanup_point_expr): Handle CLEANUP_EH_ONLY. (gimple_push_cleanup): Add eh_only parm. (gimplify_target_expr): Pass it. * c.opt (-fno-threadsafe-statics): New option. * c-opts.c (c_common_handle_option): Handle it. * c-common.h (flag_threadsafe_statics): Declare it. * c-common.c (flag_threadsafe_statics): Record it. * doc/invoke.texi: Document it. * tsystem.h (_GNU_SOURCE): Define. * gthr-posix.h (__gthread_recursive_mutex_t): New typedef. (__GTHREAD_RECURSIVE_MUTEX_INIT): New macro. (__GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION): New macro. (__gthread_recursive_mutex_init_function): New fn. (__gthread_recursive_mutex_lock): New fn. (__gthread_recursive_mutex_trylock): New fn. (__gthread_recursive_mutex_unlock): New fn. * gthr-solaris.h, gthr-single.h, gthr-dce.h: Likewise. * gthr-win32.h, gthr-vxworks.h: Likewise. * gthr.h: Document. * libsupc++/guard.cc (static_mutex): Internal class implementing a recursive mutex which controls initialization of local statics. (__gnu_cxx::recursive_init): New exception class. (__cxa_guard_acquire): Deal with locking and recursion detection. (acquire_1, __cxa_guard_abort, __cxa_guard_release): Likewise. From-SVN: r86687
2004-08-28 04:33:54 +02:00
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.
call.c (validate_conversion_obstack): Replace my_friendly_assert with gcc_assert or gcc_unreachable. * 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. From-SVN: r86669
2004-08-27 19:59:33 +02:00
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.
tree.h (build_int_cst): New, sign extended constant. * tree.h (build_int_cst): New, sign extended constant. (build_int_cstu): New, zero extended constant. (build_int_cst_wide): Renamed from build_int_cst. * tree.c (build_int_cst, build_int_cstu): New. (build_int_cst_wide): Renamed from build_int_cst. (make_vector_type, build_common_tree_nodes, build_common_tree_nodes_2): Adjust build_int_cst calls. * builtins.c (expand_builtin_prefetch, expand_builtin_strstr, expand_builtin_strpbrk, expand_builtin_fputs, build_string_literal, expand_builtin_printf, expand_builtin_sprintf, fold_builtin_classify_type, fold_builtin_lround, fold_builtin_bitop, fold_builtin_isascii, fold_builtin_toascii, fold_builtin_isdigit, simplify_builtin_strstr, simplify_builtin_strpbrk, fold_builtin_fputs, simplify_builtin_sprintf): Likewise. * c-common.c (start_fname_decls, fix_string_type, shorten_compare, DEF_ATTR_INT): Likewise. * c-decl.c (complete_array_type, check_bitfield_type_and_width): Likewise. * c-lex.c (interpret_integer, lex_charconst): Likewise. * c-parse.in (primary) <TYPES_COMPATIBLE_P> Likewise. * c-pretty-print.c (pp_c_integer_constant): Likewise. * c-typeck.c (really_start_incremental_init, push_init_level, set_nonincremental_init_from_string): Likewise. * calls.c (load_register_parameters): Likewise. convert.c (convert_to_pointer): Likewise. coverage.c (coverage_counter_alloc, tree_coverage_counter_ref, build_fn_info_type, build_fn_info_value, build_ctr_info_value, build_gcov_info): Likewise. * except.c (init_eh, assign_filter_values): Likewise. * expmed.c (store_fixed_bit_field, extract_bit_field, extract_fixed_bit_field, extract_split_bit_field, expand_shift, expand_mult_const, expand_mult_highpart_adjust, extract_high_half, expand_sdiv_pow2, expand_divmod, make_tree): Likewise. * expr.c (convert_move, emit_group_load, emit_group_store, expand_assignment, store_constructor, store_field, expand_expr_real_1, reduce_to_bit_field_precision): Likewise. fold-const.c (force_fit_type, int_const_binop, fold_convert_const, invert_truthvalue, optimize_bit_field_compare, decode_field_reference, all_ones_mask_p, constant_boolean_node, fold_div_compare, fold, fold_read_from_constant_string, fold_negate_const, fold_abs_const, fold_not_const, round_up, round_down): Likewise. * function.c (assign_parm_setup_block): Likewise. * stmt.c (shift_return_value, expand_case, estimate_case_costs): Likewise. * stor-layout.c (layout_type, initialize_sizetypes, set_min_and_max_values_for_integral_type): Likewise. * tree-chrec.c (chrec_fold_multiply_poly_poly, reset_evolution_in_loop): Likewise. * tree-chrec.h (build_polynomial_chrec): Likewise. * tree-complex.c (build_replicated_const): Likewise. * tree-eh.c (honor_protect_cleanup_actions, lower_try_finally_onedest, lower_try_finally_copy, lower_try_finally_switch): Likewise. * tree-mudflap.c (mf_build_string, mx_register_decls, mudflap_register_call, mudflap_enqueue_constant): Likewise. * tree-nested.c (get_trampoline_type, get_nl_goto_field): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * tree-ssa-ccp.c (widen_bitfield, maybe_fold_offset_to_array_ref): Likewise. * tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Likewise. * tree-ssa-loop-niter.c (number_of_iterations_cond, loop_niter_by_eval, upper_bound_in_type, lower_bound_in_type): Likewise. * tree-ssa-loop-ivcanon.c (create_canonical_iv, canonicalize_loop_induction_variables): Likewise. * tree-vectorizer.c (vect_create_index_for_array_ref, vect_transform_loop_bound, vect_compute_data_ref_alignment): Likewise. * config/alpha/alpha.c (alpha_initialize_trampoline, alpha_va_start, alpha_gimplify_va_arg_1): Likewise. * config/arm/arm.c (arm_get_cookie_size): Likewise. * config/c4x/c4x.c (c4x_gimplify_va_arg_expr): Likewise. * config/i386/i386.c (ix86_va_start, ix86_gimplify_va_arg): Likewise. * config/ia64/ia64.c (ia64_gimplify_va_arg): Likewise. * config/mips/mips.c (mips_build_builtin_va_list, mips_va_start, mips_gimplify_va_arg_expr): Likewise. * config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise. * config/rs6000/rs6000.c (rs6000_va_start, rs6000_gimplify_va_arg, add_compiler_branch_island): Likewise. * config/s390/s390.c (s390_va_start): Likewise. * config/sh/sh.c (sh_va_start): Likewise. * config/stormy16/stormy16.c (xstormy16_expand_builtin_va_start): Likewise. * config/xtensa/xtensa.c (xtensa_va_start, xtensa_gimplify_va_arg_expr): Likewise. * objc/objc-act.c (build_objc_string_object, build_objc_symtab_template, init_def_list, init_objc_symtab, init_module_descriptor, generate_static_references, build_selector_translation_table, get_proto_encoding, build_typed_selector_reference, build_selector_reference, build_next_objc_exception_stuff, build_method_prototype_list_template, generate_descriptor_table, generate_protocols, build_protocol_initializer, build_ivar_list_template, build_method_list_template, build_ivar_list_initializer, generate_ivars_list, generate_dispatch_table, generate_protocol_list, build_category_initializer, build_shared_structure_initializer, generate_shared_structures, handle_impent, generate_objc_image_info): Likewise. 2004-04-25 Paolo Bonzini <bonzini@gnu.org> * cfglayout.c (duplicate_insn_chain): Remove references to NOTE_INSN_LOOP_VTOP and NOTE_INSN_LOOP_CONT. * cfgloop.h (struct loop): Remove fields vtop, cont and cont_dominator. * cfgrtl.c (rtl_delete_block): Remove handling of NOTE_INSN_LOOP_CONT. * final.c (final_scan_insn): Remove references to NOTE_INSN_LOOP_VTOP and NOTE_INSN_LOOP_CONT. * insn-notes.def (NOTE_INSN_LOOP_VTOP, NOTE_INSN_LOOP_CONT): Remove. * jump.c (squeeze_notes): Remove references to NOTE_INSN_LOOP_VTOP and NOTE_INSN_LOOP_CONT. * loop.c (scan_loops, find_and_verify_loops, for_each_insn_in_loop, check_dbra_loop, loop_dump_aux): Remove references to removed notes and fields. * reorg.c (mostly_true_jump): Do not rely on NOTE_INSN_LOOP_VTOPs. * unroll.c (unroll_loop, copy_loop_body, loop_iterations): Remove references to removed notes and fields. (subtract_reg_term, ujump_to_loop_cont): Remove. From-SVN: r86544
2004-08-25 11:52:54 +02:00
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>
tree.h (build_int_cst): New, sign extended constant. * tree.h (build_int_cst): New, sign extended constant. (build_int_cstu): New, zero extended constant. (build_int_cst_wide): Renamed from build_int_cst. * tree.c (build_int_cst, build_int_cstu): New. (build_int_cst_wide): Renamed from build_int_cst. (make_vector_type, build_common_tree_nodes, build_common_tree_nodes_2): Adjust build_int_cst calls. * builtins.c (expand_builtin_prefetch, expand_builtin_strstr, expand_builtin_strpbrk, expand_builtin_fputs, build_string_literal, expand_builtin_printf, expand_builtin_sprintf, fold_builtin_classify_type, fold_builtin_lround, fold_builtin_bitop, fold_builtin_isascii, fold_builtin_toascii, fold_builtin_isdigit, simplify_builtin_strstr, simplify_builtin_strpbrk, fold_builtin_fputs, simplify_builtin_sprintf): Likewise. * c-common.c (start_fname_decls, fix_string_type, shorten_compare, DEF_ATTR_INT): Likewise. * c-decl.c (complete_array_type, check_bitfield_type_and_width): Likewise. * c-lex.c (interpret_integer, lex_charconst): Likewise. * c-parse.in (primary) <TYPES_COMPATIBLE_P> Likewise. * c-pretty-print.c (pp_c_integer_constant): Likewise. * c-typeck.c (really_start_incremental_init, push_init_level, set_nonincremental_init_from_string): Likewise. * calls.c (load_register_parameters): Likewise. convert.c (convert_to_pointer): Likewise. coverage.c (coverage_counter_alloc, tree_coverage_counter_ref, build_fn_info_type, build_fn_info_value, build_ctr_info_value, build_gcov_info): Likewise. * except.c (init_eh, assign_filter_values): Likewise. * expmed.c (store_fixed_bit_field, extract_bit_field, extract_fixed_bit_field, extract_split_bit_field, expand_shift, expand_mult_const, expand_mult_highpart_adjust, extract_high_half, expand_sdiv_pow2, expand_divmod, make_tree): Likewise. * expr.c (convert_move, emit_group_load, emit_group_store, expand_assignment, store_constructor, store_field, expand_expr_real_1, reduce_to_bit_field_precision): Likewise. fold-const.c (force_fit_type, int_const_binop, fold_convert_const, invert_truthvalue, optimize_bit_field_compare, decode_field_reference, all_ones_mask_p, constant_boolean_node, fold_div_compare, fold, fold_read_from_constant_string, fold_negate_const, fold_abs_const, fold_not_const, round_up, round_down): Likewise. * function.c (assign_parm_setup_block): Likewise. * stmt.c (shift_return_value, expand_case, estimate_case_costs): Likewise. * stor-layout.c (layout_type, initialize_sizetypes, set_min_and_max_values_for_integral_type): Likewise. * tree-chrec.c (chrec_fold_multiply_poly_poly, reset_evolution_in_loop): Likewise. * tree-chrec.h (build_polynomial_chrec): Likewise. * tree-complex.c (build_replicated_const): Likewise. * tree-eh.c (honor_protect_cleanup_actions, lower_try_finally_onedest, lower_try_finally_copy, lower_try_finally_switch): Likewise. * tree-mudflap.c (mf_build_string, mx_register_decls, mudflap_register_call, mudflap_enqueue_constant): Likewise. * tree-nested.c (get_trampoline_type, get_nl_goto_field): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * tree-ssa-ccp.c (widen_bitfield, maybe_fold_offset_to_array_ref): Likewise. * tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Likewise. * tree-ssa-loop-niter.c (number_of_iterations_cond, loop_niter_by_eval, upper_bound_in_type, lower_bound_in_type): Likewise. * tree-ssa-loop-ivcanon.c (create_canonical_iv, canonicalize_loop_induction_variables): Likewise. * tree-vectorizer.c (vect_create_index_for_array_ref, vect_transform_loop_bound, vect_compute_data_ref_alignment): Likewise. * config/alpha/alpha.c (alpha_initialize_trampoline, alpha_va_start, alpha_gimplify_va_arg_1): Likewise. * config/arm/arm.c (arm_get_cookie_size): Likewise. * config/c4x/c4x.c (c4x_gimplify_va_arg_expr): Likewise. * config/i386/i386.c (ix86_va_start, ix86_gimplify_va_arg): Likewise. * config/ia64/ia64.c (ia64_gimplify_va_arg): Likewise. * config/mips/mips.c (mips_build_builtin_va_list, mips_va_start, mips_gimplify_va_arg_expr): Likewise. * config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise. * config/rs6000/rs6000.c (rs6000_va_start, rs6000_gimplify_va_arg, add_compiler_branch_island): Likewise. * config/s390/s390.c (s390_va_start): Likewise. * config/sh/sh.c (sh_va_start): Likewise. * config/stormy16/stormy16.c (xstormy16_expand_builtin_va_start): Likewise. * config/xtensa/xtensa.c (xtensa_va_start, xtensa_gimplify_va_arg_expr): Likewise. * objc/objc-act.c (build_objc_string_object, build_objc_symtab_template, init_def_list, init_objc_symtab, init_module_descriptor, generate_static_references, build_selector_translation_table, get_proto_encoding, build_typed_selector_reference, build_selector_reference, build_next_objc_exception_stuff, build_method_prototype_list_template, generate_descriptor_table, generate_protocols, build_protocol_initializer, build_ivar_list_template, build_method_list_template, build_ivar_list_initializer, generate_ivars_list, generate_dispatch_table, generate_protocol_list, build_category_initializer, build_shared_structure_initializer, generate_shared_structures, handle_impent, generate_objc_image_info): Likewise. 2004-04-25 Paolo Bonzini <bonzini@gnu.org> * cfglayout.c (duplicate_insn_chain): Remove references to NOTE_INSN_LOOP_VTOP and NOTE_INSN_LOOP_CONT. * cfgloop.h (struct loop): Remove fields vtop, cont and cont_dominator. * cfgrtl.c (rtl_delete_block): Remove handling of NOTE_INSN_LOOP_CONT. * final.c (final_scan_insn): Remove references to NOTE_INSN_LOOP_VTOP and NOTE_INSN_LOOP_CONT. * insn-notes.def (NOTE_INSN_LOOP_VTOP, NOTE_INSN_LOOP_CONT): Remove. * jump.c (squeeze_notes): Remove references to NOTE_INSN_LOOP_VTOP and NOTE_INSN_LOOP_CONT. * loop.c (scan_loops, find_and_verify_loops, for_each_insn_in_loop, check_dbra_loop, loop_dump_aux): Remove references to removed notes and fields. * reorg.c (mostly_true_jump): Do not rely on NOTE_INSN_LOOP_VTOPs. * unroll.c (unroll_loop, copy_loop_body, loop_iterations): Remove references to removed notes and fields. (subtract_reg_term, ujump_to_loop_cont): Remove. From-SVN: r86544
2004-08-25 11:52:54 +02:00
* 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.
call.c (build_vfield_ref, [...]): Replace calls to build with calls to buildN. * 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. From-SVN: r86047
2004-08-16 04:08:06 +02:00
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.
tree.h (build_int_cst): New. .: * tree.h (build_int_cst): New. (build_int_2): Remove. * tree.c (build_int_2): Remove. (build_int_cst): New. (make_vector_type, build_common_tree_nodes, build_common_tree_nodes_2): Use build_int_cst. * builtins.c (expand_builtin_prefetch, expand_builtin_strstr, expand_builtin_strpbrk, expand_builtin_fputs, build_string_literal, expand_builtin_printf, expand_builtin_sprintf, fold_builtin_lround, fold_builtin_bitop, fold_builtin_bitop, fold_builtin_isascii, fold_builtin_toascii, fold_builtin_isdigit, simplify_builtin_strstr, simplify_builtin_strpbrk, fold_builtin_fputs, simplify_builtin_sprintf): Use build_int_cst. * c-common.c (start_fname_decls, fix_string_type, c_common_nodes_and_builtins, c_init_attributes, shorten_compare): Likewise. * c-decl.c (complete_array_type, check_bitfield_type_and_width): Likewise. * c-lex.c (interpret_integer, lex_charconst): Likewise. * c-parse.in (primary): <TYPES_COMPATIBLE_P> Likewise. * c-pretty-print.c (pp_c_integer_constant): Likewise. * c-typeck.c (really_start_incremental_init, push_init_level, set_nonincremental_init_from_string): Likewise. * calls.c (load_register_parameters): Likewise. * convert.c (convert_to_pointer): Likewise. * coverage.c (coverage_counter_alloc, tree_coverage_counter_ref, build_fn_info_type, build_ctr_info_value, build_gcov_info): Likewise. * except.c (init_eh, assign_filter_values, assign_filter_values): Likewise. * expmed.c (store_fixed_bit_field, extract_bit_field, extract_fixed_bit_field, extract_split_bit_field, expand_shift, expand_mult_const, expand_mult_highpart_adjust, extract_high_half, expand_sdiv_pow2, expand_divmod, make_tree): Likewise. * expr.c (convert_move, emit_group_load, emit_group_store, expand_assignment, store_constructor, store_field, expand_expr_real_1, reduce_to_bit_field_precision): Likewise. * fold-const.c (force_fit_type, int_const_binop, fold_convert_const, invert_truthvalue, optimize_bit_field_compare, decode_field_reference, all_ones_mask_p, constant_boolean_node, fold_div_compare, fold, fold_read_from_constant_string, fold_negate_const, fold_abs_const, fold_not_const): Likewise. * function.c (assign_parm_setup_block): Likewise. * stmt.c (shift_return_value, expand_end_case_type, estimate_case_costs): Likewise. * stor-layout.c (layout_type, initialize_sizetypes, set_min_and_max_values_for_integral_type): Likewise. * tree-chrec.c (chrec_fold_multiply_poly_poly, reset_evolution_in_loop): Likewise. * tree-chrec.h (build_polynomial_chrec): Likewise. * tree-complex.c (build_replicated_const): Likewise. * tree-eh.c (honor_protect_cleanup_actions, lower_try_finally_onedest, lower_try_finally_copy, lower_try_finally_switch): Likewise. * tree-mudflap.c (mf_build_string, mx_register_decls, mudflap_register_call, mudflap_enqueue_constant): Likewise. * tree-nested.c (get_trampoline_type, get_nl_goto_field): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * tree-ssa-ccp.c (widen_bitfield, maybe_fold_offset_to_array_ref): Likewise. * tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Likewise. * tree-ssa-loop-niter.c (number_of_iterations_cond, loop_niter_by_eval, upper_bound_in_type, lower_bound_in_type): Likewise. * config/alpha/alpha.c (alpha_initialize_trampoline, alpha_va_start, alpha_gimplify_va_arg_1): Use build_int_cst. * config/arm/arm.c (arm_get_cookie_size): Likewise. * config/c4x/c4x.c (c4x_gimplify_va_arg_expr): Likewise. * config/i386/i386.c (ix86_va_start, ix86_gimplify_va_arg): Likewise. * config/i860/i860.c (i860_va_start): Likewise. * config/ia64/ia64.c (ia64_gimplify_va_arg): Likewise. * config/mips/mips.c (mips_build_builtin_va_list, mips_va_start, mips_gimplify_va_arg_expr): Likewise. * config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise. * config/rs6000/rs6000.c (rs6000_va_start, rs6000_gimplify_va_arg, add_compiler_branch_island): Likewise. * config/s390/s390.c (s390_va_start): Likewise. * config/sh/sh.c (sh_va_start): Likewise. * config/stormy16/stormy16.c (xstormy16_expand_builtin_va_start): Likewise. * config/xtensa/xtensa.c (xtensa_va_start, xtensa_gimplify_va_arg_expr): Likewise. * objc/objc-act.c (build_objc_string_object, build_objc_symtab_template, init_def_list, init_objc_symtab, init_module_descriptor, generate_static_references, build_selector_translation_table, get_proto_encoding, build_typed_selector_reference, build_selector_reference, build_next_objc_exception_stuff, build_method_prototype_list_template, generate_descriptor_table, generate_protocols, build_protocol_initializer, build_ivar_list_template, build_method_list_template, build_ivar_list_initializer, generate_ivars_list, generate_dispatch_table, generate_protocol_list, build_category_initializer, build_shared_structure_initializer, generate_shared_structures, handle_impent, generate_objc_image_info): Use build_int_cst. ada: * cuintp.c (UI_To_gnu): Use build_int_cst.. * trans.c (Exception_Handler_to_gnu_sjlj, gnat_to_gnu): Likewise. * utils.c (init_gigi_decls): Likewise. * utils2.c (build_call_raise): Likewise. cp: * 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. fortran: * trans-array.c (gfc_trans_array_constructor_value): Use build_int_cst. * trans-const.c (gfc_build_string_const, gfc_init_constants, gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise. * trans-decl.c (gfc_get_symbol_decl): Likewise. * trans-intrinsic.c (gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_len, prepare_arg_info): Likewise. * trans-io.c (add_case, set_error_locus, build_dt, transfer_expr): Likewise. * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause, gfc_trans_stop, gfc_trans_character_select): Likewise. * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise. * trans.c (gfc_trans_runtime_check): Likewise. java: * boehm.c (get_boehm_type_descriptor): Use build_int_cst. * class.c (build_utf8_ref, build_static_field_ref, make_field_value, make_method_value, get_dispatch_table, make_class_data, emit_symbol_table, emit_catch_table): Likewise. * constants.c (get_tag_node, build_ref_from_constant_pool, build_constants_constructor): Likewise. * decl.c (java_init_decl_processing): Likewise. * expr.c (build_java_array_length_access, build_newarray, expand_java_multianewarray, expand_java_pushc, expand_iinc, build_java_binop, build_field_ref, expand_java_add_case, expand_java_call, build_known_method_ref, build_invokevirtual, build_invokeinterface, build_jni_stub): Likewise. * java-gimplify.c (java_gimplify_new_array_init): Likewise. * jcf-parse.c (get_constant): Likewise. * lex.c (do_java_lex): Likewise. * parse.y (patch_binop, patch_unaryop, patch_cast, build_null_of_type, patch_newarray): Likewise. * resource.c (compile_resource_data): Likewise. * typeck.c (build_prim_array_type): Likewise. From-SVN: r86022
2004-08-15 17:45:33 +02:00
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.
tree.c (handle_dll_attribute): Move here from i383/winnt.c. * tree.c (handle_dll_attribute): Move here from i383/winnt.c. Replace use of DECL_INLINE with DECL_DECLARED_INLINE_P. Set DECL_VISIBLITY. Test TARGET_DLLIMPORT_DECL_ATTRIBUTES with #if. * tree.h (handle_dll_attribute): Declare. Test TARGET_DLLIMPORT_DECL_ATTRIBUTES with #if. * c-common.h (c_determine_visibility): Declare. * c-common.c (c_determine_visibility): New function. * c-decl.c (finish_decl): Use it. (finish_function): Likewise. * defaults.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define it to zero, by default. Use #if, not #ifdef, to test it. * config/arm/arm.c (arm_attribute_table): Use handle_dll_attribute. Test TARGET_DLLIMPORT_DECL_ATTRIBUTES with #if. * config/arm/pe.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define to 1. * config/i386/cygming.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define to 1. * config/i386/i386-protos.h (ix86_handle_dll_attribute): Remove. * config/i386/i386.c (ix86_attribute_table): Use handle_dll_attribute for dllimport/dllexport. Test TARGET_DLLIMPORT_DECL_ATTRIBUTES with #if. * config/i386/winnt.c (ix86_handle_dll_attribute): Remove. * config/mcore/mcore.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define it to 1. * config/mcore/mcore.c (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Test it with #if. * config/sh/symbian-pre.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define it to 1. * doc/extend.texi (dllexport): Clarify and correct documentation. (dllimport): Likewise. * doc/tm.texi (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Mention handle_dll_attribute. * decl.c (start_preparsed_function): Move determine_visibility call. * decl2.c (determine_visibility): Incorporate dllexport testing. * g++.dg/ext/visibility/assign1.C: Use scan-hidden and dg-require-visiblity. * g++.dg/ext/visibility/fvisibility-inlines-hidden.C: Likewise. * g++.dg/ext/visibility/fvisibility.C: Likewise. * g++.dg/ext/visibility/memfuncts.C: Likewise. * g++.dg/ext/visibility/new1.C: Likewise. * g++.dg/ext/visibility/pragma.C: Likewise. * g++.dg/ext/visibility/staticmemfuncts.C: Likewise. * g++.dg/ext/visibility/virtual.C: Likewise. * g++/dg/ext/visibility/visibility-1.C: Likewise. * g++/dg/ext/visibility/visibility-2.C: Likewise. * g++/dg/ext/visibility/visibility-3.C: Likewise. * g++/dg/ext/visibility/visibility-4.C: Likewise. * g++/dg/ext/visibility/visibility-5.C: Likewise. * g++/dg/ext/visibility/visibility-6.C: Likewise. * g++/dg/ext/visibility/visibility-7.C: Likewise. * g++/dg/ext/visibility/visibility-8.C: New test. * gcc.c-torture/compile/dll.x: Remove. * gcc.dg/dll-2.c: Use dg-require-dll * gcc.dg/visibility-10.c: New test. * lib/gcc-dg.exp (dg-require-dll): Add Symbian to list of targets supporting DLLs. * testsuite/lib/scanasm.exp (scan_hidden): New function. (scan_not_hidden): Likewise. From-SVN: r85621
2004-08-06 04:03:29 +02:00
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.
c-common.h (lang_post_pch_load): New variable. * c-common.h (lang_post_pch_load): New variable. * c-pch.c (lang_post_pch_load): Define it. (c_common_read_pch): Use it. * cgraphunit.c (record_call_1): Give the front end a chance to record additional needed entities when a variable is marked as needed. * tlink.c (recompile_files): Robustify. (scan_linker_output): If a symbol is assigned to a file, but after recompilation is not present there, issue an error message. * 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. * g++.dg/abi/inline1.C: New test. * g++.dg/abi/local1-a.cc: Likewise. * g++.dg/abi/local1.C: Likewise. * g++.dg/abi/mangle11.C: Tweak location of warnings. * g++.dg/abi/mangle12.C: Likewise. * g++.dg/abi/mangle17.C: Likewise. * g++.dg/abi/mangle20-2.C: Likewise. * g++.dg/opt/interface1.C: Likewise. * g++.dg/opt/interface1.h: Likewise. * g++.dg/opt/interface1-a.cc: New test. * g++.dg/parse/repo1.C: New test. * g++.dg/template/repo1.C: Likewise. * g++.dg/warn/Winline-1.C: Likewise. * lib/gcc-dg.exp (gcc-dg-test-1): Fix -frepo handling. From-SVN: r85309
2004-07-29 19:59:31 +02:00
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.
re PR c++/9283 (__attribute__((visibility ("hidden"))) not supported for class/struct) PR c++/9283 PR c++/15000 * c-common.c (c_common_attribute_table): Allow handle_visibility_attribute to be called for types. (handle_visibility_attribute) When given a type, set the visibility bits on the TYPE_NAME. When given a decl, don't set no_add_attrs so that we can check later whether the attribute was present. Added warning if attribute applied to non class type. * c-decl.c (diagnose_mismatched_decls): Updated rules for merging decls and checking that they are consistent. * common.opt: Added -fvisibility. * c.opt, c-opts.c: Added -fvisibility-inlines-hidden. * c-pragma.h, c-pragma.c: Added handle_pragma_visibility(). * flags.h, tree.h: Added assorted support defines for overall patch * opts.c: Added parsing support for -fvisibility. * tree.c (build_decl): Set visibility for all decls to be whatever is in force at that time. * varasm.c (default_binds_local_p_1): Reworked logic determining when to make a symbol locally bound. * doc/invoke.texi: Added documentation for -fvisibility and -fvisibility-inlines-hidden. 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. PR c++/9283 PR c++/15000 * gcc.dg/visibility-9.c, gcc.dg/visibility-a.c: New tests. * g++.dg/ext/visibility/: New directory. * g++.dg/ext/visibility-1.C, g++.dg/ext/visibility-2.C g++.dg/ext/visibility-3.C, g++.dg/ext/visibility-4.C, g++.dg/ext/visibility-5.C, g++.dg/ext/visibility-6.C, g++.dg/ext/visibility-7.C: Move to g++.dg/ext/visibility/. * g++.dg/ext/visibility/fvisibility.C, g++.dg/ext/visibility/fvisibility-inlines-hidden.C, g++.dg/ext/visibility/fvisibility-override1.C g++.dg/ext/visibility/fvisibility-override2.C g++.dg/ext/visibility/memfuncts.C g++.dg/ext/visibility/noPLT.C g++.dg/ext/visibility/pragma.C g++.dg/ext/visibility/pragma-override1.C g++.dg/ext/visibility/pragma-override2.C g++.dg/ext/visibility/staticmemfuncts.C g++.dg/ext/visibility/virtual.C: New tests. Co-Authored-By: Brian Ryner <bryner@brianryner.com> From-SVN: r85167
2004-07-26 00:52:22 +02:00
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.
tree.h: Include vec.h .: * tree.h: Include vec.h (DEF_VEC_P(tree)): New type. (BINFO_BASE_BINFOS, BINFO_N_BASE_BINFOS, BINFO_BASE_BINFO): Adjust. (BINFO_BASE_APPEND, BINFO_BASE_ITERATE): New. (BINFO_LANG_SLOT): Remove. (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF): New. (struct tree_binfo): Turn base_binfos into a trailing VEC(tree). Add vtt_subvtt, vtt_vptr, primary fields. (binfo_lang_slots): Remove. * tree.c (binfo_lang_slots): Remove. (make_tree_binfo_stat): Take a base binfo count, not a lang slot count. Adjust. * Makefile.in (TREE_H): Add vec.h * alias.c (record_component_aliases): Adjust BINFO access. * dbxout.c (dbxout_type): Likewise. * dwarf2out.c (gen_member_die): Likewise. * sdbout.c (sdbout_one_type): Likewise. * tree-dump.c (deque_and_dump): Likewise. * config/i386/i386.c (classify_argument, contains_128bit_aligned_vector_p): Likewise. * config/sh/symbian.c (symbian_export_vtable_and_rtti_p): Likewise. * doc/c-tree.texi (Classes): Update BINFO documentation. cp: * 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 java: * class.c (add_interface_do): Remove. (set_super_info, interface_of_p, maybe_add_interface, add_interface, make_class_data, layout_class, add_miranda_methods): Adjust BINFO accessors and addition. * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO accessors. * jcf-write.c (generate_classfile): Likewise. * parse.y (patch_anonymous_class, check_inner_circular_reference, check_circular_reference, java_complete_class, check_abstract_method_definitions, java_check_abstract_method_definitions, check_interface_throws_clauses, java_check_abstract_methods, lookup_java_interface_method2, find_applicable_accessible_methods_list): Adjust BINFO accessors and addition. * typeck.c (find_method_in_interfaces): Adjust BINFO accessors. From-SVN: r84949
2004-07-20 14:26:02 +02:00
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.
c-tree.h (struct c_expr): Define. * c-tree.h (struct c_expr): Define. (C_SET_EXP_ORIGINAL_CODE): Remove. (parser_build_binary_op, build_compound_expr): Update prototypes. * c-parse.in (%union): Add exprtype. (FUNC_NAME): Mark as ttype. (expr, expr_no_commas, cast_expr, unary_expr, primary): Change to exprtype. (expr): Update. Define directly in terms of expr_no_commas instead of using nonnull_exprlist. (nonnull_exprlist, unary_expr, cast_expr, expr_no_commas, primary, offsetof_member_designator, typespec_nonreserved_nonattr, init, initval, designator, component_declarator, component_notype_declarator, enumerator, array_declarator, condition, exexpr, switch_statement, stmt_nocomp, stmt, nonnull_asm_operands, ivar_declarator, receiver): Update. Don't set C_EXP_ORIGINAL_CODE. Use TREE_NO_WARNING for assignments where appropriate. * c-common.h (C_EXP_ORIGINAL_CODE): Remove. * c-common.c (c_common_truthvalue_conversion): Don't check C_EXP_ORIGINAL_CODE. * c-typeck.c (parser_build_binary_op): Use c_expr structures. Don't use C_EXP_ORIGINAL_CODE. (default_conversion, default_function_array_conversion): Don't use C_EXP_ORIGINAL_CODE. Preserve TREE_NO_WARNING. (internal_build_compound_expr): Merge into build_compound_expr. (build_compound_expr): Take two operands instead of a TREE_LIST. * objc/objc-act.c (get_super_receiver): Update calls to build_compound_expr. cp: * typeck.c (build_modify_expr, build_x_modify_expr): Set TREE_NO_WARNING on assignments with an operator other than '='. testsuite: * g++.dg/warn/Wparentheses-1.C, g++.dg/warn/Wparentheses-2.C, gcc.dg/Wparentheses-10.c: New tests. * gcc.dg/Wparentheses-5.c: Remove XFAILs. From-SVN: r84911
2004-07-19 10:38:52 +02:00
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.
cfgcleanup.c (try_simplify_condjump): Don't remove line notes to avoid unreachable code warnings. * cfgcleanup.c (try_simplify_condjump): Don't remove line notes to avoid unreachable code warnings. * toplev.c (backend_init): Don't emit line notes for unreachable code warnings. * combine.c (distribute_notes): Don't distribute a REG_VTABLE_REF note. * final.c (final_scan_insn): Don't handle it. * rtl.c (reg_note_name): Remove it. * rtl.h (enum reg_node): Dito. * emit-rtl.c (force_line_numbers, restore_line_number_status): Remove. * rtl.h (force_line_numbers, restore_line_number_status): Remove prototypes. * stmt.c (using_eh_for_cleanups_p, using_eh_for_cleanups): Move... * tree-eh.c (using_eh_for_cleanups_p): ...here. Make static. (using_eh_for_cleanups): Also moved here. * expr.c (expand_expr_real_1) <CASE_LABEL_EXPR>: Die if we see one. <SWITCH_EXPR>: Die if we have a non-NULL SWITCH_BODY. Update calls to expand_start_case and add_case_node. * stmt.c (struct nesting): Cleanup unused fields condition_code, last_unconditional_cleanup, nominal_type, printname, and line_number_status. (struct fixup_goto): Remove. (struct stmt_status): Remove x_goto_fixup_chain field. (goto_fixup_chain): Remove. (strip_default_case_nodes, group_case_nodes, emit_jump_if_reachable, pushcase, pushcase_range): Remove. (expand_start_bindings_and_block): Don't set unused fields in the nesting stack. (expand_start_case, add_case_node): Cleanup unused formal arguments. (expand_end_case_type): Don't simplify the case-list. Use emit_jump instead of emit_jump_if_reachable. (emit_case_nodes): Likewise. * tree-cfg.c (group_case_labels, cleanup_dead_labels): No longer static. (update_eh_label): Work around left-over exception handing regions. * tree-flow.h (group_case_labels, cleanup_dead_labels): Add protos. * tree-optimize.c (execute_cleanup_cfg_post_optimizing): New function. (pass_cleanup_cfg_post_optimizing): New pass. (init_tree_optimization_passes): Run the new pass after all optimizations. * tree.h (pushcase, pushcase_range): Remove prototypes. (expand_start_case, add_case_node): Update prototypes. cp/ * cp-tree.h (struct lang_type): Don't have three GTY options on a single bit GTY desc. java/ * parse.y (java_complete_expand_methods, java_expand_classes): Don't abuse restore_line_number_status. From-SVN: r84849
2004-07-17 02:31:15 +02:00
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.
vec.h (VEC_address): New function. * vec.h (VEC_address): New function. * 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. From-SVN: r84796
2004-07-16 03:15:43 +02:00
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-16 19:11:06 +02:00
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.
cp-tree.h (IDENTIFIER_VALUE): Remove. * 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. From-SVN: r84689
2004-07-14 17:34:30 +02:00
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. * 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. From-SVN: r84689
2004-07-14 17:34:30 +02:00
* 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.
cp-tree.h (lang_identifier): Remove class_value. * 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. From-SVN: r84629
2004-07-13 18:22:06 +02:00
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. * 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. From-SVN: r84629
2004-07-13 18:22:06 +02:00
* 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.
call.c (build_user_type_conversion_1, [...]): Pass type directly to lookup_fnfields & build_special_member_call. * 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. From-SVN: r84562
2004-07-12 18:06:40 +02:00
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, [...]): Pass type directly to lookup_fnfields & build_special_member_call. * 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. From-SVN: r84562
2004-07-12 18:06:40 +02:00
* 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.
langhooks.h (estimate_num_insns, [...]): Remove hooks. * langhooks.h (estimate_num_insns, pushlevel, poplevel, set_block, maybe_build_cleanup, update_decl_after_saving): Remove hooks. * langhooks.c (lhd_clear_binding_stack): Remove. * langhooks-def.h (lhd_clear_binding_stack, LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING, LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS, LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK): Remove. (LANG_HOOKS_CLEAR_BINDING_STACK): Define to lhd_do_nothing. * system.h (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS, LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_SET_BLOCK, LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING, LANG_HOOKS_POPLEVEL): Poison. * tree.h (poplevel): Don't declare. * c-lang.c (LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK): Remove. * objc/objc-lang.c (LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK): Remove. ada: * misc.c (LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK): Remove. cp: * 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. fortran: * f95-lang.c (set_block): Remove. (gfc_clear_binding_stack): New. (LANG_HOOKS_CLEAR_BINDING_STACK): Define. (struct binding_level): Remove block_created_by_back_end. (clear_binding_level): Likewise. (poplevel): Don't handle block_created_by_back_end. java: * java-tree.h (set_block): Remove. * lang.c (java_clear_binding_stack): New. (LANG_HOOKS_CLEAR_BINDING_STACK): Define. * decl.c (struct binding_level): Remove this_block. (clear_binding_level): Likewise. (poplevel): Don't handle this_block. (set_block): Remove. treelang: * treetree.c (set_block): Remove. (struct binding_level): Remove block_created_by_back_end. (clear_binding_level): Likewise. (tree_code_create_function_initial, tree_code_create_function_wrapup): Call pushlevel and poplevel directly rather than through hooks. (poplevel): Don't handle block_created_by_back_end. From-SVN: r84499
2004-07-11 11:53:06 +02:00
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.
except.c (expand_eh_region_start, [...]): Remove. * except.c (expand_eh_region_start, expand_eh_region_end, expand_eh_handler, expand_eh_region_end_cleanup, expand_start_all_catch, expand_start_catch, expand_end_catch, expand_end_all_catch, expand_eh_region_end_allowed, expand_eh_region_end_must_not_throw, expand_eh_region_end_throw, expand_eh_region_end_fixup): Remove. * stmt.c (struct nesting): Remove stack_level, innermost_stack_block, cleanups, outer_cleanups, label_chain, exception_region. (struct goto_fixup): Remove stack_level, cleanup_list_list. (struct label_chain): Remove. (struct stmt_status): Remove x_stack_block_stack. (stack_block_stack, expand_goto_internal, expand_fixup, expand_fixups, fixup_gotos, save_stack_pointer, expand_decl_cleanup, expand_decl_cleanup_eh, expand_cleanups, start_cleanup_deferral, end_cleanup_deferral, last_cleanup_this_contour, containing_blocks_have_cleanups_or_stack_level, any_pending_cleanups): Remove. (expand_null_return_1): Take no arguments. (expand_label, expand_naked_return, expand_return, expand_start_bindings_and_block, expand_end_bindings, expand_decl, expand_anon_union_decl, expand_start_case, pushcase, pushcase_range, expand_end_case_type): Don't use any of them. * calls.c (expand_call): Likewise. * dojump.c (do_jump): Likewise. * function.c (expand_function_end): Likewise. * expr.c (store_expr, expand_expr_real_1): Likewise. (safe_from_p): Don't handle WITH_CLEANUP_EXPR, CLEANUP_POINT_EXPR. (expand_expr_real_1): Don't handle WITH_CLEANUP_EXPR, CLEANUP_POINT_EXPR, TARGET_EXPR, TRY_CATCH_EXPR, CATCH_EXPR, EH_FILTER_EXPR, TRY_FINALLY_EXPR, GOTO_SUBROUTINE_EXPR. * fold-const.c (fold_checksum_tree): Use first_rtl_op. * gengtype.c (adjust_field_tree_exp): Remove rtl op handling. * gimplify.c (gimplify_cleanup_point_expr): Renumber operands for WITH_CLEANUP_EXPR. (gimple_push_cleanup): Likewise. * integrate.c (copy_decl_for_inlining): Don't DECL_TOO_LATE. * print-tree.c (print_node): Likewise. * tree-pretty-print.c (dump_generic_node): Remove GOTO_SUBROUTINE_EXPR. * tree.c (first_rtl_op): Always just TREE_CODE_LENGTH. (has_cleanups): Remove GOTO_SUBROUTINE_EXPR. * tree.def (WITH_CLEANUP_EXPR): Remove op1 and op2. (GOTO_SUBROUTINE_EXPR): Remove. * tree.h (WITH_CLEANUP_EXPR_RTL): Remove. (DECL_TOO_LATE): Remove. * except.h, tree.h: Update decls. ada/ * trans.c (gnat_to_gnu <N_Handled_Sequence_Of_Statements>): Update commentary. cp/ * cp-tree.h (expand_eh_spec_block): Remove. java/ * expr.c (case_identity, get_primitive_array_vtable, java_expand_expr, emit_init_test_initialization): Remove. * java-tree.h (java_expand_expr): Remove. * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove. From-SVN: r84275
2004-07-08 09:46:07 +02:00
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.
tree.h (TYPE_BINFO_OFFSET, [...]): Remove. * tree.h (TYPE_BINFO_OFFSET, TYPE_BINFO_VTABLE, TYPE_BINFO_VIRTUALS, TYPE_BINFO_BASETYPES, TYPE_BINFO_BASETYPE): Remove. (BINFO_BASETYPES, BINFO_N_BASETYPES, BINFO_BASETYPE): Rename to ... (BINFO_BASE_BINFOS, BINFO_N_BASE_BINFOS, BINFO_BASE_BINFO): ... here. (BINFO_BASEACCESSES, BINFO_BASEACCESS): Rename to ... (BINFO_BASE_ACCESSES, BINFO_BASE_ACCESS): ... here. (BINFO_INHERITANCE_CHAIN): Redocument as it is actually used. (struct tree_binfo): Rename base_types to base_binfos. * alias.c (record_component_aliases): Adjust BINFO macros. * dbxout.c (dbxout_type): Likewise. * dwarf2out.c (gen_member_die): Likewise. * sdbout.c (sdbout_one_type): Likewise. * tree-dump.c (deque_and_dump): Likewise. * config/i386/i386.c (classify_argument, contains_128bit_aligned_vector_p): Likewise. * cp/cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove. * cp/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. * cp/decl.c (xref_basetypes): Likewise. * cp/dump.c (cp_dump_tree): Likewise. * cp/error.c (dump_expr): Likewise. * cp/init.c (sort_mem_initializers, expand_member_init, push_base_cleanups): Likewise. * cp/method.c (do_build_copy_constructor, do_build_assign_reg, synthesize_exception_spec): Likewise. * cp/name-lookup.c (arg_assoc_class): * cp/pt.c (instantiate_class_template, tsubst, get_template_base_recursive): * cp/ptree.c (cxx_print_type): * cp/rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise. * cp/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 * cp/tree.c (copy_base_binfos, make_binfo): Likewise. * cp/typeck.c (commmon_base_type): Likewise * cp/typeck2.c (process_init_constructor): Likewise * java/java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros. (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise. * java/class.c (set_super_info, class_depth, interface_of_p, maybe_add_interface, add_interface, make_class_data, layout_class, add_miranda_methods): Adjust BINFO macros. * java/expr.c (can_widen_reference_to, lookup_field): Likewise. * java/jcf-write.c (generate_classfile): Likewise. * java/parse.y (patch_anonymous_class, check_inner_circular_reference, check_circular_reference, java_complete_class, check_abstract_method_definitions, java_check_abstract_method_definitions, check_interface_throws_clauses, java_check_abstract_methods, lookup_java_interface_method2, find_applicable_accessible_methods_list): Likewise. * java/typeck.c (find_method_in_interface): Likewise. * java/verify.c (merge_types): Likewise. From-SVN: r84198
2004-07-07 12:21:04 +02:00
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.
tree.h (TYPE_BINFO_OFFSET, [...]): Remove. * tree.h (TYPE_BINFO_OFFSET, TYPE_BINFO_VTABLE, TYPE_BINFO_VIRTUALS, TYPE_BINFO_BASETYPES, TYPE_BINFO_BASETYPE): Remove. (BINFO_BASETYPES, BINFO_N_BASETYPES, BINFO_BASETYPE): Rename to ... (BINFO_BASE_BINFOS, BINFO_N_BASE_BINFOS, BINFO_BASE_BINFO): ... here. (BINFO_BASEACCESSES, BINFO_BASEACCESS): Rename to ... (BINFO_BASE_ACCESSES, BINFO_BASE_ACCESS): ... here. (BINFO_INHERITANCE_CHAIN): Redocument as it is actually used. (struct tree_binfo): Rename base_types to base_binfos. * alias.c (record_component_aliases): Adjust BINFO macros. * dbxout.c (dbxout_type): Likewise. * dwarf2out.c (gen_member_die): Likewise. * sdbout.c (sdbout_one_type): Likewise. * tree-dump.c (deque_and_dump): Likewise. * config/i386/i386.c (classify_argument, contains_128bit_aligned_vector_p): Likewise. * cp/cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove. * cp/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. * cp/decl.c (xref_basetypes): Likewise. * cp/dump.c (cp_dump_tree): Likewise. * cp/error.c (dump_expr): Likewise. * cp/init.c (sort_mem_initializers, expand_member_init, push_base_cleanups): Likewise. * cp/method.c (do_build_copy_constructor, do_build_assign_reg, synthesize_exception_spec): Likewise. * cp/name-lookup.c (arg_assoc_class): * cp/pt.c (instantiate_class_template, tsubst, get_template_base_recursive): * cp/ptree.c (cxx_print_type): * cp/rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise. * cp/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 * cp/tree.c (copy_base_binfos, make_binfo): Likewise. * cp/typeck.c (commmon_base_type): Likewise * cp/typeck2.c (process_init_constructor): Likewise * java/java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros. (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise. * java/class.c (set_super_info, class_depth, interface_of_p, maybe_add_interface, add_interface, make_class_data, layout_class, add_miranda_methods): Adjust BINFO macros. * java/expr.c (can_widen_reference_to, lookup_field): Likewise. * java/jcf-write.c (generate_classfile): Likewise. * java/parse.y (patch_anonymous_class, check_inner_circular_reference, check_circular_reference, java_complete_class, check_abstract_method_definitions, java_check_abstract_method_definitions, check_interface_throws_clauses, java_check_abstract_methods, lookup_java_interface_method2, find_applicable_accessible_methods_list): Likewise. * java/typeck.c (find_method_in_interface): Likewise. * java/verify.c (merge_types): Likewise. From-SVN: r84198
2004-07-07 12:21:04 +02:00
* pt.c (instantiate_class_template, tsubst,
get_template_base_recursive): Likewise.
* ptree.c (cxx_print_type): Likewise.
tree.h (TYPE_BINFO_OFFSET, [...]): Remove. * tree.h (TYPE_BINFO_OFFSET, TYPE_BINFO_VTABLE, TYPE_BINFO_VIRTUALS, TYPE_BINFO_BASETYPES, TYPE_BINFO_BASETYPE): Remove. (BINFO_BASETYPES, BINFO_N_BASETYPES, BINFO_BASETYPE): Rename to ... (BINFO_BASE_BINFOS, BINFO_N_BASE_BINFOS, BINFO_BASE_BINFO): ... here. (BINFO_BASEACCESSES, BINFO_BASEACCESS): Rename to ... (BINFO_BASE_ACCESSES, BINFO_BASE_ACCESS): ... here. (BINFO_INHERITANCE_CHAIN): Redocument as it is actually used. (struct tree_binfo): Rename base_types to base_binfos. * alias.c (record_component_aliases): Adjust BINFO macros. * dbxout.c (dbxout_type): Likewise. * dwarf2out.c (gen_member_die): Likewise. * sdbout.c (sdbout_one_type): Likewise. * tree-dump.c (deque_and_dump): Likewise. * config/i386/i386.c (classify_argument, contains_128bit_aligned_vector_p): Likewise. * cp/cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove. * cp/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. * cp/decl.c (xref_basetypes): Likewise. * cp/dump.c (cp_dump_tree): Likewise. * cp/error.c (dump_expr): Likewise. * cp/init.c (sort_mem_initializers, expand_member_init, push_base_cleanups): Likewise. * cp/method.c (do_build_copy_constructor, do_build_assign_reg, synthesize_exception_spec): Likewise. * cp/name-lookup.c (arg_assoc_class): * cp/pt.c (instantiate_class_template, tsubst, get_template_base_recursive): * cp/ptree.c (cxx_print_type): * cp/rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise. * cp/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 * cp/tree.c (copy_base_binfos, make_binfo): Likewise. * cp/typeck.c (commmon_base_type): Likewise * cp/typeck2.c (process_init_constructor): Likewise * java/java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros. (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise. * java/class.c (set_super_info, class_depth, interface_of_p, maybe_add_interface, add_interface, make_class_data, layout_class, add_miranda_methods): Adjust BINFO macros. * java/expr.c (can_widen_reference_to, lookup_field): Likewise. * java/jcf-write.c (generate_classfile): Likewise. * java/parse.y (patch_anonymous_class, check_inner_circular_reference, check_circular_reference, java_complete_class, check_abstract_method_definitions, java_check_abstract_method_definitions, check_interface_throws_clauses, java_check_abstract_methods, lookup_java_interface_method2, find_applicable_accessible_methods_list): Likewise. * java/typeck.c (find_method_in_interface): Likewise. * java/verify.c (merge_types): Likewise. From-SVN: r84198
2004-07-07 12:21:04 +02:00
* 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.
tree.h (TREE_VIA_VIRTUAL): Rename to ... * tree.h (TREE_VIA_VIRTUAL): Rename to ... (BINFO_VIRTUAL_P): ... here. Require TREE_BINFO only. (BINFO_MARKED, BINFO_FLAG_[16]): New binfo flags. * dbxout.c (dbxout_type): Use BINFO_VIRTUAL_P. * dwarf2out.c (add_data_member_location_attribute): Likewise. (gen_inheritance_die): Likewise. * tree-dump.c (deque_and_dump): Likewise. * doc/c-tree.texi (Binfos): Add under reconstruction note. * cp/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. * cp/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. * cp/decl.c (xref_basetypes): Incomming virtual base indicated by TREE_TYPE. Adjust. * cp/dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P. * cp/init.c (finish_init_stmts, sort_mem_initializers, emit_mem_initializers, build_vtble_address, expand_member_init, push_base_cleanups): Likewise. * cp/method.c (do_build_copy_constructor): Likewise. * cp/pt.c (instantiate_class_template, get_template_base_recursive): Likewise. * cp/rtti.c (dfs_class_hint_mark, get_pseudo_ti_init, get_pseudo_ti_desc): Likewise. * cp/search.c (lookup_base_r, dynamic_cast_base_recurse, binfo_from_vbase, binfo_via_virtual, copied_binfo, original_binfo): Likewise. * cp/semantics.c (finish_base_specifier): Virtualness is indicated by TREE_TYPE. * cp/tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P. * java/java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1. * java/class.c (add_interface_do): Use BINFO_VIRTUAL_P. From-SVN: r84148
2004-07-06 10:51:32 +02:00
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): Incomming 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.
c-tree.h (TYPE_ACTUAL_ARG_TYPES): Use TYPE_LANG_SLOT_1. * c-tree.h (TYPE_ACTUAL_ARG_TYPES): Use TYPE_LANG_SLOT_1. * dwarf2out.c (add_data_member_location_attribute): Check for TREE_BINFO. * tree.c (tree_node_kinds): Add "binfos". (binfo_lang_slots): New. (make_node_stat): Add TREE_BINFO. (make_tree_binfo_stat): New. (tree_node_structure): Add TREE_BINFO. * tree.def (TREE_BINFO): New. * tree.h (REC_OR_UNION_CHECK): Rename to ... (RECORD_OR_UNION_CHECK): ... here. (NOT_RECORD_OR_UNION_CHECK): New. (TRE_VIA_VIRTUAL): Allow TREE_LIST or TREE_BINFO. (TYPE_FIELDS, TYPE_METHODS, TYPE_VFIELD): Adjust for RECORD_OR_UNION_CHECK. (TYPE_BINFO): Use RECORD_OR_UNION_CHECK. (TYPE_LANG_SLOT_1): New. (BINFO_TYPE, BINFO_OFFSET, BINFO_VTABLE, BINFO_VIRTUALS, BINFO_BASETYPES, TYPE_BINFO_BASETYPES, BINFO_VPTR_FIELD, BINFO_BASEACCESSES, BINFO_INHERITANCE_CHAIN): Adjust. (BINFO_ELTS): Remove. (BINFO_LANG_SLOT): New. (struct tree_binfo): New. (binfo_lang_slots): Declare. (enum tree_node_structure_enum): Add TS_BINFO. (union tree_node): Add binfo. (make_tree_binfo_stat): Declare. (make_tree_binfo): New. (enum tree_node_kind): Add binfo_kind. * cp/call.c (enforce_access): Expect TREE_BINFO. * cp/class.c (binfo_ctor_vtable): Check TREE_BINFO. * cp/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. * cp/pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case. * cp/search.c (lookup_member): Check TREE_BINFO. * cp/semantics.c (perform_or_defer_access_check): Likewise. (check_accessibility_of_qualified_id): Check deferred_access_no_check. * cp/tree.c (make_binfo): Use make_tree_binfo. * java/class.c (make_class): Use make_tree_binfo. (set_super_info, add_interface_do): Likewise. * java/java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO. * objc/objc-act.c (start_class, objc_declare_protocols, start_protocols): Use TYPE_LANG_SLOT_1. * objc/objc-act.h (CLASS_BINFO_ELTS, PROTOCOL_BINFO_ELTS): Rename to ... (CLASS_LANG_SLOT_ELTS, PROTOCOL_LANG_SLOT_ELTS): ... here. (CLASS_IVARS, CLASS_RAW_IVARS, CLASS_STATIC_TEMPLATE, CLASS_CATEGORY_LIST, CLASS_PROTOCOL_LIST, CLASS_OWN_IVARS, PROTOCOL_LIST, PROTOCOL_FORWARD_DECL): Use TYPE_LANG_SLOT_1. From-SVN: r84110
2004-07-05 11:35:44 +02:00
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.
rtl.def (ADDRESSOF): Remove. * rtl.def (ADDRESSOF): Remove. * alias.c (rtx_equal_for_memref_p): Don't handle addressof. (find_base_term, memrefs_conflict_p): Likewise. * cse.c (fixed_base_plus_p, find_best_addr: Likewise. (fold_rtx, cse_insn, set_live_p): Likewise. * dwarf2out.c (mem_loc_descriptor): Likewise. (add_location_or_const_value_attribute): Likewise. * emit-rtl.c (copy_insn_1): Likewise. * explow.c (memory_address): Likewise. * expmed.c (store_split_bit_field): Likewise. * expr.c (expand_expr_real_1): Likewise. * function.c (instantiate_decl (instantiate_virtual_regs_1, fix_lexical_addr): Likewise. * genrecog.c (preds, validate_pattern): Likewise. * integrate.c (copy_rtx_and_substitute): Likewise. * recog.c (general_operand, register_operand): Likewise. (memory_address_p): Likwise. * reload1.c (eliminate_regs, elimination_effects): Likewise. * rtl.c (copy_rtx): Likewise. * rtlanal.c (rtx_unstable_p, rtx_varies_p): Likewise. (rtx_addr_can_trap_p, nonzero_address_p, address_cost): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * stmt.c (expand_asm_operands): Likewise. * web.c (entry_register, replace_ref, web_main): Likewise. * config/alpha/alpha.c (input_operand, alpha_legitimate_address_p, alpha_expand_block_move, alpha_expand_block_clear): Likewise. * config/arm/arm.c (thumb_rtx_costs): Likewise. * config/c4x/c4x.c (c4x_valid_operands): Likewise. * config/frv/frv.c (move_destination_operand, move_source_operand, condexec_dest_operand, condexec_source_operand, condexec_memory_operand): Likewise. * config/h8300/h8300.h (PREDICATE_CODES): Likewise. * config/ia64/ia64.c (general_xfmode_operand): Likewise. (destination_xfmode_operand): Likewise. * config/mips/mips.h (PREDICATE_CODES): Likewise. * config/mn10300/mn10300.c (mn10300_address_cost_1): Likewise. * config/s390/s390.c (general_s_operand): Likewise. * config/s390/s390.md (mov*): Likewise. * config/sparc/sparc.h (PREDICATE_CODES): Likewise. * c-typeck.c (c_mark_addressable): Don't put_var_into_stack. * expr.c (expand_expr_real_1): Likewise. * stmt.c (expand_decl): Likewise. * config/c4x/c4x.c (c4x_expand_builtin): Likewise. * function.c (struct fixup_replacement, struct insns_for_mem_entry, postponed_insns, put_var_into_stack, put_reg_into_stack, schedule_fixup_var_refs, fixup_var_refs, find_fixup_replacement, fixup_var_refs_insns, fixup_var_refs_insns_with_hash, fixup_var_refs_insn, fixup_var_refs_1, fixup_memory_subreg, walk_fixup_memory_subreg, fixup_stack_1, optimize_bit_field, gen_mem_addressof, flush_addressof, put_addressof_into_stack, purge_bitfield_addressof_replacements, purge_addressof_replacements, purge_addressof_1, insns_for_mem_hash, insns_for_mem_comp, struct insns_for_mem_walk_info, insns_for_mem_walk, compute_insns_for_mem, is_addressof, purge_addressof, setjmp_protect, setjmp_protect_args): Remove. (push_function_context_to): Don't handle var_refs_queue. (pop_function_context_from, free_after_compilation): Likewise. (instantiate_virtual_regs): Don't handle parm_reg_stack_loc. (assign_parms, allocate_struct_function): Likewise. (use_register_for_decl): New. (expand_function_end): Don't setjmp_protect. * function.h (struct emit_status): Update commentary. (struct function): Remove x_max_parm_reg, x_parm_reg_stack_loc. (max_parm_reg, parm_reg_stack_loc): Remove. * passes.c (DFI_addressof): Remove. (dump_file_info): Remove addressof. (rest_of_handle_addressof): Remove. (rest_of_compilation): Don't call it. * rtl.h (ADDRESSOF_REGNO, ADDRESSOF_DECL): Remove. * stmt.c (expand_decl): Use use_register_for_decl. * tree.h: Update decls. * web.c (mark_addressof): Remove. * doc/invoke.texi (-dF): Remove. ada/ * utils2.c (gnat_mark_addressable): Don't put_var_into_stack. cp/ * typeck.c (cxx_mark_addressable): Don't put_var_into_stack. fortran/ * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack. treelang/ * treetree.c (tree_mark_addressable): Don't put_var_into_stack. From-SVN: r84072
2004-07-04 10:07:15 +02:00
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.
c-decl.c (grokdeclarator): Don't frob current_function_decl around variable_size. * c-decl.c (grokdeclarator): Don't frob current_function_decl around variable_size. (set_decl_nonlocal): Remove. (store_parm_decls): Add stmts for pending sizes. * calls.c (calls_function, calls_function_1): Remove. (precompute_arguments): Don't call it. * cfgexpand.c (set_save_expr_context): Remove. (tree_expand_cfg): Don't call it. * dwarf2out.c (add_bound_info): Don't handle SAVE_EXPR. (dwarf2out_finish): Likewise. * expr.c (emit_block_move): Adjust addresses to BLKmode. (store_constructor): Don't pre-evaluate SAVE_EXPR. (safe_from_p): Don't queue SAVE_EXPRs. (expand_expr_real_1 <case SAVE_EXPR>): Rewrite to expect, or build plain VAR_DECLs. * fold-const.c (twoval_comparison_p): Don't look at SAVE_EXPR_RTL. (fold): Likewise. (fold_checksum_tree): Don't special-case SAVE_EXPR. * function.c (free_after_compilation): Don't clear x_save_expr_regs. (put_var_into_stack): Don't handle SAVE_EXPR. (gen_mem_addressof): Likewise. * function.h (struct function): Remove x_save_expr_regs. (save_expr_regs): Remove. * gengtype.c (adjust_field_tree_exp): Don't special-case SAVE_EXPR. * print-tree.c (print_node): Don't dump SAVE_EXPR_NOPLACEHOLDER. * stor-layout.c (variable_size): Don't set it. (force_type_save_exprs, force_type_save_exprs_1): Remove. * tree-inline.c (remap_save_expr): Remove fn argument. Update all callers. Don't set SAVE_EXPR_CONTEXT. * tree-inline.h (remap_save_expr): Update decl. * tree.c (save_expr): Update build size. (first_rtl_op): Don't handle SAVE_EXPR. (unsave_expr_1, contains_placeholder_p): Likewise. (decl_function_context): Likewise. * tree.def (SAVE_EXPR): Remove args 1 and 2. * tree.h (SAVE_EXPR_CONTEXT, SAVE_EXPR_RTL): Remove. (SAVE_EXPR_NOPLACEHOLDER, SAVE_EXPR_PERSISTENT_P): Remove. cp/ * tree.c (cp_unsave_r): Update remap_save_expr call. java/ * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite. From-SVN: r84036
2004-07-03 02:15:50 +02:00
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.
2004-07-03 00:00:56 +02:00
PR c++/16297
* decl.c (grokdeclarator): Robustify.
tree.def (RTL_EXPR): Remove. * tree.def (RTL_EXPR): Remove. * c-typeck.c (lvalue_p): Don't handle it. * expr.c (safe_from_p): Likewise. (expand_expr_real_1): Likewise. * fold-const.c (non_lvalue, operand_equal_p, fold): Likewise. (fold_checksum_tree, tree_expr_nonnegative_p): Likewise. * gengtype.c (adjust_field_tree_exp): Likewise. * stmt.c (warn_if_unused_value): Likewise. * tree-gimple.c (recalculate_side_effects): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * tree.c (make_node_stat, first_rtl_op, unsave_expr_1): Likewise. (unsafe_for_reeval, stabilize_reference, build1_stat): Likewise. * tree.h (RTL_EXPR_SEQUENCE, RTL_EXPR_RTL, RTL_EXPR_ALT_RTL): Remove. * stmt.c (struct stmt_status): Remove x_last_expr_type, x_last_expr_value, x_last_expr_alt_rtl, x_expr_stmts_for_value. (last_expr_type, last_expr_value, last_expr_alt_rtl): Remove. (expand_expr_stmt): Merge with expand_expr_stmt_value. Remove all the bits that tracked last_expr. (expand_end_bindings): Don't track last_expr. (expand_start_stmt_expr, expand_end_stmt_expr): Remove. (clear_last_expr): Remove. (expand_asm): Don't call it. (expand_asm_operands, expand_end_cond): Likewise. (expand_naked_return, expand_null_return_1): Likewise. * c-typeck.c (c_begin_compound_stmt): Likewise. * cfgexpand.c (expand_block): Use expand_expr_stmt. * expr.c (expand_expr_real_1): Likewise. * tree.h: Update prototypes. * function.h (struct sequence_stack): Remove sequence_rtl_expr. (struct emit_status): Remove sequence_rtl_expr. (struct function): Remove x_rtl_expr_chain. (seq_rtl_expr, rtl_expr_chain): Remove. * function.c (struct temp_slot): Remove rtl_expr. (assign_stack_temp_for_type): Don't set it. (free_temp_slots, pop_temp_slots): Don't check it. (free_after_compilation): Don't clear x_rtl_expr_chain. (fixup_var_refs): Don't search it. (preserve_rtl_expr_result, free_temps_for_rtl_expr): Remove. * emit-rtl.c (start_sequence): Don't use sequence_rtl_expr or seq_rtl_expr. (push_topmost_sequence): Likewise. (end_sequence, init_emit): Likewise. (start_sequence_for_rtl_expr): Remove. * expmed.c (make_tree): Build a VAR_DECL instead of an RTL_EXPR. * rtl.h (preserve_rtl_expr_result): Remove. ada/ * trans.c (gnat_stabilize_reference): Don't handle RTL_EXPR. * utils.c (max_size): Likewise. cp/ * 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. From-SVN: r84009
2004-07-02 03:15:43 +02:00
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.
* decl.c (xref_basetypes): Adjust, accumulate upper bound of
vbases.
* init.c (sort_mem_initializers, expand_member_init,
push_base_cleanups): Adjust.
* method.c (do_build_copy_constructor): Adjust.
* search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
(binfo_for_vbase): New.
* tree.c (copy_base_binfos): Adjust.
2004-06-28 Mark Mitchell <mark@codesourcery.com>
* parser.c (cp_parser_set_decl_spec_type): Fix thinko.
2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
PR c++/14123
* cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
paranthesis in case of pointers to array members.
* error.c (dump_type_prefix): Likewise.
(dump_type_suffix): Maybe issue a whitespace when printing
ARRAY_TYPE.
2004-06-27 Mark Mitchell <mark@codesourcery.com>
PR c++/16193
* parser.c (cp_parser_set_decl_spec_type): Refine test for
redefinition of built-in types.
error.c (pp_template_argument_list_start): Remove. * error.c (pp_template_argument_list_start): Remove. (pp_template_argument_list_end): Likewise. (pp_separate_with_comma): Use pp_cxx_separate_with. (reinit_global_formatting_buffer): Remove. (pp_non_consecutive_character): Likewise. (dump_scope): Use pp_cxx_colon_colon. (dump_template_parameter): Use pp_cxx_identifier, pp_cxx_tree_identifier and pp_cxx_whitespace. (dump_templat_bindings): Replace use of pp_string with sequence of pp_cxx_whitespace and pp_equal. (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier, pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set padding here. (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier. (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace, pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout. (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket, pp_cxx_right_bracket, pp_cxx_identifier throughout, (dump_decl): Likewise. (dump_template_decl): Likewise. (dump_function_decl): Likewise. Set padding as appropriate. (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and pp_cxx_right_paren. (dump_exception_spec): Likewise. (dump_function_name): Use pp_cxx_tree_identifier and pp_cxx_identifier. (dump_template_parms): Use pp_cxx_begin_template_argument_list and pp_cxx_end_template_argument_list. (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren, pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and pp_cxx_whitespace throughout. (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and pp_cxx_right_paren. (dump_unary_op): Likewise. (reinit_cxx_pp): New function. (type_as_string); Use it. (expr_as_string): Likewise. (decl_as_string); Likewise. (context_as_string): Likewise. (lang_decl_name): Likewise. (decl_to_string): Likewise. (expr_to_string): Likewise. (parm_to_string): Likewise. (type_to_string): Likewise. (args_to_string): Likewise. (cv_to_string): Likewise. From-SVN: r83732
2004-06-27 17:20:41 +02:00
2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
* error.c (pp_template_argument_list_start): Remove.
(pp_template_argument_list_end): Likewise.
(pp_separate_with_comma): Use pp_cxx_separate_with.
(reinit_global_formatting_buffer): Remove.
(pp_non_consecutive_character): Likewise.
(dump_scope): Use pp_cxx_colon_colon.
(dump_template_parameter): Use pp_cxx_identifier,
pp_cxx_tree_identifier and pp_cxx_whitespace.
error.c (pp_template_argument_list_start): Remove. * error.c (pp_template_argument_list_start): Remove. (pp_template_argument_list_end): Likewise. (pp_separate_with_comma): Use pp_cxx_separate_with. (reinit_global_formatting_buffer): Remove. (pp_non_consecutive_character): Likewise. (dump_scope): Use pp_cxx_colon_colon. (dump_template_parameter): Use pp_cxx_identifier, pp_cxx_tree_identifier and pp_cxx_whitespace. (dump_templat_bindings): Replace use of pp_string with sequence of pp_cxx_whitespace and pp_equal. (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier, pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set padding here. (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier. (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace, pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout. (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket, pp_cxx_right_bracket, pp_cxx_identifier throughout, (dump_decl): Likewise. (dump_template_decl): Likewise. (dump_function_decl): Likewise. Set padding as appropriate. (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and pp_cxx_right_paren. (dump_exception_spec): Likewise. (dump_function_name): Use pp_cxx_tree_identifier and pp_cxx_identifier. (dump_template_parms): Use pp_cxx_begin_template_argument_list and pp_cxx_end_template_argument_list. (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren, pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and pp_cxx_whitespace throughout. (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and pp_cxx_right_paren. (dump_unary_op): Likewise. (reinit_cxx_pp): New function. (type_as_string); Use it. (expr_as_string): Likewise. (decl_as_string); Likewise. (context_as_string): Likewise. (lang_decl_name): Likewise. (decl_to_string): Likewise. (expr_to_string): Likewise. (parm_to_string): Likewise. (type_to_string): Likewise. (args_to_string): Likewise. (cv_to_string): Likewise. From-SVN: r83732
2004-06-27 17:20:41 +02:00
(dump_templat_bindings): Replace use of pp_string with sequence
of pp_cxx_whitespace and pp_equal.
(dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
padding here.
error.c (pp_template_argument_list_start): Remove. * error.c (pp_template_argument_list_start): Remove. (pp_template_argument_list_end): Likewise. (pp_separate_with_comma): Use pp_cxx_separate_with. (reinit_global_formatting_buffer): Remove. (pp_non_consecutive_character): Likewise. (dump_scope): Use pp_cxx_colon_colon. (dump_template_parameter): Use pp_cxx_identifier, pp_cxx_tree_identifier and pp_cxx_whitespace. (dump_templat_bindings): Replace use of pp_string with sequence of pp_cxx_whitespace and pp_equal. (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier, pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set padding here. (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier. (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace, pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout. (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket, pp_cxx_right_bracket, pp_cxx_identifier throughout, (dump_decl): Likewise. (dump_template_decl): Likewise. (dump_function_decl): Likewise. Set padding as appropriate. (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and pp_cxx_right_paren. (dump_exception_spec): Likewise. (dump_function_name): Use pp_cxx_tree_identifier and pp_cxx_identifier. (dump_template_parms): Use pp_cxx_begin_template_argument_list and pp_cxx_end_template_argument_list. (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren, pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and pp_cxx_whitespace throughout. (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and pp_cxx_right_paren. (dump_unary_op): Likewise. (reinit_cxx_pp): New function. (type_as_string); Use it. (expr_as_string): Likewise. (decl_as_string); Likewise. (context_as_string): Likewise. (lang_decl_name): Likewise. (decl_to_string): Likewise. (expr_to_string): Likewise. (parm_to_string): Likewise. (type_to_string): Likewise. (args_to_string): Likewise. (cv_to_string): Likewise. From-SVN: r83732
2004-06-27 17:20:41 +02:00
(dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
(dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
(dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
pp_cxx_right_bracket, pp_cxx_identifier throughout,
(dump_decl): Likewise.
(dump_template_decl): Likewise.
(dump_function_decl): Likewise. Set padding as appropriate.
(dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
pp_cxx_right_paren.
error.c (pp_template_argument_list_start): Remove. * error.c (pp_template_argument_list_start): Remove. (pp_template_argument_list_end): Likewise. (pp_separate_with_comma): Use pp_cxx_separate_with. (reinit_global_formatting_buffer): Remove. (pp_non_consecutive_character): Likewise. (dump_scope): Use pp_cxx_colon_colon. (dump_template_parameter): Use pp_cxx_identifier, pp_cxx_tree_identifier and pp_cxx_whitespace. (dump_templat_bindings): Replace use of pp_string with sequence of pp_cxx_whitespace and pp_equal. (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier, pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set padding here. (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier. (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace, pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout. (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket, pp_cxx_right_bracket, pp_cxx_identifier throughout, (dump_decl): Likewise. (dump_template_decl): Likewise. (dump_function_decl): Likewise. Set padding as appropriate. (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and pp_cxx_right_paren. (dump_exception_spec): Likewise. (dump_function_name): Use pp_cxx_tree_identifier and pp_cxx_identifier. (dump_template_parms): Use pp_cxx_begin_template_argument_list and pp_cxx_end_template_argument_list. (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren, pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and pp_cxx_whitespace throughout. (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and pp_cxx_right_paren. (dump_unary_op): Likewise. (reinit_cxx_pp): New function. (type_as_string); Use it. (expr_as_string): Likewise. (decl_as_string); Likewise. (context_as_string): Likewise. (lang_decl_name): Likewise. (decl_to_string): Likewise. (expr_to_string): Likewise. (parm_to_string): Likewise. (type_to_string): Likewise. (args_to_string): Likewise. (cv_to_string): Likewise. From-SVN: r83732
2004-06-27 17:20:41 +02:00
(dump_exception_spec): Likewise.
(dump_function_name): Use pp_cxx_tree_identifier and
pp_cxx_identifier.
error.c (pp_template_argument_list_start): Remove. * error.c (pp_template_argument_list_start): Remove. (pp_template_argument_list_end): Likewise. (pp_separate_with_comma): Use pp_cxx_separate_with. (reinit_global_formatting_buffer): Remove. (pp_non_consecutive_character): Likewise. (dump_scope): Use pp_cxx_colon_colon. (dump_template_parameter): Use pp_cxx_identifier, pp_cxx_tree_identifier and pp_cxx_whitespace. (dump_templat_bindings): Replace use of pp_string with sequence of pp_cxx_whitespace and pp_equal. (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier, pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set padding here. (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier. (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace, pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout. (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket, pp_cxx_right_bracket, pp_cxx_identifier throughout, (dump_decl): Likewise. (dump_template_decl): Likewise. (dump_function_decl): Likewise. Set padding as appropriate. (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and pp_cxx_right_paren. (dump_exception_spec): Likewise. (dump_function_name): Use pp_cxx_tree_identifier and pp_cxx_identifier. (dump_template_parms): Use pp_cxx_begin_template_argument_list and pp_cxx_end_template_argument_list. (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren, pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and pp_cxx_whitespace throughout. (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and pp_cxx_right_paren. (dump_unary_op): Likewise. (reinit_cxx_pp): New function. (type_as_string); Use it. (expr_as_string): Likewise. (decl_as_string); Likewise. (context_as_string): Likewise. (lang_decl_name): Likewise. (decl_to_string): Likewise. (expr_to_string): Likewise. (parm_to_string): Likewise. (type_to_string): Likewise. (args_to_string): Likewise. (cv_to_string): Likewise. From-SVN: r83732
2004-06-27 17:20:41 +02:00
(dump_template_parms): Use pp_cxx_begin_template_argument_list and
pp_cxx_end_template_argument_list.
(dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
pp_cxx_whitespace throughout.
error.c (pp_template_argument_list_start): Remove. * error.c (pp_template_argument_list_start): Remove. (pp_template_argument_list_end): Likewise. (pp_separate_with_comma): Use pp_cxx_separate_with. (reinit_global_formatting_buffer): Remove. (pp_non_consecutive_character): Likewise. (dump_scope): Use pp_cxx_colon_colon. (dump_template_parameter): Use pp_cxx_identifier, pp_cxx_tree_identifier and pp_cxx_whitespace. (dump_templat_bindings): Replace use of pp_string with sequence of pp_cxx_whitespace and pp_equal. (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier, pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set padding here. (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier. (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace, pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout. (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket, pp_cxx_right_bracket, pp_cxx_identifier throughout, (dump_decl): Likewise. (dump_template_decl): Likewise. (dump_function_decl): Likewise. Set padding as appropriate. (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and pp_cxx_right_paren. (dump_exception_spec): Likewise. (dump_function_name): Use pp_cxx_tree_identifier and pp_cxx_identifier. (dump_template_parms): Use pp_cxx_begin_template_argument_list and pp_cxx_end_template_argument_list. (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren, pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and pp_cxx_whitespace throughout. (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and pp_cxx_right_paren. (dump_unary_op): Likewise. (reinit_cxx_pp): New function. (type_as_string); Use it. (expr_as_string): Likewise. (decl_as_string); Likewise. (context_as_string): Likewise. (lang_decl_name): Likewise. (decl_to_string): Likewise. (expr_to_string): Likewise. (parm_to_string): Likewise. (type_to_string): Likewise. (args_to_string): Likewise. (cv_to_string): Likewise. From-SVN: r83732
2004-06-27 17:20:41 +02:00
(dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
pp_cxx_right_paren.
error.c (pp_template_argument_list_start): Remove. * error.c (pp_template_argument_list_start): Remove. (pp_template_argument_list_end): Likewise. (pp_separate_with_comma): Use pp_cxx_separate_with. (reinit_global_formatting_buffer): Remove. (pp_non_consecutive_character): Likewise. (dump_scope): Use pp_cxx_colon_colon. (dump_template_parameter): Use pp_cxx_identifier, pp_cxx_tree_identifier and pp_cxx_whitespace. (dump_templat_bindings): Replace use of pp_string with sequence of pp_cxx_whitespace and pp_equal. (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier, pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set padding here. (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier. (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace, pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout. (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket, pp_cxx_right_bracket, pp_cxx_identifier throughout, (dump_decl): Likewise. (dump_template_decl): Likewise. (dump_function_decl): Likewise. Set padding as appropriate. (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and pp_cxx_right_paren. (dump_exception_spec): Likewise. (dump_function_name): Use pp_cxx_tree_identifier and pp_cxx_identifier. (dump_template_parms): Use pp_cxx_begin_template_argument_list and pp_cxx_end_template_argument_list. (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren, pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and pp_cxx_whitespace throughout. (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and pp_cxx_right_paren. (dump_unary_op): Likewise. (reinit_cxx_pp): New function. (type_as_string); Use it. (expr_as_string): Likewise. (decl_as_string); Likewise. (context_as_string): Likewise. (lang_decl_name): Likewise. (decl_to_string): Likewise. (expr_to_string): Likewise. (parm_to_string): Likewise. (type_to_string): Likewise. (args_to_string): Likewise. (cv_to_string): Likewise. From-SVN: r83732
2004-06-27 17:20:41 +02:00
(dump_unary_op): Likewise.
(reinit_cxx_pp): New function.
(type_as_string); Use it.
(expr_as_string): Likewise.
(decl_as_string); Likewise.
(context_as_string): Likewise.
(lang_decl_name): Likewise.
(decl_to_string): Likewise.
(expr_to_string): Likewise.
(parm_to_string): Likewise.
(type_to_string): Likewise.
(args_to_string): Likewise.
(cv_to_string): Likewise.
2004-06-26 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (cp_cv_quals): New type.
(cp_declarator): Use it instead of "tree" as appropriate.
(grok_method_quals): Adjust prototype.
(grokclassfn): Likewise.
(do_friend): Likewise.
* decl.c (grokfndecl): Use cp_cv_quals, not tree.
(grokdeclarator): Likewise.
* decl2.c (grok_method_quals): Likewise.
(grokclassfn): Likewise.
* friend.c (do_friend): Likewise.
* method.c (implicitly_declare_fn): Adjust call to grokclassfn.
* parser.c (make_call_declarator): Use cp_cv_quals, not tree.
(make_pointer_declarator): Likewise.
(make_reference_declarator): Likewise.
(make_ptrmem_declarator): Likewise.
(cp_parser_ptr_operator): Likewise.
(cp_parser_cv_qualifier_seq_opt): Likewise.
(cp_parser_cv_qualifier_opt): Remove.
(cp_parser_new_declarator_opt): Adjust call to
cp_parser_ptr_operator.
(cp_parser_conversion_declaration_opt): Likewise.
(cp_parser_declarator): Use cp_cv_quals, not tree.
(cp_parser_direct_declarator): Likewise.
2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
Rename DECL_STMT to DECL_EXPR.
* init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
* cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
* tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
2004-06-26 Jan Hubicka <jh@suse.cz>
PR C++/14865
* decl2.c (maybe_emit_vtables): Always import_export_vtable for the
reachability analysis.
2004-06-25 Mark Mitchell <mark@codesourcery.com>
* cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
2004-06-23 change.
2004-06-25 Paul Brook <paul@codesourcery.com>
* decl2.c (get_guard): Call targetm.cxx.guard_type.
(get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
2004-06-24 Mark Mitchell <mark@codesourcery.com>
* decl.c (grokdeclarator): Restore error messages about __thread.
* parser.c (cp_parser_decl_specifier_seq): Likewise.
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-06-24 Andreas Schwab <schwab@suse.de>
* cp-tree.h (enum cp_storage_class): Remove trailing comma.
Make-lang.in (cp/lex.o): Do not depend on cp/lex.h. * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h. (cp/decl.o): Likewise. (cp/decl2.o): Likewise. (cp/pt.o): Likewise. (cp/semantics.o): Likewise. * config-lang.in (gtfiles): Do not reference cp/lex.h. * class.c: Do not include lex.h. (add_implicitly_declared_members): Do not use adding_implicit_members. (check_bases_and_members): Do not talk about grok_x_components. * cp/cp-tree.h (adding_implicit_members): Remove. (cp_storage_class): New type. (cp_decl_spec): Likewise. (cp_decl_specifier_seq): Likewise. (cp_parameter_declarator): Use it for the decl_specifiers field. (check_tag_decl): Adjust prototype. (shadow_tag): Likewise. (groktypename): Likewise. (start_decl): Likewise. (start_function): Likewise. (start_method): Likewise. (grok_x_components): Remove. (grokfield): Adjust prototype. (grokbitfield): Likewise. (finish_member_class_template): Remove. * decl.c: Do not include lex.h. (adding_implicit_members): Do not define. (check_tag_decl): Do not use trees to represent decl-specifiers. (shadow_tag): Likewise. (groktypename): Likewise. (start_decl): Likewise. (grokvardecl): Likewise. (grokdeclarator): Likewise. (grokparms): Likewise. (start_function): Likewise. (start_method): Likewise. * decl.h (grokdeclarator): Adjust prototype. * decl2.c: Do not include lex.h. (grok_x_components): Remove. (grokfield): Do not use trees to represent decl-specifiers. (grokbitfield): Likewise. * lex.c: Do not include lex.h. * lex.h: Remove. * parser.c: Include target.h. (clear_decl_specs): New function. (cp_parser_translation_unit): Do not use trees to represent decl-specifiers. (cp_parser_postfix_expression): Likewise. (cp_parser_new_type_id): Likewise. (cp_parser_condition): Likewise. (cp_parser_simple_declaration): Likewise. (cp_parser_decl_specifier_seq): Likewise. (cp_parser_function_specifier_opt): Likewise. (cp_parser_conversion_type_id): Likewise. (cp_parser_template_parameter): Likewise. (cp_parser_explicit_instantiation): Likewise. (cp_parser_type_specifier): Likewise. (cp_parser_simple_type_specifier): Likewise. (cp_parser_init_declarator): Likewise. (cp_parser_type_id): Likewise. (cp_parser_type_specifier_seq): Likewise. (cp_parser_parameter_declaration): Likewise. (cp_parser_member_declaration): Likewise. (cp_parser_exception_declaration): Likewise. (cp_parser_function_definition_from_specifiers_and_declarator): Likewise. (cp_parser_single_declaration): Likewise. (cp_parser_save_member_function_body): Likewise. (cp_parser_friend_p): Likewise. (cp_parser_set_storage_class): New function. (cp_parser_set_decl_spec_type): Likewise. * pt.c: Do not include lex.h. * semantics.c: Likewise. (finish_member_class_template): Remove. From-SVN: r83584
2004-06-24 08:48:44 +02:00
2004-06-23 Mark Mitchell <mark@codesourcery.com>
* Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
(cp/decl.o): Likewise.
(cp/decl2.o): Likewise.
(cp/pt.o): Likewise.
(cp/semantics.o): Likewise.
* config-lang.in (gtfiles): Do not reference cp/lex.h.
* class.c: Do not include lex.h.
(add_implicitly_declared_members): Do not use
adding_implicit_members.
(check_bases_and_members): Do not talk about grok_x_components.
* cp/cp-tree.h (adding_implicit_members): Remove.
(cp_storage_class): New type.
(cp_decl_spec): Likewise.
(cp_decl_specifier_seq): Likewise.
(cp_parameter_declarator): Use it for the decl_specifiers field.
(check_tag_decl): Adjust prototype.
(shadow_tag): Likewise.
(groktypename): Likewise.
(start_decl): Likewise.
(start_function): Likewise.
(start_method): Likewise.
(grok_x_components): Remove.
(grokfield): Adjust prototype.
(grokbitfield): Likewise.
(finish_member_class_template): Remove.
* decl.c: Do not include lex.h.
(adding_implicit_members): Do not define.
(check_tag_decl): Do not use trees to represent decl-specifiers.
(shadow_tag): Likewise.
(groktypename): Likewise.
(start_decl): Likewise.
(grokvardecl): Likewise.
(grokdeclarator): Likewise.
(grokparms): Likewise.
(start_function): Likewise.
(start_method): Likewise.
* decl.h (grokdeclarator): Adjust prototype.
* decl2.c: Do not include lex.h.
(grok_x_components): Remove.
(grokfield): Do not use trees to represent decl-specifiers.
(grokbitfield): Likewise.
* lex.c: Do not include lex.h.
* lex.h: Remove.
* parser.c: Include target.h.
(clear_decl_specs): New function.
(cp_parser_translation_unit): Do not use trees to represent
decl-specifiers.
(cp_parser_postfix_expression): Likewise.
(cp_parser_new_type_id): Likewise.
(cp_parser_condition): Likewise.
(cp_parser_simple_declaration): Likewise.
(cp_parser_decl_specifier_seq): Likewise.
(cp_parser_function_specifier_opt): Likewise.
(cp_parser_conversion_type_id): Likewise.
(cp_parser_template_parameter): Likewise.
(cp_parser_explicit_instantiation): Likewise.
(cp_parser_type_specifier): Likewise.
(cp_parser_simple_type_specifier): Likewise.
(cp_parser_init_declarator): Likewise.
(cp_parser_type_id): Likewise.
(cp_parser_type_specifier_seq): Likewise.
(cp_parser_parameter_declaration): Likewise.
(cp_parser_member_declaration): Likewise.
(cp_parser_exception_declaration): Likewise.
(cp_parser_function_definition_from_specifiers_and_declarator):
Likewise.
(cp_parser_single_declaration): Likewise.
(cp_parser_save_member_function_body): Likewise.
(cp_parser_friend_p): Likewise.
(cp_parser_set_storage_class): New function.
(cp_parser_set_decl_spec_type): Likewise.
* pt.c: Do not include lex.h.
* semantics.c: Likewise.
(finish_member_class_template): Remove.
2004-06-23 Roger Sayle <roger@eyesopen.com>
* call.c (build_cxx_call): Don't call expand_tree_builtin. No
longer take both "args" and "convert_args" as arguments.
(build_op_delete_call): Update call to build_cxx_call.
(build_over_call): Likewise, update call to build_cxx_call.
* cp-tree.h (build_cxx_call): Update funtion prototype.
* typeck.c (build_function_call): Don't call expand_tree_builtin.
* rtti.c (throw_bad_cast): Update call to build_cxx_call.
(throw_bad_typeid): Likewise.
(build_dynamic_cast_1): Likewise.
2004-06-22 Richard Henderson <rth@redhat.com>
* class.c (build_vfn_ref): Take a pointer not object. Build
an OBJ_TYPE_REF.
(cp_fold_obj_type_ref): New.
* call.c (build_over_call): Update build_vfn_ref call.
* cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
* cp-tree.h (cp_fold_obj_type_ref): Declare.
2004-06-21 Jason Merrill <jason@redhat.com>
2004-06-22 23:45:54 +02:00
PR c++/16112
* cp-gimplify.c (cp_gimplify_init_expr): Look through
CLEANUP_POINT_EXPR.
cp-tree.def (NEW_EXPR): Add a fourth slot. * cp-tree.def (NEW_EXPR): Add a fourth slot. * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove. (TREE_PARMLIST): Likewise. (CALL_DECLARATOR_PARMS): Likewise. (CALL_DECLARATOR_QUALS): Likewise. (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise. (cp_declarator_kind): New type. (cp_parameter_declarator): Likewise. (cp_declarator): Likewise. (cp_error_declarator): Likewise. (no_parameters): Likewise. (groktypename): Change prototype. (start_decl): Likewise. (start_handler_parms): Likewise. (get_scope_of_declarator): Likewise. (start_function): Likewise. (start_preparsed_function): New function. (start_function): Change prototype. (start_method): Likewise. (grokfield): Likewise. (grokbitfield): Likewise. (build_new): Likewise. (make_pointer_declarator): Remove. (make_reference_declarator): Likewise. (make_call_declarator): Likewise. (set_quals_and_spec): Likewise. (process_template_parm): Change prototype. (begin_function_definition): Remove. (finish_parmlist): Remove. * decl.c (groktypename): Do not use trees to represent declarators. (start_decl): Likewise. (start_handler_parms): Remove. (get_scope_of_declarator): Reimplement. (grokdeclarator): Do not use trees to represent declarators. (grokparms): Likewise. (start_function): Likewise. (start_method): Likewise. (build_void_list_mode): Do not use TREE_PARMLIST. * decl.h (grokdeclarator): Change prototype. * decl2.c (grok_method_quals): Robustify. (grok_x_components): Do not use trees to represent declarators. (grokfield): Likewise. (grokbitfield): Likewise. (start_objects): Build FUNCTION_DECLs, not declarators. (start_static_storage_duration_function): Likewise. * init.c (build_new): Simplify. * lex.c (make_pointer_declarator): Remove. (make_reference_declarator): Likewise. (make_call_declarator): Likewise. (set_quals_and_spec): Likewise. * method.c (use_thunk): Use start_preparsed_function. (synthesize_method): Likewise. (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators. * optimize.c (maybe_clone_body): Use start_preparsed_function. * parser.c (cp_error_declarator): New variable. (declarator_obstack): Likewise. (alloc_declarator): New function. (make_declarator): Likewise. (make_id_declarator): Likewise. (make_pointer_declarator): Likewise. (make_reference_declarator): Likewise. (make_ptrmem_declarator): Likewise. (make_call_declarator): Likewise. (make_array_declarator): Likewise. (no_parameters): New variable. (make_parameter_declarator): Likewise. (cp_parser_check_for_definition_in_return_type): Do not use trees to represent declarators. (cp_parser_translation_unit): Likewise. (cp_parser_new_expression): Likewise. (cp_parser_new_type_id): Likewise. (cp_parser_new_declarator_opt): Likewise. (cp_parser_direct_new_declarator): Likewise. (cp_parser_condition): Likewise. (cp_parser_declaration_statement): Likewise. (cp_parser_declaration): Likewise. (cp_parser_conversion_type_id): Likewise. (cp_parser_conversion_declarator_opt): Likewise. (cp_parser_template_parameter_list): Likewise. (cp_parser_template_parameter): Likewise. (cp_parser_explicit_instantiation): Likewise. (cp_parser_init_declarator): Likewise. (cp_parser_declarator): Likewise. (cp_parser_direct_declarator): Likewise. (cp_parser_type_id): Likewise. (cp_parser_parameter_declaration_clause): Likewise. (cp_parser_parameter_declaration_list): Likewise. (cp_parser_parameter_declaration): Likewise. (cp_parser_member_declaration): Likewise. (cp_parser_exception_declaration): Likewise. (cp_parser_check_declarator_template_parameters): Likewise. (cp_parser_function_definition_from_specifiers_and_declarator): Likewise. (cp_parser_save_member_function_body): Likewise. * pt.c (process_template_parm): Add is_non_type parameter. (convert_template_argument): Adjust call to groktypename. (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST. (tsubst): Do not expect declarators. (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional argument. (instantiate_decl): Use start_preparsed_function. * semantics.c (begin_function_definition): Remove. (finish_parmlist): Remove. * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not declarators. From-SVN: r83482
2004-06-22 09:18:38 +02:00
2004-06-21 Mark Mitchell <mark@codesourcery.com>
* cp-tree.def (NEW_EXPR): Add a fourth slot.
* cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
(TREE_PARMLIST): Likewise.
(CALL_DECLARATOR_PARMS): Likewise.
(CALL_DECLARATOR_QUALS): Likewise.
(CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
(cp_declarator_kind): New type.
(cp_parameter_declarator): Likewise.
(cp_declarator): Likewise.
(cp_error_declarator): Likewise.
(no_parameters): Likewise.
(groktypename): Change prototype.
(start_decl): Likewise.
(start_handler_parms): Likewise.
(get_scope_of_declarator): Likewise.
(start_function): Likewise.
(start_preparsed_function): New function.
(start_function): Change prototype.
(start_method): Likewise.
(grokfield): Likewise.
(grokbitfield): Likewise.
(build_new): Likewise.
(make_pointer_declarator): Remove.
(make_reference_declarator): Likewise.
(make_call_declarator): Likewise.
(set_quals_and_spec): Likewise.
(process_template_parm): Change prototype.
(begin_function_definition): Remove.
(finish_parmlist): Remove.
* decl.c (groktypename): Do not use trees to represent
declarators.
(start_decl): Likewise.
(start_handler_parms): Remove.
(get_scope_of_declarator): Reimplement.
(grokdeclarator): Do not use trees to represent declarators.
(grokparms): Likewise.
(start_function): Likewise.
(start_method): Likewise.
(build_void_list_mode): Do not use TREE_PARMLIST.
* decl.h (grokdeclarator): Change prototype.
* decl2.c (grok_method_quals): Robustify.
(grok_x_components): Do not use trees to represent declarators.
(grokfield): Likewise.
(grokbitfield): Likewise.
(start_objects): Build FUNCTION_DECLs, not declarators.
(start_static_storage_duration_function): Likewise.
* init.c (build_new): Simplify.
* lex.c (make_pointer_declarator): Remove.
(make_reference_declarator): Likewise.
(make_call_declarator): Likewise.
(set_quals_and_spec): Likewise.
* method.c (use_thunk): Use start_preparsed_function.
(synthesize_method): Likewise.
(implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
* optimize.c (maybe_clone_body): Use start_preparsed_function.
* parser.c (cp_error_declarator): New variable.
(declarator_obstack): Likewise.
(alloc_declarator): New function.
(make_declarator): Likewise.
(make_id_declarator): Likewise.
(make_pointer_declarator): Likewise.
(make_reference_declarator): Likewise.
(make_ptrmem_declarator): Likewise.
(make_call_declarator): Likewise.
(make_array_declarator): Likewise.
(no_parameters): New variable.
(make_parameter_declarator): Likewise.
(cp_parser_check_for_definition_in_return_type): Do not use trees
to represent declarators.
(cp_parser_translation_unit): Likewise.
(cp_parser_new_expression): Likewise.
(cp_parser_new_type_id): Likewise.
(cp_parser_new_declarator_opt): Likewise.
(cp_parser_direct_new_declarator): Likewise.
(cp_parser_condition): Likewise.
(cp_parser_declaration_statement): Likewise.
(cp_parser_declaration): Likewise.
(cp_parser_conversion_type_id): Likewise.
(cp_parser_conversion_declarator_opt): Likewise.
(cp_parser_template_parameter_list): Likewise.
(cp_parser_template_parameter): Likewise.
(cp_parser_explicit_instantiation): Likewise.
(cp_parser_init_declarator): Likewise.
(cp_parser_declarator): Likewise.
(cp_parser_direct_declarator): Likewise.
(cp_parser_type_id): Likewise.
(cp_parser_parameter_declaration_clause): Likewise.
(cp_parser_parameter_declaration_list): Likewise.
(cp_parser_parameter_declaration): Likewise.
(cp_parser_member_declaration): Likewise.
(cp_parser_exception_declaration): Likewise.
(cp_parser_check_declarator_template_parameters): Likewise.
(cp_parser_function_definition_from_specifiers_and_declarator):
Likewise.
(cp_parser_save_member_function_body): Likewise.
* pt.c (process_template_parm): Add is_non_type parameter.
(convert_template_argument): Adjust call to groktypename.
(tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
(tsubst): Do not expect declarators.
(tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
argument.
(instantiate_decl): Use start_preparsed_function.
* semantics.c (begin_function_definition): Remove.
(finish_parmlist): Remove.
* cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
declarators.
alias.c (adjust_offset_for_component_ref): Use component_ref_field_offset. * alias.c (adjust_offset_for_component_ref): Use component_ref_field_offset. * c-decl.c (build_array_declarator): Add news args for ARRAY_REF. * c-gimplify.c (gimplify_expr_stmt): Use alloc_stmt_list. (gimplify_decl_stmt): Call gimplify_type_sizes for type. For decl, call gimplify_one_sizepos and use statement list. (gimplify_compound_literal_expr): New arg PRE_P. Add statement to PRE_P list and return DECL. (c_gimplify_expr, case COMPOUND_LITERAL_EXPR): Add arg to gimplify_compound_literal_expr. * c-tree.h (getdecls): Deleted. * c-typeck.c (build_component_ref): Add operand for COMPONENT_REF. (build_array_ref): Add two operands for ARRAY_REF. (build_unary_op): Set TREE_INVARIANT and TREE_CONSTANT for COMPOUND_LITERAL_EXPR. * coverage.c (tree_coverage_counter_ref): Add new operands for ARRAY_REF. * emit-rtl.c (component_ref_for_mem_expr): Add new operand for COMPONENT_REF. (set_mem_attributes_minus_bitpos): Use array_ref_low_bound and array_ref_element_size. (widen_memory_access):Use component_ref_field_offset. * explow.c (update_nonlocal_goto_save_area): Add two operands for ARRAY_REF. * expr.c (array_ref_element_size, array_ref_low_bound): New functions. (component_ref_field_offset): Likewise. (get_inner_reference): Use them. (expand_expr_real_1, case ARRAY_REF): Use array_ref_low_bound. * fold-const.c (fold, case EQ_EXPR): Properly handle DECL_SIZE. (fold_read_from_constant_string): Use array_ref_low_bound. Verify that result is a character type. (build_fold_indirect_ref): Add two operands for ARRAY_REF. * function.c (expand_function_start): Likewise. * gimple-low.c (expand_var_p): Delete duplicated line. * gimplify.c: Add static decls for local functions. (cgraph.h): Now included. (create_tmp_var): Remove check for ARRAY_TYPE. (copy_if_shared_r): Look at bounds and sizes of types. (build_and_jump): Return alloc_stmt_list instead of build_empty_stmt. (gimplify_exit_expr, shortcut_cond_expr): Likewise. (gimplify_save_expr, gimple_push_cleanup): Likewise. (gimplify_init_constructor): Likewise. WANT_VALUE now bool. If empty list with no result wanted, return GS_UNHANDLED. Add additional operands for ARRAY_REF and COMPONENT_REF. (canonicalize_component_ref): Convert to &array[L]. (gimplify_array_ref_to_plus): Use array_ref_element_size and array_ref_lower_bound. (build_addr_expr_with_type, build_addr_expr): New functions. (gimplify_compound_lval): WANT_LVALUE now bool. Major rework to allow handle_component_p and initialize and gimplify new operands for ARRAY_REF, ARRAY_RANGE_REF, and COMPONENT_REF. (gimplify_array_ref): Deleted. (gimplify_self_mod_expr): WANT_VALUE now bool. (gimplify_modify_expr): Gimplify to_p and from_p later. Factor out code into gimplify_modify_expr_rhs and call twice. Move variable-size code earlier and handle PLACEHOLDER_EXPR. (gimplify_modify_expr_rhs, gimplify_variable_sized_compare): New fns. (gimplify_addr_expr, case VIEW_CONVERT_EXPR): New case. (gimplify_expr, case ARRAY_REF): Delete special case. Instead handle like COMPONENT_REF; also do ARRAY_RANGE_REF, IMAGPART, and REALPART the same way. (gimplify_expr, case VIEW_CONVERT_EXPR): New case. (gimplify_expr): Call gimplify_variable_sized_compare if applicable. Call alloc_stmt_list instead of build_empty_stmt. Deal with _REF that's volatile. (gimplify_type_sizes, gimplify_one_sizepos): New functions. (unshare_body, unvisit_body): New functions. (gimplify_body): Call them. * stmt.c (expand_stack_alloc): Don't expand TYPE_MAX_VALUE. * stor-layout.c (get_pending_sizes): Don't change SAVE_EXPR_CONTEXT. * tree-alias-common.c (get_alias_var): Also skip ARRAY_RANGE_REF. * tree-cfg.c (tree_node_can_be_shared): Treat ARRAY_RANGE_REF like ARRAY_REF. (verify_expr, case ADDR_EXPR): Use handled_component_p. * tree-dfa.c (get_virtual_var): Likewise. * tree-dump.c (dequeue_and_dump, case COMPONENT_REF, ARRAY_REF): New cases to dump new operands; likewise for ARRAY_RANGE_REF. * tree-eh.c (tree_could_trap, case ARRAY_RANGE_REF): Like ARRAY_REF. * tree-gimple.c (is_gimple_addr_expr_arg): Add ARRAY_RANGE_REF and INDIRECT_REF. (get_base_address): Use handled_component_p. * tree-gimple.h (gimplify_type_sizes, gimplify_one_sizepos): New. * tree-line.c (walk_tree): Walk more things for types and decls. * tree-mudflap.c (mf_build_check_statement_for): Add new operands for ARRAY_REF and COMPONENT_REF. (mx_xform_derefs_1): Clean up usage of decl sizes. * tree-nested.c (build_addr): Use handled_component_p. (walk_stmts, case CATCH_EXPR): Add missing "break". (get_static_chain, get_frame_field): Add new operand for COMPONENT_REF. (finalize_nesting_tree_1): Likewise. (convert_nonlocal_reference, case ARRAY_RANGE_REF): Like ARRAY_REF and process additional operands. (convert_local_reference): Likewise. * tree-outof-ssa.c (discover_nonconstant_array_refs_r): Treat ARRAY_RANGE_REF similarly to ARRAY_REF. * tree-pretty-print.c (dump_generic_node, case QUAL_UNION_TYPE): Handle like RECORD_TYPE. (dump_generic_node, case COMPONENT_REF): Print offset operand. (dump_generic_node, case ARRAY_RANGE_REF): Treat like ARRAY_REF and print lower bound and element size for both. (op_prio, case ARRAY_RANGE_REF): Like ARRAY_REF. * tree-sra.c (csc_build_component_ref): Add new operand. (scalarize_call_expr): Use get_base_address. * tree-ssa-ccp.c (widen_bitfield): Clean up size handling. (maybe_fold_offset_to_array_ref): Rework to handle input having an ARRAY_REF, refine handling of lower bound, and add new operands for ARRAY_REF. (maybe_fold_to_component_ref): Add new operand for COMPONENT_REF. (maybe_fold_stmt_indirect): Only fold *&B to B if types match. (maybe_fold_stmt_addition): Only handle constant lower bound. * tree-ssa-operands.c (get_expr_operands): Minor rearrangements. Treat ARRAY_REF and ARRAY_RANGE_REF the same; look at extra operands. Look at new offset operand of COMPONENT_REF. * tree-ssa.c (set_is_used): Use handled_component_p. * tree.c (substitute_in_expr, case COMPONENT_REF): Add new operand. (stabilize_reference, case COMPONENT_REF): Likewise. (stabilize_reference, case ARRAY_RANGE_REF, ARRAY_REF): Similarly. (recompute_tree_invariant_for_addr_expr): Completely rework to be more precise. Also set TREE_SIDE_EFFECTS. (build1_stat, case ARRAY_EXPR): Don't handle TREE_SIDE_EFFECTS here. (build2_stat, build3_stat, build4_stat): For references, propagate TREE_THIS_VOLATILE. (get_unwidened): Add new operand for COMPONENT_REF. (get_narrower): Likewise; use host_integerp for DECL_SIZE. * tree.def (COMPONENT_REF): Add new operand. (ARRAY_REF, ARRAY_RANGE_REF): Add two new operands. * tree.h (array_ref_element_size, array_ref_low_bound): New decls. (component_ref_field_offset): Likewise. * config/alpha/alpha.c (alpha_va_start): Add new op for COMPONENT_REF. (alpha_gimplify_va_arg): Likewise. * config/i386/i386.c (ix86_va_start, ix86_gimplify_va_arg): Likewise. * config/i860/i860.c (i860_va_start, i860_va_arg): Likewise. * config/iq2000/iq2000.c (iq2000_va_arg): Likewise. * config/mips/mips.c (mips_va_start, mips_va_arg): Likewise. * config/rs6000/rs6000.c (rs6000_va_start, rs6000_gimplify_va_arg): Likewise. * config/s390/s390.c (s390_va_start, s390_gimplify_va_arg): Likewise. * config/sh/sh.c (sh_va_start, sh_va_arg): Likewise. * config/stormy16/stormy16.c (xstormy1_expand_builin_va_start): Likewise. (xstormy16_expand_builtin_va_arg): Likewise. * config/xtensa/xtensa.c (xtensa_va_start, xtensa_va_arg): Likewise. * cp/call.c (build_vfield_ref): Add new operand for COMPONENT_REF. (build_new_method_call): Likewise. * cp/decl.c (local_variable_p_walkfn): Don't walk into types. * cp/decl2.c (grok_array_decl): Add new operands for ARRAY_REF. (build_anon_union_vars): Add new operand for COMPONENT_REF. * cp/init.c (buld_new): Add new operand for ARRAY_REF. * cp/method.c (do_build_copy_constructor): New op for COMPONENT_REF. (do_build_assign_ref): Likewise. * cp/parser.c (cp_parser_direct_new_declarator): Add new operands for ARRAY_REF. (cp_parser_direct_declarator): Likewise. * cp/pt.c (tsubst): Likewise. (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand for COMPONENT_REF. * cp/semantics.c (finish_non_static_data_member): Add new operand for COMPONENT_REF. * cp/typeck.c (build_class_member_access_expr): Likewise. (build_class_member_access_expr, finish_class_member_access_expr): Likewise. (build_ptrmemfunc_access_expr): Likewise. (build_array_ref): Add new operands for ARRAY_REF. * cp/typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too. * cp/tree.c (count_trees_r, no_linkage_helper): Don't walk in types. * fortran/f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted. * fortran/trans-array.c (gfc_conv_descriptor_data): Add operand for COMPONENT_REF. (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise. (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise. (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise. * fortran/trans-common.c (create_common): Likewise. * fortran/trans-expr.c (gfc_conv_component_ref): Likewise. * fortran/trans-io.c (set_parameter_value): Likewise. (set_parameter_ref, set_string, set_flag, io_result): Likewise. (transfer_expr): Likewise. * fortran/trans-decl.c (gfc_trans_auto_character_variable): Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified. (gfc_simplify_function): New function. (gfc_generate_function-code): Properly handle nested functions. * fortran/trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF. * java/class.c (build_class_ref): Add new operand for COMPONENT_REF. (build_static_field_ref): Likewise and add new operands for ARRAY_REF. * java/constants.c (build_ref_from_constant_pool): Likewise. * java/expr.c (build_java_array_length_access): Likewise. (build_get_class, build_field_ref, build_known_method_ref): Likewise. (invoke_build_dtable, build_invokevirtual): Likewise. (build_invokeinterface, java_expand_expr): Likewise. (emit_init_test_initialization): Likewise. * java/java-gimplify.c (java_gimplify_new_array_init): Likewise. * java/parse.y (make_qualifed_name, build_array_ref): Likewise. * objc/ojbc-act.c (generate_static_references): Add additional operands to ARRAY_REF. (generate_strings, build_method_prototype_list_template): Likewise. (generate_protocol_list): Likewise. From-SVN: r83474
2004-06-22 05:07:05 +02:00
2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
(build_new_method_call): Likewise.
* decl.c (local_variable_p_walkfn): Don't walk into types.
* decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
(build_anon_union_vars): Add new operand for COMPONENT_REF.
* init.c (buld_new): Add new operand for ARRAY_REF.
* method.c (do_build_copy_constructor): New op for COMPONENT_REF.
(do_build_assign_ref): Likewise.
* parser.c (cp_parser_direct_new_declarator): Add new operands
for ARRAY_REF.
(cp_parser_direct_declarator): Likewise.
* pt.c (tsubst): Likewise.
(tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
for COMPONENT_REF.
* semantics.c (finish_non_static_data_member): Add new operand
for COMPONENT_REF.
* typeck.c (build_class_member_access_expr): Likewise.
(build_class_member_access_expr, finish_class_member_access_expr):
Likewise.
(build_ptrmemfunc_access_expr): Likewise.
(build_array_ref): Add new operands for ARRAY_REF.
* typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
* tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
2004-06-21 Richard Henderson <rth@redhat.com>
* dump.c (cp_dump_tree): Don't use dump_next_stmt.
* parser.c (cp_parser_jump_statement): Update commentary.
* pt.c (tsubst_expr): Use RETURN_EXPR.
* semantics.c (finish_return_stmt): Likewise.
(finalize_nrv_r): Likewise.
* typeck.c, typeck2.c: Update file start commentary.
2004-06-21 Richard Henderson <rth@redhat.com>
* semantics.c (finish_expr_stmt): Call verify_sequence_points.
2004-06-20 Richard Henderson <rth@redhat.com>
* cp-tree.h (add_decl_stmt): Declare.
* pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
* semantics.c (maybe_cleanup_point_expr): New.
(add_decl_stmt, finish_expr_stmt, finish_return_stmt,
finish_for_expr, finish_switch_cond): Use it.
(finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
2004-06-20 Richard Henderson <rth@redhat.com>
* cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
* cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
(cp_gimplify_expr): Call it.
(gimplify_cleanup_stmt): Move from c-gimplify.c.
(cp_genericize): New.
* decl.c (finish_function): Call it.
* cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
(CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
(IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
(cp_genericize): Declare.
* cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
* dump.c (cp_dump_tree): Likewise.
* semantics.c (push_cleanup): Move from c-semantics.c.
c-common.h (has_c_linkage): New interface. * c-common.h (has_c_linkage): New interface. * c-cppbuiltin.c: Include target.h. (c_cpp_builtins): Define __PRAGMA_REDEFINE_EXTNAME and __PRAGMA_EXTERN_PREFIX when appropriate. * c-pragma.c: Include target.h. Document clarified semantics of symbol-renaming #pragmas. (handle_pragma_redefine_extname, handle_pragma_extern_prefix) (maybe_apply_renaming_pragma): Rewrite according to clarified semantics. Always recognize, but do not necessarily execute. (init_pragma): Unconditionally register symbol-renaming pragmas. * system.h: Poison HANDLE_PRAGMA_REDEFINE_EXTNAME and HANDLE_PRAGMA_EXTERN_PREFIX. * target.h (struct gcc_target): Add handle_pragma_redefine_extname and handle_pragma_extern_prefix flags. * target-def.h: Add defaults for TARGET_HANDLE_PRAGMA_REDEFINE_EXTNAME and TARGET_HANDLE_PRAGMA_EXTERN_PREFIX. * Makefile.in (c-pragma.o, c-cppbuiltin.o): Update dependencies. * config/sol2.h: Define TARGET_HANDLE_PRAGMA_REDEFINE_EXTNAME, not HANDLE_PRAGMA_REDEFINE_EXTNAME. (TARGET_OS_CPP_BUILTINS): No need to define __PRAGMA_REDEFINE_EXTNAME. (TRANSFER_FROM_TRAMPOLINE): Prototype mprotect. * config/alpha/osf.h: Define TARGET_HANDLE_PRAGMA_EXTERN_PREFIX, not HANDLE_PRAGMA_EXTERN_PREFIX. (TARGET_OS_CPP_BUILTINS): No need to define __PRAGMA_EXTERN_PREFIX. * doc/extend.texi (Solaris Pragmas, Tru64 Pragmas): Combine into one section "Symbol-Renaming Pragmas"; clarify; document adjusted semantics. * builtins.c (expand_builtin): Do not issue error for a builtin with no special case code and no DECL_ASSEMBLER_NAME; just do the library call. * c-decl.c (builtin_function): Don't call make_decl_rtl. * c-objc-common.c (has_c_linkage): Stub implementation. * cgraphunit.c (cgraph_expand_function) (cgraph_remove_unreachable_nodes): Don't clear DECL_ARGUMENTS. cp: * cp-lang.c (has_c_linkage): Implement. * cp-tree.h (set_mangled_name_for_decl): Don't prototype. * decl.c (duplicate_decls): Use COPY_DECL_RTL. (builtin_function_1): Don't call make_decl_rtl. (build_cp_library_fn): Don't call set_mangled_name_for_decl. (grokvardecl): Don't call mangle_decl. * except.c (nothrow_libfn_p): Look at DECL_NAME, not DECL_ASSEMBLER_NAME. * method.c (set_mangled_name_for_decl): Delete. * name-lookup.c (pushdecl): When a local extern shadows a file-scope declaration of the same object, give both DECLs the same DECL_UID. * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE on DECL_ASSEMBLER_NAME. testsuite: * g++.dg/expr/enum1.C, g++.dg/opt/const3.C: Declare abort with extern "C". * g++.dg/other/pragma-re-1.C: Add comments. From-SVN: r83405
2004-06-20 10:34:54 +02:00
2004-06-20 Zack Weinberg <zack@codesourcery.com>
* cp-lang.c (has_c_linkage): Implement.
* cp-tree.h (set_mangled_name_for_decl): Don't prototype.
* decl.c (duplicate_decls): Use COPY_DECL_RTL.
(builtin_function_1): Don't call make_decl_rtl.
(build_cp_library_fn): Don't call set_mangled_name_for_decl.
(grokvardecl): Don't call mangle_decl.
* except.c (nothrow_libfn_p): Look at DECL_NAME, not
DECL_ASSEMBLER_NAME.
* method.c (set_mangled_name_for_decl): Delete.
* name-lookup.c (pushdecl): When a local extern shadows a
file-scope declaration of the same object, give both DECLs the
same DECL_UID.
* typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
on DECL_ASSEMBLER_NAME.
2004-06-19 Richard Henderson <rth@redhat.com>
* cp-gimplify.c: Remove unnecessary prototypes.
(cp_gimplify_stmt): Merge into ...
(cp_gimplify_expr): ... here. Move to end of file. Handle
stmts_are_full_exprs_p frobbing.
* cp-tree.h (cp_gimplify_stmt): Remove.
* pt.c (tsubst_expr): Merge prep_stmt and unify.
* tree.c (init_tree): Don't set lang_gimplify_stmt.
2004-06-18 Richard Henderson <rth@redhat.com>
PR c++/16034
* semantics.c (begin_cond): New.
(finish_cond): Rewrite to handle template DECL_STMTs specially.
Assume that non-template decls go land before the conditional.
(simplify_loop_decl_cond): Likewise.
c-common.h (has_c_linkage): New interface. * c-common.h (has_c_linkage): New interface. * c-cppbuiltin.c: Include target.h. (c_cpp_builtins): Define __PRAGMA_REDEFINE_EXTNAME and __PRAGMA_EXTERN_PREFIX when appropriate. * c-pragma.c: Include target.h. Document clarified semantics of symbol-renaming #pragmas. (handle_pragma_redefine_extname, handle_pragma_extern_prefix) (maybe_apply_renaming_pragma): Rewrite according to clarified semantics. Always recognize, but do not necessarily execute. (init_pragma): Unconditionally register symbol-renaming pragmas. * system.h: Poison HANDLE_PRAGMA_REDEFINE_EXTNAME and HANDLE_PRAGMA_EXTERN_PREFIX. * target.h (struct gcc_target): Add handle_pragma_redefine_extname and handle_pragma_extern_prefix flags. * target-def.h: Add defaults for TARGET_HANDLE_PRAGMA_REDEFINE_EXTNAME and TARGET_HANDLE_PRAGMA_EXTERN_PREFIX. * Makefile.in (c-pragma.o, c-cppbuiltin.o): Update dependencies. * config/sol2.h: Define TARGET_HANDLE_PRAGMA_REDEFINE_EXTNAME, not HANDLE_PRAGMA_REDEFINE_EXTNAME. (TARGET_OS_CPP_BUILTINS): No need to define __PRAGMA_REDEFINE_EXTNAME. (TRANSFER_FROM_TRAMPOLINE): Prototype mprotect. * config/alpha/osf.h: Define TARGET_HANDLE_PRAGMA_EXTERN_PREFIX, not HANDLE_PRAGMA_EXTERN_PREFIX. (TARGET_OS_CPP_BUILTINS): No need to define __PRAGMA_EXTERN_PREFIX. * doc/extend.texi (Solaris Pragmas, Tru64 Pragmas): Combine into one section "Symbol-Renaming Pragmas"; clarify; document adjusted semantics. * builtins.c (expand_builtin): Do not issue error for a builtin with no special case code and no DECL_ASSEMBLER_NAME; just do the library call. * c-decl.c (builtin_function): Don't call make_decl_rtl. * c-objc-common.c (has_c_linkage): Stub implementation. * cgraphunit.c (cgraph_expand_function) (cgraph_remove_unreachable_nodes): Don't clear DECL_ARGUMENTS. cp: * cp-lang.c (has_c_linkage): Implement. * cp-tree.h (set_mangled_name_for_decl): Don't prototype. * decl.c (duplicate_decls): Use COPY_DECL_RTL. (builtin_function_1): Don't call make_decl_rtl. (build_cp_library_fn): Don't call set_mangled_name_for_decl. (grokvardecl): Don't call mangle_decl. * except.c (nothrow_libfn_p): Look at DECL_NAME, not DECL_ASSEMBLER_NAME. * method.c (set_mangled_name_for_decl): Delete. * name-lookup.c (pushdecl): When a local extern shadows a file-scope declaration of the same object, give both DECLs the same DECL_UID. * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE on DECL_ASSEMBLER_NAME. testsuite: * g++.dg/expr/enum1.C, g++.dg/opt/const3.C: Declare abort with extern "C". * g++.dg/other/pragma-re-1.C: Add comments. From-SVN: r83405
2004-06-20 10:34:54 +02:00
(begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
begin_switch_stmt, finish_switch_cond): Update to match.
2004-06-17 Jason Merrill <jason@redhat.com>
PR c++/16015
* semantics.c (simplify_aggr_init_expr): Don't return the slot.
(finish_stmt_expr_expr): Update type after conversions.
(finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
Handle void initializer.
* tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
2004-06-17 Geoffrey Keating <geoffk@apple.com>
* class.c (build_clone): Don't call defer_fn, let mark_used do it.
* cp-tree.h (defer_fn): Delete.
* decl2.c (defer_fn): Delete.
(finish_file): Simplify deferred_fns loops; check that
only used inline functions get into deferred_fns.
(mark_used): Inline previous contents of defer_fn.
2004-06-16 Richard Henderson <rth@redhat.com>
* cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
(BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
* cxx-pretty-print.c (pp_cxx_function_definition): Move handling
of CTOR_INITIALIZER ...
(pp_cxx_statement): ... here.
* decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
(finish_function): Use alloc_stmt_list to zap entire function.
* parser.c (cp_parser_compound_statement): Update commentary.
* pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
* semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
(finish_stmt_expr): Don't look through COMPOUND_STMT.
2004-06-16 Geoffrey Keating <geoffk@apple.com>
* pt.c (mark_decl_instantiated): Don't call defer_fn.
2004-06-16 Richard Henderson <rth@redhat.com>
* parser.c (cp_parser_labeled_statement): Update commentary.
* pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
* tree.c (mark_local_for_remap_r): Likewise.
2004-06-16 Richard Henderson <rth@redhat.com>
* parser.c (cp_parser_asm_definition): Update commentary.
* pt.c (tsubst_expr): Use ASM_EXPR.
* semantics.c (finish_asm_stmt): Likewise.
2004-06-16 Richard Henderson <rth@redhat.com>
* decl.c (finish_destructor_body): Use LABEL_EXPR.
* parser.c (cp_parser_statement): Update commentary.
* pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
* semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
* tree.c (mark_local_for_remap_r): Likewise.
2004-06-16 Richard Henderson <rth@redhat.com>
PR c++/16012
* semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
statement in FOR_INIT_STMT for templates.
c-common.c (lang_gimplify_stmt): Remove next_p argument. * c-common.c (lang_gimplify_stmt): Remove next_p argument. (if_elt, if_stack, if_stack_space, c_expand_start_cond, c_finish_then, c_expand_end_cond, c_expand_start_else, c_finish_else, c_begin_if_stmt, c_begin_while_stmt, c_finish_while_stmt_cond): Move to c-typeck.c. (finish_fname_decls, fname_decl): Use statement_lists. (c_expand_expr_stmt): Don't set last_expr_type. (c_type_hash): Fix indentation. (c_safe_from_p): Don't follow TREE_CHAIN. (c_tree_chain_matters_p): Remove. * c-common.def (SCOPE_STMT): Remove. (CLEANUP_STMT): Redefine to contain its own body. * c-common.h (struct stmt_tree_s): Remove x_last_stmt, x_last_expr_type, x_last_expr_filename, x_scope_stmt_stack. Add x_cur_stmt_list. (last_tree, last_expr_type, last_expr_filename, RECHAIN_STMTS): Remove. (cur_stmt_list): New. (STATEMENT_LIST_STMT_EXPR): New. (SCOPE_BEGIN_P, SCOPE_END_P, SCOPE_STMT_BLOCK, SCOPE_NULLIFIED_P, SCOPE_NO_CLEANUPS_P, SCOPE_PARTIAL_P, NEW_FOR_SCOPE_P): Remove. (CLEANUP_BODY): New. (CLEANUP_DECL): Move to operand 2. (c_common_stmt_codes): Remove SCOPE_STMT. (COMPOUND_STMT_NO_SCOPE, COMPOUND_STMT_BODY_BLOCK): Remove. * c-decl.c (c_scope_stmt_stack, current_scope_stmt_stack): Remove. (c_push_function_context, c_pop_function_context): Don't save it. (finish_decl): Set TREE_USED on the decl for a cleanup. Use push_cleanup. (store_parm_decls): Use statement lists. (finish_function): Remove compstmt rule workaround. Use statement lists. Call finish_fname_decls after finalizing the body. (c_begin_compound_stmt): Move to c-typeck.c. * c-dump.c (c_dump_tree): Remove SCOPE_STMT. * c-gimplify.c (gimplify_cleanup_stmt, gimplify_cleanup_stmts): New. (c_genericize): Invoke them. (c_gimplify_stmt): Don't look through TREE_CHAIN. Kill SCOPE_STMT. (c_build_bind_expr): Export. (gimplify_block, gimplify_cleanup): Remove. (gimplify_condition): Use gimplify_stmt. (gimplify_for_stmt): Remove FOR_INIT_STMT chaining hack. (gimplify_if_stmt): Remove recursion hack. (c_gimplify_expr): Remove STMT_EXPR handling. (stmt_expr_last_stmt, gimplify_stmt_expr): Remove. (is_last_stmt_of_scope): Remove. * c-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove. * c-mudflap.c (mflang_flush_calls): Use c_begin_compound_stmt, c_end_compound_stmt. * c-objc-common.c (build_cdtor): Likewise. * c-parse.in (primary): Use c_finish_stmt_expr. (push_scope, pop_scope): Remove. (c99_block_start, compstmt_start): Use c_begin_compound_stmt. (c99_block_end, compstmt): Use c_end_compound_stmt. (c99_block_lineno_labeled_stmt): Likewise. (compstmt_primary_start): Use c_begin_stmt_expr. (simple_if, select_or_iter_stmt): Update calls to stmt builders. (do_stmt_start): Fill in body directly. (lineno_stmt): Avoid setting lineno on constants. * c-pretty-print.c (pp_c_statement): Handle STATEMENT_LIST. Remove SCOPE_STMT. * c-semantics.c (begin_stmt_tree): Remove. (push_stmt_list, re_push_stmt_list, pop_stmt_list): New. (add_stmt): Use statement lists. (add_scope_stmt, finish_stmt_tree): Remove. (push_cleanup): New. * c-tree.h: Move some decls from c-common.h. * c-typeck.c (c_tree_expr_nonnegative_p): Simplify for statement lists. (do_case, c_finish_case): Likewise. (c_finish_then): Take body for then as argument. (c_finish_else): Similarly. (c_begin_for_stmt, c_finish_for_stmt_init, c_finish_for_stmt_cond, c_finish_for_stmt_incr, c_finish_for_stmt): New. (c_begin_stmt_expr, c_finish_stmt_expr): New. (c_begin_compound_stmt): Do scope management. (c_end_compound_stmt): New. * fold-const.c (tree_expr_nonnegative_p): Fix BIND_EXPR. * gimplify.c (voidify_wrapper_expr): Accept temporary argument. Look through exception handling constructs. (gimplify_bind_expr): Accept temporary argument. (gimplify_target_expr): Special case BIND_EXPR bodies. (gimplify_expr): Handle fallback == fb_none like a statement. * langhooks-def.h (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Kill. * langhooks.c (lhd_tree_inlining_tree_chain_matters_p): Remove. * langhooks.h (tree_chain_matters_p): Remove. * stub-objc.c (objc_clear_super_receiver): New. * tree-gimple.h (voidify_wrapper_expr): Update decl. (append_to_statement_list, append_to_statement_list_force): Move to tree-iterator.h. * tree-inline.c (expand_call_inline): Update call. (clone_body): Use statement lists. (walk_tree): Don't check tree_chain_matters_p. (copy_tree_r): Likewise. * tree-iterator.c (alloc_stmt_list): Clear lang bits. (tsi_link_before, tsi_link_after): Set TREE_SIDE_EFFECTS properly. * tree-iterator.h (append_to_statement_list, append_to_statement_list_force): Moved from tree-gimple.h. * tree-pretty-print.c (dump_generic_node): Clean up TARGET_EXPR dump. * objc/objc-act.c (build_module_descriptor): Use c_begin_compound_stmt. (objc_enter_block): Likewise. (objc_exit_block): Use c_end_compound_stmt. (objc_build_try_enter_fragment): Add #error and comment for rewriting for OBJCPLUS. (objc_build_extract_fragment, objc_build_try_epilogue, objc_build_catch_stmt, objc_build_finally_prologue, objc_build_finally_epilogue): Update for C statement builders. * objc/objc-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove. cp/ * call.c (initialize_reference): Don't build CLEANUP_STMT here. * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument. (genericize_try_block): Use gimplify_stmt. (genericize_catch_block, genericize_eh_spec_block): Likewise. (cp_gimplify_init_expr): Remove STMT_EXPR special case. (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call. * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove. (cp_tree_chain_matters_p): Remove. * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New. (COMPOUND_STMT_BODY_BLOCK): New. (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New. (EXPR_STMT_STMT_EXPR_RESULT): New. (building_stmt_tree): Check cur_stmt_list. (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove. (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New. * decl.c (poplevel): Use pop_stmt_list for minding cleanups. (cp_finish_decl): Use push_cleanup. (start_function, finish_function): Use statement lists. (finish_stmt): Do nothing. * except.c (begin_eh_spec_block): Use statement lists. (check_handlers_1, check_handlers): Likewise. * init.c (construct_virtual_base): Don't add extra compound stmts. (build_vec_init): Likewise. * name-lookup.c (maybe_push_cleanup_level): Use statement lists. * name-lookup.h (struct cp_binding_level): Add statement_list. * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool. (cp_parser_labeled_statement, cp_parser_expression_statement, cp_parser_statement_seq_opt): Likewise. (cp_parser_compound_statement): Likewise. Take bool for try block. (cp_parser_selection_statement): Tidy if processing. (cp_parser_already_scoped_statement): Rewrite to do what it says. * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr. (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST. Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT. * semantics.c (do_poplevel, do_pushlevel): Use statement lists. (finish_cond): New, rewritten from FINISH_COND. (simplify_loop_decl_cond): New. (finish_expr_stmt): Avoid nested EXPR_STMTs. (begin_if_stmt, finish_if_stmt_cond, finish_then_clause, begin_else_clause, finish_else_clause, finish_if_stmt, begin_while_stmt, finish_while_stmt_cond, finish_while_stmt, begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt, finish_for_cond, finish_for_stmt, begin_switch_stmt, finish_switch_cond, finish_switch_stmt, begin_try_block, finish_try_block, finish_cleanup_try_block, finish_function_try_block, finish_handler_sequence, finish_function_handler_sequence, begin_handler, finish_handler_parms, finish_handler, begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite using statement lists. (begin_compound_stmt): Replace has_no_scope argument with flags. Update all callers. Use statement lists. (finish_compound_stmt): Likewise. (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup. (current_scope_stmt_stack): Remove. (simplify_aggr_init_expr): Don't muck with TREE_CHAIN. * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): Rewrite with statement lists. testsuite/ * g++.dg/ext/stmtexpr1.C: XFAIL. * gcc.dg/20030612-1.c: XFAIL. From-SVN: r83221
2004-06-16 03:21:38 +02:00
2004-06-15 Richard Henderson <rth@redhat.com>
* call.c (initialize_reference): Don't build CLEANUP_STMT here.
* cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
(genericize_try_block): Use gimplify_stmt.
(genericize_catch_block, genericize_eh_spec_block): Likewise.
(cp_gimplify_init_expr): Remove STMT_EXPR special case.
(gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
* cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
(cp_tree_chain_matters_p): Remove.
* cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
(COMPOUND_STMT_BODY_BLOCK): New.
(STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
(EXPR_STMT_STMT_EXPR_RESULT): New.
(building_stmt_tree): Check cur_stmt_list.
(tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
(BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
* decl.c (poplevel): Use pop_stmt_list for minding cleanups.
(cp_finish_decl): Use push_cleanup.
(start_function, finish_function): Use statement lists.
(finish_stmt): Do nothing.
* except.c (begin_eh_spec_block): Use statement lists.
(check_handlers_1, check_handlers): Likewise.
* init.c (construct_virtual_base): Don't add extra compound stmts.
(build_vec_init): Likewise.
* name-lookup.c (maybe_push_cleanup_level): Use statement lists.
* name-lookup.h (struct cp_binding_level): Add statement_list.
* parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
(cp_parser_labeled_statement, cp_parser_expression_statement,
cp_parser_statement_seq_opt): Likewise.
(cp_parser_compound_statement): Likewise. Take bool for try block.
(cp_parser_selection_statement): Tidy if processing.
(cp_parser_already_scoped_statement): Rewrite to do what it says.
* pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
(tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
* semantics.c (do_poplevel, do_pushlevel): Use statement lists.
(finish_cond): New, rewritten from FINISH_COND.
(simplify_loop_decl_cond): New.
(finish_expr_stmt): Avoid nested EXPR_STMTs.
(begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
begin_else_clause, finish_else_clause, finish_if_stmt,
begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
finish_for_cond, finish_for_stmt, begin_switch_stmt,
finish_switch_cond, finish_switch_stmt, begin_try_block,
finish_try_block, finish_cleanup_try_block, finish_function_try_block,
finish_handler_sequence, finish_function_handler_sequence,
begin_handler, finish_handler_parms, finish_handler,
begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
using statement lists.
(begin_compound_stmt): Replace has_no_scope argument with flags.
Update all callers. Use statement lists.
(finish_compound_stmt): Likewise.
(finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
(current_scope_stmt_stack): Remove.
(simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
* typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
Rewrite with statement lists.
2004-06-15 Alexandre Oliva <aoliva@redhat.com>
* parser.c: Change all assignments of c_lex_string_translate
to true and false to 1 and 0.
(cp_lexer_read_token): Convert type of the translated string.
(cp_parser_skip_to_closing_parentheses): Preserve original
value of c_lex_string_translate, and set it to -1 while
running.
(cp_parser_cache_group): Likewise.
(cp_parser_cache_group_1): Renamed.
(cp_parser_asm_operand_list): Remove redundant setting of
c_lex_string_translate.
(cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
Handle chained strings.
2004-06-12 Andrew Pinski <apinski@apple.com>
PR c++/14639
Revert:
2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
* cp-tree.h: Fix typo.
* cp-tree.h: Include cgraph.h
c-common.h (has_c_linkage): New interface. * c-common.h (has_c_linkage): New interface. * c-cppbuiltin.c: Include target.h. (c_cpp_builtins): Define __PRAGMA_REDEFINE_EXTNAME and __PRAGMA_EXTERN_PREFIX when appropriate. * c-pragma.c: Include target.h. Document clarified semantics of symbol-renaming #pragmas. (handle_pragma_redefine_extname, handle_pragma_extern_prefix) (maybe_apply_renaming_pragma): Rewrite according to clarified semantics. Always recognize, but do not necessarily execute. (init_pragma): Unconditionally register symbol-renaming pragmas. * system.h: Poison HANDLE_PRAGMA_REDEFINE_EXTNAME and HANDLE_PRAGMA_EXTERN_PREFIX. * target.h (struct gcc_target): Add handle_pragma_redefine_extname and handle_pragma_extern_prefix flags. * target-def.h: Add defaults for TARGET_HANDLE_PRAGMA_REDEFINE_EXTNAME and TARGET_HANDLE_PRAGMA_EXTERN_PREFIX. * Makefile.in (c-pragma.o, c-cppbuiltin.o): Update dependencies. * config/sol2.h: Define TARGET_HANDLE_PRAGMA_REDEFINE_EXTNAME, not HANDLE_PRAGMA_REDEFINE_EXTNAME. (TARGET_OS_CPP_BUILTINS): No need to define __PRAGMA_REDEFINE_EXTNAME. (TRANSFER_FROM_TRAMPOLINE): Prototype mprotect. * config/alpha/osf.h: Define TARGET_HANDLE_PRAGMA_EXTERN_PREFIX, not HANDLE_PRAGMA_EXTERN_PREFIX. (TARGET_OS_CPP_BUILTINS): No need to define __PRAGMA_EXTERN_PREFIX. * doc/extend.texi (Solaris Pragmas, Tru64 Pragmas): Combine into one section "Symbol-Renaming Pragmas"; clarify; document adjusted semantics. * builtins.c (expand_builtin): Do not issue error for a builtin with no special case code and no DECL_ASSEMBLER_NAME; just do the library call. * c-decl.c (builtin_function): Don't call make_decl_rtl. * c-objc-common.c (has_c_linkage): Stub implementation. * cgraphunit.c (cgraph_expand_function) (cgraph_remove_unreachable_nodes): Don't clear DECL_ARGUMENTS. cp: * cp-lang.c (has_c_linkage): Implement. * cp-tree.h (set_mangled_name_for_decl): Don't prototype. * decl.c (duplicate_decls): Use COPY_DECL_RTL. (builtin_function_1): Don't call make_decl_rtl. (build_cp_library_fn): Don't call set_mangled_name_for_decl. (grokvardecl): Don't call mangle_decl. * except.c (nothrow_libfn_p): Look at DECL_NAME, not DECL_ASSEMBLER_NAME. * method.c (set_mangled_name_for_decl): Delete. * name-lookup.c (pushdecl): When a local extern shadows a file-scope declaration of the same object, give both DECLs the same DECL_UID. * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE on DECL_ASSEMBLER_NAME. testsuite: * g++.dg/expr/enum1.C, g++.dg/opt/const3.C: Declare abort with extern "C". * g++.dg/other/pragma-re-1.C: Add comments. From-SVN: r83405
2004-06-20 10:34:54 +02:00
(DECL_NEEDED_P): Use cgraph_*node on the decl instead of
TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
2004-06-12 Jason Merrill <jason@redhat.com>
PR tree-optimization/14107
* decl.c (finish_function): Warn about no return in all functions.
2004-06-15 Paolo Bonzini <bonzini@gnu.org>
* cp-tree.h (struct language_function): Remove cannot_inline.
* decl.c (save_function_data): cannot_inline is no more.
(cxx_push_function_context): Likewise.
* decl2.c (start_objects, start_static_storage_duration_function):
Reset DECL_INLINE, set DECL_UNINLINABLE.
2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/15967
* search.c (lookup_field): Propagate the ambiguity list.
(lookup_fnfields): Likewise.
2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/15947
* parser.c (cp_parser_template_name): Ctors/dtors never need a
template keyword to disambiguate.
2004-06-14 Mark Mitchell <mark@codesourcery.com>
PR c++/15096
* decl.c (grokdeclarator): Ignore pointer-to-members when
computing template depth.
PR c++/14930
* name-lookup.c (pushtag): Do not try to put class declarations in
explicit specialization scopes.
2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
* decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
2004-06-11 Mark Mitchell <mark@codesourcery.com>
PR c++/15862
* name-lookup.c (unqualified_namespace_lookup): Do not ignore type
bindings for undeclared built-ins.
2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
* typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
appear at the correct location.
2004-06-10 Jason Merrill <jason@redhat.com>
PR c++/15875
Revert:
2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* init.c (build_offset_ref): Build SCOPE_REF with non-null
TREE_TYPE for non-dependent names.
* 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-06-10 Mark Mitchell <mark@codesourcery.com>
PR c++/15227
* parser.c (cp_parser_direct_declarator): Robustify.
PR c++/15877
* pt.c (tsubst_copy): Use decl_constant_value on enumeration
constants in non-dependent contexts.
PR c++/14211
PR c++/15076
* typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
necessary.
2004-06-10 10:11:29 +02:00
2004-06-10 Jakub Jelinek <jakub@redhat.com>
PR c++/14791
* decl.c (duplicate_decls): Handle fileptr_type_node arguments
specially.
2004-06-09 Mark Mitchell <mark@codesourcery.com>
Revert:
PR c++/15815
2004-06-07 Mark Mitchell <mark@codesourcery.com>
* lex.c (handle_pragma_interface): Deprecate.
(handle_pragma_implementation): Likewise.
2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
* g++spec.c (lang_specific_driver): Remove check for -lm
and -lmath when check it see if it was the math library.
2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/7841
* parser.c (cp_parser_direct_declarator): Reject constructor named
as qualified template-id.
2004-06-07 Mark Mitchell <mark@codesourcery.com>
PR c++/15815
* lex.c (handle_pragma_interface): Deprecate.
(handle_pragma_implementation): Likewise.
2004-06-07 Mark Mitchell <mark@codesourcery.com>
PR c++/15766
* parser.c (cp_parser_iteration_statement): Fix typo in error
message.
PR c++/14777
* pt.c (tsubst_default_argument): Do not defer access checks
while substituting into the default argument.
PR c++/15554
* pt.c (tsubst_copy): Do not try to substitute for an enumeration
c-common.h (has_c_linkage): New interface. * c-common.h (has_c_linkage): New interface. * c-cppbuiltin.c: Include target.h. (c_cpp_builtins): Define __PRAGMA_REDEFINE_EXTNAME and __PRAGMA_EXTERN_PREFIX when appropriate. * c-pragma.c: Include target.h. Document clarified semantics of symbol-renaming #pragmas. (handle_pragma_redefine_extname, handle_pragma_extern_prefix) (maybe_apply_renaming_pragma): Rewrite according to clarified semantics. Always recognize, but do not necessarily execute. (init_pragma): Unconditionally register symbol-renaming pragmas. * system.h: Poison HANDLE_PRAGMA_REDEFINE_EXTNAME and HANDLE_PRAGMA_EXTERN_PREFIX. * target.h (struct gcc_target): Add handle_pragma_redefine_extname and handle_pragma_extern_prefix flags. * target-def.h: Add defaults for TARGET_HANDLE_PRAGMA_REDEFINE_EXTNAME and TARGET_HANDLE_PRAGMA_EXTERN_PREFIX. * Makefile.in (c-pragma.o, c-cppbuiltin.o): Update dependencies. * config/sol2.h: Define TARGET_HANDLE_PRAGMA_REDEFINE_EXTNAME, not HANDLE_PRAGMA_REDEFINE_EXTNAME. (TARGET_OS_CPP_BUILTINS): No need to define __PRAGMA_REDEFINE_EXTNAME. (TRANSFER_FROM_TRAMPOLINE): Prototype mprotect. * config/alpha/osf.h: Define TARGET_HANDLE_PRAGMA_EXTERN_PREFIX, not HANDLE_PRAGMA_EXTERN_PREFIX. (TARGET_OS_CPP_BUILTINS): No need to define __PRAGMA_EXTERN_PREFIX. * doc/extend.texi (Solaris Pragmas, Tru64 Pragmas): Combine into one section "Symbol-Renaming Pragmas"; clarify; document adjusted semantics. * builtins.c (expand_builtin): Do not issue error for a builtin with no special case code and no DECL_ASSEMBLER_NAME; just do the library call. * c-decl.c (builtin_function): Don't call make_decl_rtl. * c-objc-common.c (has_c_linkage): Stub implementation. * cgraphunit.c (cgraph_expand_function) (cgraph_remove_unreachable_nodes): Don't clear DECL_ARGUMENTS. cp: * cp-lang.c (has_c_linkage): Implement. * cp-tree.h (set_mangled_name_for_decl): Don't prototype. * decl.c (duplicate_decls): Use COPY_DECL_RTL. (builtin_function_1): Don't call make_decl_rtl. (build_cp_library_fn): Don't call set_mangled_name_for_decl. (grokvardecl): Don't call mangle_decl. * except.c (nothrow_libfn_p): Look at DECL_NAME, not DECL_ASSEMBLER_NAME. * method.c (set_mangled_name_for_decl): Delete. * name-lookup.c (pushdecl): When a local extern shadows a file-scope declaration of the same object, give both DECLs the same DECL_UID. * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE on DECL_ASSEMBLER_NAME. testsuite: * g++.dg/expr/enum1.C, g++.dg/opt/const3.C: Declare abort with extern "C". * g++.dg/other/pragma-re-1.C: Add comments. From-SVN: r83405
2004-06-20 10:34:54 +02:00
constant in a non-dependent context.
PR c++/15057
* except.c (build_throw): Ensure that temp_expr has been
initialized.
2004-06-06 Roger Sayle <roger@eyesopen.com>
* cp/cp-tree.h (lvalue_or_else): Add function prototype.
2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/15503
* parser.c (cp_parser_mem_initializer_id): Gracefully reject
'typename', and accept 'template'.
2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
Jan Hubicka <jh@suse.cz>
PR c++/14639
* method.c (use_think): Do not mark thunk as referenced.
2004-06-03 Matt Austern <austern@apple.com>
PR c++/15428
* decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
is nonzero, and if we see a noninline definition of a key method,
make the vtables nonweak.
c-common.h (has_c_linkage): New interface. * c-common.h (has_c_linkage): New interface. * c-cppbuiltin.c: Include target.h. (c_cpp_builtins): Define __PRAGMA_REDEFINE_EXTNAME and __PRAGMA_EXTERN_PREFIX when appropriate. * c-pragma.c: Include target.h. Document clarified semantics of symbol-renaming #pragmas. (handle_pragma_redefine_extname, handle_pragma_extern_prefix) (maybe_apply_renaming_pragma): Rewrite according to clarified semantics. Always recognize, but do not necessarily execute. (init_pragma): Unconditionally register symbol-renaming pragmas. * system.h: Poison HANDLE_PRAGMA_REDEFINE_EXTNAME and HANDLE_PRAGMA_EXTERN_PREFIX. * target.h (struct gcc_target): Add handle_pragma_redefine_extname and handle_pragma_extern_prefix flags. * target-def.h: Add defaults for TARGET_HANDLE_PRAGMA_REDEFINE_EXTNAME and TARGET_HANDLE_PRAGMA_EXTERN_PREFIX. * Makefile.in (c-pragma.o, c-cppbuiltin.o): Update dependencies. * config/sol2.h: Define TARGET_HANDLE_PRAGMA_REDEFINE_EXTNAME, not HANDLE_PRAGMA_REDEFINE_EXTNAME. (TARGET_OS_CPP_BUILTINS): No need to define __PRAGMA_REDEFINE_EXTNAME. (TRANSFER_FROM_TRAMPOLINE): Prototype mprotect. * config/alpha/osf.h: Define TARGET_HANDLE_PRAGMA_EXTERN_PREFIX, not HANDLE_PRAGMA_EXTERN_PREFIX. (TARGET_OS_CPP_BUILTINS): No need to define __PRAGMA_EXTERN_PREFIX. * doc/extend.texi (Solaris Pragmas, Tru64 Pragmas): Combine into one section "Symbol-Renaming Pragmas"; clarify; document adjusted semantics. * builtins.c (expand_builtin): Do not issue error for a builtin with no special case code and no DECL_ASSEMBLER_NAME; just do the library call. * c-decl.c (builtin_function): Don't call make_decl_rtl. * c-objc-common.c (has_c_linkage): Stub implementation. * cgraphunit.c (cgraph_expand_function) (cgraph_remove_unreachable_nodes): Don't clear DECL_ARGUMENTS. cp: * cp-lang.c (has_c_linkage): Implement. * cp-tree.h (set_mangled_name_for_decl): Don't prototype. * decl.c (duplicate_decls): Use COPY_DECL_RTL. (builtin_function_1): Don't call make_decl_rtl. (build_cp_library_fn): Don't call set_mangled_name_for_decl. (grokvardecl): Don't call mangle_decl. * except.c (nothrow_libfn_p): Look at DECL_NAME, not DECL_ASSEMBLER_NAME. * method.c (set_mangled_name_for_decl): Delete. * name-lookup.c (pushdecl): When a local extern shadows a file-scope declaration of the same object, give both DECLs the same DECL_UID. * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE on DECL_ASSEMBLER_NAME. testsuite: * g++.dg/expr/enum1.C, g++.dg/opt/const3.C: Declare abort with extern "C". * g++.dg/other/pragma-re-1.C: Add comments. From-SVN: r83405
2004-06-20 10:34:54 +02:00
2004-06-02 Matt Austern <austern@apple.com>
* cp-tree.h (instantiate_decl): new boolean parameter,
undefined_ok. Current behavior is equivalent to its being 0.
* decl2.c (mark_used): Add new argument when calling instantiate_decl
* pt.c (mark_decl_instantiated): Unconditionally make
instantiations explicit unconditionally
(do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
since mark_decl_instantiated now does it.
(instantiate_class_member): New. Instantiate a member of an
explicitly instantiated class template.
(do_type_instantiation): Explicitly instantiate members of an
explicitly instantiated class template.
(instantiate_decl): if undefined_ok is nonzero, and if we're
trying to explicitly instantiated a template with no definition,
change it to an implicit instantiation.
(instantiate_pending_templates): Add new argument to instantiate_decl.
* tree.c (cp_cannot_inline_tree_fn): Likewise.
c-common.h (has_c_linkage): New interface. * c-common.h (has_c_linkage): New interface. * c-cppbuiltin.c: Include target.h. (c_cpp_builtins): Define __PRAGMA_REDEFINE_EXTNAME and __PRAGMA_EXTERN_PREFIX when appropriate. * c-pragma.c: Include target.h. Document clarified semantics of symbol-renaming #pragmas. (handle_pragma_redefine_extname, handle_pragma_extern_prefix) (maybe_apply_renaming_pragma): Rewrite according to clarified semantics. Always recognize, but do not necessarily execute. (init_pragma): Unconditionally register symbol-renaming pragmas. * system.h: Poison HANDLE_PRAGMA_REDEFINE_EXTNAME and HANDLE_PRAGMA_EXTERN_PREFIX. * target.h (struct gcc_target): Add handle_pragma_redefine_extname and handle_pragma_extern_prefix flags. * target-def.h: Add defaults for TARGET_HANDLE_PRAGMA_REDEFINE_EXTNAME and TARGET_HANDLE_PRAGMA_EXTERN_PREFIX. * Makefile.in (c-pragma.o, c-cppbuiltin.o): Update dependencies. * config/sol2.h: Define TARGET_HANDLE_PRAGMA_REDEFINE_EXTNAME, not HANDLE_PRAGMA_REDEFINE_EXTNAME. (TARGET_OS_CPP_BUILTINS): No need to define __PRAGMA_REDEFINE_EXTNAME. (TRANSFER_FROM_TRAMPOLINE): Prototype mprotect. * config/alpha/osf.h: Define TARGET_HANDLE_PRAGMA_EXTERN_PREFIX, not HANDLE_PRAGMA_EXTERN_PREFIX. (TARGET_OS_CPP_BUILTINS): No need to define __PRAGMA_EXTERN_PREFIX. * doc/extend.texi (Solaris Pragmas, Tru64 Pragmas): Combine into one section "Symbol-Renaming Pragmas"; clarify; document adjusted semantics. * builtins.c (expand_builtin): Do not issue error for a builtin with no special case code and no DECL_ASSEMBLER_NAME; just do the library call. * c-decl.c (builtin_function): Don't call make_decl_rtl. * c-objc-common.c (has_c_linkage): Stub implementation. * cgraphunit.c (cgraph_expand_function) (cgraph_remove_unreachable_nodes): Don't clear DECL_ARGUMENTS. cp: * cp-lang.c (has_c_linkage): Implement. * cp-tree.h (set_mangled_name_for_decl): Don't prototype. * decl.c (duplicate_decls): Use COPY_DECL_RTL. (builtin_function_1): Don't call make_decl_rtl. (build_cp_library_fn): Don't call set_mangled_name_for_decl. (grokvardecl): Don't call mangle_decl. * except.c (nothrow_libfn_p): Look at DECL_NAME, not DECL_ASSEMBLER_NAME. * method.c (set_mangled_name_for_decl): Delete. * name-lookup.c (pushdecl): When a local extern shadows a file-scope declaration of the same object, give both DECLs the same DECL_UID. * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE on DECL_ASSEMBLER_NAME. testsuite: * g++.dg/expr/enum1.C, g++.dg/opt/const3.C: Declare abort with extern "C". * g++.dg/other/pragma-re-1.C: Add comments. From-SVN: r83405
2004-06-20 10:34:54 +02:00
2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
* cp-tree.h: Fix typo.
* cp-tree.h: Include cgraph.h
(DECL_NEEDED_P): Use cgraph_*node on the decl instead of
TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
2004-06-01 Jason Merrill <jason@redhat.com>
PR c++/15142
* call.c (call_builtin_trap): Remove type parm.
(convert_arg_to_ellipsis): Change a non-POD argument to integer type.
(build_x_va_arg): Dereference a null pointer for a non-POD argument.
2004-06-01 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.
* 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-06-01 Richard Henderson <rth@redhat.com>
Andrew Pinski <pinskia@physics.uc.edu>
* lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
* parser.c (struct cp_parser): Remove in_offsetof.
(cp_parser_new): Don't set it.
(cp_parser_unary_expression): Don't check it.
(cp_parser_postfix_open_square_expression): Split out from ...
(cp_parser_postfix_expression): ... here.
(cp_parser_postfix_dot_deref_expression): Likewise.
(cp_parser_builtin_offsetof): New.
(cp_parser_primary_expression): Use it.
2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/14932
* parser.c (cp_parser_postfix_expression): Allow subscript
operator in offsetof.
2004-05-31 Mark Mitchell <mark@codesourcery.com>
PR c++/15701
* friend.c (add_friend): Do not try to perform access checks for
functions from dependent classes.
c-pretty-print.c (pp_c_left_bracket): Make a function. * c-pretty-print.c (pp_c_left_bracket): Make a function. (pp_c_right_bracket): Likewise. (pp_c_star): Likewise. (pp_c_ampersand): Define. * c-pretty-print.h (pp_c_left_bracket): Declare. (pp_c_right_bracket): Likewise. (pp_c_star): Likewise. (pp_c_ampersand): Likewise. cp/ * cxx-pretty-print.c (pp_cxx_colon_colon): Expor. (pp_cxx_begin_template_argument_list): Turn into a function. (pp_cxx_end_template_argument_list): Likewise. (pp_cxx_separate_with): Define. (pp_cxx_unqualified_id): Tidy. (pp_cxx_primary_expression): Likewise. (pp_cxx_postfix_expression): Likewise. (pp_cxx_expression): Likewise. (pp_cxx_simple_type_specifier): Likewise. (pp_cxx_type_specifier_seq): Likewise. (pp_cxx_parameter_declaration_clause): Likewise. (pp_cxx_exception_specification): Likewise. (pp_cxx_direct_declarator): Likewise. (pp_cxx_type_id): Likewise. * cxx-pretty-print.h (pp_cxx_whitespace): Export from cxx-pretty-print.c. (pp_cxx_left_paren): Likewise. (pp_cxx_right_paren): Likewise. (pp_cxx_left_brace): Likewise. (pp_cxx_right_brace): Likewise. (pp_cxx_left_bracket): Likewise. (pp_cxx_right_bracket): Likewise. (pp_cxx_dot): Likewise. (pp_cxx_identifier): Likewise. (pp_cxx_tree_identifier): Likewise. (pp_cxx_ampersand): New macro. (pp_cxx_star): Likewise. (pp_cxx_arrow): Likewise. (pp_cxx_semicolon): Likewise. (pp_cxx_complement): Likewise. (pp_cxx_begin_template_argument_list): Declaree. (pp_cxx_end_template_argument_list): Likewise. (pp_cxx_colon_colon): likewise. From-SVN: r82488
2004-05-31 17:25:51 +02:00
2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
(pp_cxx_begin_template_argument_list): Turn into a function.
(pp_cxx_end_template_argument_list): Likewise.
(pp_cxx_separate_with): Define.
(pp_cxx_unqualified_id): Tidy.
(pp_cxx_primary_expression): Likewise.
(pp_cxx_postfix_expression): Likewise.
(pp_cxx_expression): Likewise.
(pp_cxx_simple_type_specifier): Likewise.
(pp_cxx_type_specifier_seq): Likewise.
(pp_cxx_parameter_declaration_clause): Likewise.
(pp_cxx_exception_specification): Likewise.
(pp_cxx_direct_declarator): Likewise.
(pp_cxx_type_id): Likewise.
* cxx-pretty-print.h (pp_cxx_whitespace): Export from
cxx-pretty-print.c.
(pp_cxx_left_paren): Likewise.
(pp_cxx_right_paren): Likewise.
(pp_cxx_left_brace): Likewise.
(pp_cxx_right_brace): Likewise.
(pp_cxx_left_bracket): Likewise.
(pp_cxx_right_bracket): Likewise.
(pp_cxx_dot): Likewise.
(pp_cxx_identifier): Likewise.
(pp_cxx_tree_identifier): Likewise.
(pp_cxx_ampersand): New macro.
(pp_cxx_star): Likewise.
(pp_cxx_arrow): Likewise.
(pp_cxx_semicolon): Likewise.
(pp_cxx_complement): Likewise.
(pp_cxx_begin_template_argument_list): Declaree.
(pp_cxx_end_template_argument_list): Likewise.
(pp_cxx_colon_colon): likewise.
2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
* parser.c (cp_parser_simple_type_specifier): Explicitly test
against NULL_TREE.
2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
* call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
typeck.c: Fix comment formatting.
2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
* cp-lang.c (cp_expand_decl): Remove.
(LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
2004-05-30 Andreas Jaeger <aj@suse.de>
* lang-specs.h: Add missing initializers for .ii.
2004-05-28 Aldy Hernandez <aldyh@redhat.com>
* decl.c (cp_make_fname_decl): Free return value from
fname_as_string.
2004-05-28 Mark Mitchell <mark@codesourcery.com>
PR c++/15083
* decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
even in a templat.e
* init.c (build_new): Likewise.
PR c++/15640
* name-lookup.c (arg_assoc): Robustify.
PR c++/15471
* typeck.c (unary_complex_lvalue): Use context_for_name_lookup
when determining the scope to use for a pointer to member.
(lookup_anon_field): Give it external linkage.
* cp-tree.h (lookup_anon_field): Declare it.
* expr.c (cplus_expand_constant): Use it.
2004-05-28 Mark Mitchell <mark@codesourcery.com>
PR c++/14668
* parser.c (cp_parser_simple_type_specifier): Call
maybe_note_name_used_in_class.
2004-05-28 19:02:05 +02:00
2004-05-28 Tom Marshall <tmarshall@real.com>
PR c++/15214
* class.c (finish_struct_1): Warn only if the dtor is non-private or
the class has friends.
2004-05-27 Adam Nemet <anemet@lnxw.com>
PR c++/12883
* decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
2004-05-24 Geoffrey Keating <geoffk@apple.com>
* method.c (implicitly_declare_fn): Don't call defer_fn; abort
if it might be needed.
* pt.c (mark_decl_instantiated): Only call defer_fn if
the function actually needs processing in finish_file.
* decl2.c (finish_file): Add check that elements in
deferred_fns_used are really needed there. Remove unnecessary
test of DECL_SAVED_TREE.
Makefile.def (host_modules): add libcpp. ChangeLog: 2004-05-23 Paolo Bonzini <bonzini@gnu.org> * Makefile.def (host_modules): add libcpp. * Makefile.tpl: Add dependencies on and for libcpp. * Makefile.in: Regenerate. * configure.in: Add libcpp host module. * configure: Regenerate. config/ChangeLog: 2004-05-23 Paolo Bonzini <bonzini@gnu.org> * acx.m4 (ACX_HEADER_STDBOOL, ACX_HEADER_STRING): From gcc. gcc/ChangeLog: 2004-05-23 Paolo Bonzini <bonzini@gnu.org> Move libcpp to the toplevel. * Makefile.in: Remove references to libcpp files, use CPPLIBS instead of libcpp.a. Define SYMTAB_H and change hashtable.h to that. * aclocal.m4 (gcc_AC_HEADER_STDBOOL, gcc_AC_HEADER_STRING, gcc_AC_C__BOOL): Remove. * configure.ac (gcc_AC_C__BOOL, HAVE_UCHAR): Remove tests. * configure: Regenerate. * config.in: Regenerate. * c-ppoutput.c: Include ../libcpp/internal.h instead of cpphash.h. * cppcharset.c: Removed. * cpperror.c: Removed. * cppexp.c: Removed. * cppfiles.c: Removed. * cpphash.c: Removed. * cpphash.h: Removed. * cppinit.c: Removed. * cpplex.c: Removed. * cpplib.c: Removed. * cpplib.h: Removed. * cppmacro.c: Removed. * cpppch.c: Removed. * cpptrad.c: Removed. * cppucnid.h: Removed. * cppucnid.pl: Removed. * cppucnid.tab: Removed. * hashtable.c: Removed. * hashtable.h: Removed. * line-map.c: Removed. * line-map.h: Removed. * mkdeps.c: Removed. * mkdeps.h: Removed. * stringpool.h: Include symtab.h instead of hashtable.h. * tree.h: Include symtab.h instead of hashtable.h. * system.h (O_NONBLOCK, O_NOCTTY): Do not define. gcc/cp/ChangeLog: 2004-05-23 Paolo Bonzini <bonzini@gnu.org> * Make-lang.in: No need to specify $(LIBCPP). gcc/java/ChangeLog: 2004-05-23 Paolo Bonzini <bonzini@gnu.org> * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o. libcpp/ChangeLog: 2004-05-23 Paolo Bonzini <bonzini@gnu.org> Moved libcpp from the gcc subdirectory to the toplevel. * Makefile.am: New file. * Makefile.in: Regenerate. * configure.ac: New file. * configure: Regenerate. * config.in: Regenerate. * charset.c: Moved from gcc/cppcharset.c. Add note about brokenness of input charset detection. Adjust for change in name of cppucnid.h. * errors.c: Moved from gcc/cpperror.c. Do not include intl.h. * expr.c: Moved from gcc/cppexp.c. * files.c: Moved from gcc/cppfiles.c. Do not include intl.h. Remove #define of O_BINARY, it is in system.h. * identifiers.c: Moved from gcc/cpphash.c. * internal.h: Moved from gcc/cpphash.h. Change header guard name. All other files adjusted to match name change. * init.c: Moved from gcc/cppinit.c. (init_library) [ENABLE_NLS]: Call bindtextdomain. * lex.c: Moved from gcc/cpplex.c. * directives.c: Moved from gcc/cpplib.c. * macro.c: Moved from gcc/cppmacro.c. * pch.c: Moved from gcc/cpppch.c. Do not include intl.h. * traditional.c: Moved from gcc/cpptrad.c. * ucnid.h: Moved from gcc/cppucnid.h. Change header guard name. * ucnid.pl: Moved from gcc/cppucnid.pl. * ucnid.tab: Moved from gcc/cppucnid.tab. Change header guard name. * symtab.c: Moved from gcc/hashtable.c. * line-map.c: Moved from gcc. Do not include intl.h. * mkdeps.c: Moved from gcc. * system.h: New file. libcpp/include/ChangeLog: 2004-05-23 Paolo Bonzini <bonzini@gnu.org> * cpplib.h: Moved from gcc. Change header guard name. * line-map.h: Moved from gcc. Change header guard name. * mkdeps.h: Moved from gcc. Change header guard name. * symtab.h: Moved from gcc/hashtable.h. Change header guard name. libcpp/po/ChangeLog: 2004-05-23 Paolo Bonzini <bonzini@gnu.org> * be.po: Extracted from gcc/po/be.po. * ca.po: Extracted from gcc/po/ca.po. * da.po: Extracted from gcc/po/da.po. * de.po: Extracted from gcc/po/de.po. * el.po: Extracted from gcc/po/el.po. * es.po: Extracted from gcc/po/es.po. * fr.po: Extracted from gcc/po/fr.po. * ja.po: Extracted from gcc/po/ja.po. * nl.po: Extracted from gcc/po/nl.po. * sv.po: Extracted from gcc/po/sv.po. * tr.po: Extracted from gcc/po/tr.po. From-SVN: r82199
2004-05-24 12:50:45 +02:00
2004-05-23 Paolo Bonzini <bonzini@gnu.org>
* Make-lang.in: No need to specify $(LIBCPP).
2004-05-23 Mark Mitchell <mark@codesourcery.com>
PR c++/15044
* parser.c (cp_parser_class_head): Robustify.
PR c++/15317
* parser.c (cp_parser_decl_specifier_seq): Correct error in
comment.
(cp_parser_constructor_declarator_p): Treat attributes
as decl-specifiers.
PR c++/15329
* typeck.c (build_unary_op): Do not attempt to resolve casts to
base classes in templates.
2004-05-23 Mark Mitchell <mark@codesourcery.com>
PR c++/15165
* pt.c (instantiate_template): Robustify.
2004-05-23 Mark Mitchell <mark@codesourcery.com>
PR c++/15025
* decl.c (xref_tag): Issue errors about redeclaring template
classes as non-template classes.
2004-05-23 Mark Mitchell <mark@codesourcery.com>
PR c++/14821
* name-lookup.c (supplement_binding): Allow redefinitions of
namespace aliases.
PR c++/14883
* parser.c (cp_parser_template_argument): Robustify.
2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
* class.c (alter_access): Use %E format specifier to print an
identifier node. Avoid looking at the IDENTIFIER_POINTER.
(push_lang_context): Likewise.
* decl.c (lookup_label): Likewise.
(grokdeclarator): Likewise.
* parser.c (cp_parser_check_for_invalid_template_id): Likewise.
* pt.c (do_type_instantiation): Likewise.
* tree.c (handle_java_interface_attribute): Likewise.
(handle_com_interface_attribute): Likewise.
(handle_init_priority_attribute): Likewise.
2004-05-22 Mark Mitchell <mark@codesourcery.com>
PR c++/15285
PR c++/15299
* pt.c (build_non_dependent_expr): Expand the set of tree nodes
recognized as overloaded functions.
2004-05-22 Mark Mitchell <mark@codesourcery.com>
PR c++/15507
* class.c (layout_nonempty_base_or_field): Do not try to avoid
layout conflicts for unions.
PR c++/15542
* typeck.c (build_x_unary_op): Instantiate template class
specializations before looking for "operator &".
PR c++/15427
* typeck.c (complete_type): Layout non-dependent array types, even
in templates.
PR c++/15287
* typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
template.
2004-05-22 Roger Sayle <roger@eyesopen.com>
* name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
returning when TREE_TYPE is error_mark_node.
* typeck.c (require_complete_type): Return error_mark_node if
value's type is an error_mark_node.
2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
* optimize.c (calls_setjmp_r): Remove.
(calls_setjmp_p): Remove.
* cp-tree.c (calls_setjmp_p): Remove.
* decl.c (finish_function): Do not call calls_setjmp_p.
2004-05-18 Zack Weinberg <zack@codesourcery.com>
* decl.c (cp_finish_decl): Use mark_decl_referenced.
* decl2.c (maybe_make_one_only): Likewise.
* method.c (use_thunk): Likewise.
2004-05-18 Jason Merrill <jason@redhat.com>
* class.c (build_base_path): Tidy a bit.
2004-05-14 Geoffrey Keating <geoffk@apple.com>
* name-lookup.c (struct scope_binding): New.
(EMPTY_SCOPE_BINDING): New.
(lookup_using_namespace): Take a scope_binding instead of a
cxx_binding.
(qualified_lookup_using_namespace): Likewise.
(cxx_binding_clear): Delete.
(do_nonmember_using_decl): Use a scope_binding instead of a
cxx_binding.
(lookup_tag): Don't call select_decl.
(ambiguous_decl): Don't return anything (and change callers to match).
Take a scope_binding as the second parameter.
(lookup_namespace_name): Use a scope_binding instead of a
cxx_binding.
(unqualified_namespace_lookup): Likewise.
(lookup_qualified_name): Likewise.
(select_decl): Take a scope_binding instead of a cxx_binding.
Use macros rather than hand-coding tests for type-ness.
2004-05-13 Diego Novillo <dnovillo@redhat.com>
* cp-gimplify.c: Rename from cp-simplify.c.
* Make-lang.in, optimize.c: Update.
2004-05-13 Diego Novillo <dnovillo@redhat.com>
Merge from tree-ssa-20020619-branch. See
ChangeLog.tree-ssa for details.
* Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
expr.c, init.c, name-lookup.h, optimize.c, parser.c,
pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
Merged.
* cp-mudflap.c: New file.
* cp-simplify.c:: New file.
2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/14389
* decl2.c (check_classfn): For member templates, compare also the
template parameters to match the declaration.
* cp-tree.h: Adjust declaration of check_classfn.
* decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
* friend.c (do_friend): Likewise.
* pt.c (tsubst_friend_function): Likewise.
2004-05-01 Zack Weinberg <zack@codesourcery.com>
* decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
Instead, dig into the representation type to find the array bound.
2004-04-30 Jason Merrill <jason@redhat.com>
Refer to base members using COMPONENT_REFs where possible.
* class.c (build_simple_base_path): New fn.
(build_base_path): Use it for non-virtual base references.
(layout_class_type): Change base fields to their real type
after layout is done.
* cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
* cp-lang.c (cxx_get_alias_set): Use it.
2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
* class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
comment typos.
2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/15064
* parser.c (cp_parser_postfix_expression): typeid operator cannot be
used in integral constant expressions.
2004-04-22 Mark Mitchell <mark@codesourcery.com>
* init.c (build_aggr_init): Fix accidental use of C99 construct in
previous change.
* class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
braced initializer.
* cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
* decl.c (reshape_init): Use it.
* init.c (perform_member_init): Remove redundant condition.
(build_aggr_init): Adjust to handle brace-enclosed initializers
correctly.
(expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
* parser.c (cp_parser_initializer_clause): Do not set
TREE_HAS_CONSTRUCTOR on the initializer.
* rtti.c (tinfo_base_init): Likewise.
(generic_initializer): Likewise.
(ptr_initializer): Likewise.
(ptm_initializer): Likewise.
(class_initializer): Likewise.
(get_pseudo_ti_init): Likewise.
* typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2004-04-22 Alan Modra <amodra@bigpond.net.au>
* name-lookup.c (anonymous_namespace_name): Make static.
2004-04-19 Roger Sayle <roger@eyesopen.com>
PR middle-end/14531
* class.c (build_base_path): Call fold whilst building the NULL
pointer check expression trees.
2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
* init.c (build_new_1): Don't use type size argument for Java
_Jv_AllocObject call.
2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
* method.c (make_alias_for_thunk): Remove preprocessor guard on
declaration and definition.
2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
PR c++/14808
* method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
than ASM_OUTPUT_DEF.
2004-04-08 Jakub Jelinek <jakub@redhat.com>
* decl2.c (mark_used): Don't segfault if cfun != NULL but
current_function_decl == NULL.
2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
PR c++/3518
* pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
level.
2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* init.c (decl_constant_value): Don't look at DECL_INITIAL
of PARM_DECL.
* tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
or TREE_SIDE_EFFECTS of a type.
2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
PR c++/14007
* pt.c (check_cv_quals_for_unify): Correct logic for disallowed
cv-qualifier unification.
* tree.c (cp_build_qualified_type_real): Renable DR295 logic.
cgraph.c: Add overall comment. * cgraph.c: Add overall comment. (cgraph_inline_hash): New global variable. (cgraph_create_node): Break out from ... (cgraph_node): ... here. (cgraph_edge): New function. (cgraph_create_edge): New CALL_EXPR argument; some sanity checking. (cgraph_remove_edge): Accept edge, intead of source and destination. (cgraph_redirect_edge_callee): New. (cgraph_remove_node): Update all new datastructures. (cgraph_record_call, cgraph_remove_call): Kill. (dump_cgraph_node): Break out from ... ; dump new datastructures. (dump_cgraph): ... here. (cgraph_function_possibly_inlined_p): Use new hashtable. (cgraph_clone_edge, cgraph_clone_node): New. * cgraph.h: Include hashtab.h (struct cgraph_global_info): Kill cloned_times, inline_once, will_be_output fields, add inlined_to pointer. (cgraph_node): Add pointer to next_clone. (cgraph_remove_edge, cgraph_create_edge): Update prototype. (cgraph_remove_call, cgraph_record_call): Kill. (cgraph_inline_hash): Declare. (dump_cgraph_node, cgraph_edge, cg4raph_clone_edge, cgraph_clone_node, cgraph_redirect_edge_callee): Declare. (cgraph_create_edges, cgraph_inline_p): Update prorotype. (cgraph_preserve_function_body_p, verify_cgraph, verify_cgraph_node, cgraph_mark_inline_edge, cgraph_clone_inlined_nodes): Declare. * cgraphunit.c: Add overall comment. (cgraph_optimize_function): Kill. (cgraph_assemble_pending_functions): Do not assemble inline clones. (cgraph_finalize_function): Update call of cgraph_remove_node (record_call_1): Record call sites. (cgraph_create_edges): Accept node instead of decl argument. (error_found): New static variable. (verify_cgraph_node_1, verify_cgraph_node, verify_cgraph): New functions. (cgraph_analyze_function): Update for new datastructures. (cgraph_finalize_compilation_unit): Plug memory leak. (cgraph_optimize_function): Kill. (cgraph_expand_function): Do not use cgraph_optimize_function. (INLINED_TIMES, SET_INLINED_TIMES, cgraph_inlined_into, cgraph_inlined_callees): Kill. (cgraph_remove_unreachable_nodes): Verify cgraph; update handling of clones. (estimate_growth): Simplify. (cgraph_clone_inlined_nodes): New function. (cgraph_mark_inline_edge): Re-implement. (cgraph_mark_inline): Likewise. (cgraph_check_inline_limits): Simplify. (cgraph_recursive_inlining_p): New. (update_callee_keys): Break out from ... (cgraph_decide_inlining_of_small_functions): ... here; simplify. (cgraph_decide_inlining, cgraph_decide_inlining_incrementally): Likewise. (cgraph_expand_all_functions): Remove inline clones from the ordered list. (cgraph_preserve_function_body_p): New predicate. (cgraph_optimize): Verify cgraph. * function.h (struct function): Add fields saved_tree/saved_args. * timevar.def (TV_CGRAPH_VERIFY): Use verifier. * toplev.c (rest_of_compilation): Do not free cfun. * tree-inline.c: Include function.h (struct inline_data): Add saving_p field; replace decl/current_decl by node/current_node. (insert_decl_map): New function. (copy_body_r): Handle saving; update cgraph datastructure. (copy_body): Handle recursive inlining. (initialize_inlined_parameters): Likewise. (expand_call_inline): Propagate node attributes; update cgraph. (optimize_inline_calls): Verify that datastructure still match. (save_body): New function. * tree-inline.h (save_body): New. * tree-optimize.c (tree_rest_of_compilation): preserve function body; do inlining. * langhooks-def.c (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): New. * langhooks.c (lang_hooks): Add update_decl_after_saving. * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define. * cp-tree.h (cp_update_decl_after_saving): Declare. * tree.c (cp_update_decl_after_saving): Define. * Make-lang.in (com.o): Add dependnecy on function.h * com.c: Include function.h (finish_function): Clear DECL_STRUCT_FUNCTION. * utils.c: Include function.h (end_subprog_body): Clear DECL_STRUCT_FUNCTION. From-SVN: r80334
2004-04-02 01:28:15 +02:00
2004-04-02 Jan Hubicka <jh@suse.cz>
* cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
* cp-tree.h (cp_update_decl_after_saving): Declare.
* tree.c (cp_update_decl_after_saving): Define.
2004-04-01 Mark Mitchell <mark@codesourcery.com>
PR c++/14803
* typeck.c (get_delta_difference): Call fold before returning the
value.
2004-04-01 Richard Henderson <rth@redhat.com>
PR c++/14804
* decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
* typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
2004-04-01 Mark Mitchell <mark@codesourcery.com>
PR c++/14810
* name-lookup.c (maybe_push_cleanup_level): Robustify.
2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
builtins.c, [...]: Change most occurrences of TREE_UNSIGNED to TYPE_UNSIGNED. * builtins.c, c-aux-info.c, c-common.c, c-cppbuiltin.c, c-decl.c: Change most occurrences of TREE_UNSIGNED to TYPE_UNSIGNED. * c-format.c, c-opts.c, c-pretty-print.c, c-typeck.c: Likewise. * calls.c, convert.c, dbxout.c, dojump.c, dwarf2out.c: Likewise. * expmed.c, expr.c, fold-const.c, function.c, integrate.c: Likewise. * optabs.c, sdbout.c, stmt.c, stor-layout.c, tree-dump.c: Likewise. * tree.c, config/iq2000/iq2000.c, config/m32r/m32r.c: Likewise. * config/mips/mips.c, config/rs6000/rs6000.c: Likewise. * config/s390/s390.c, config/sparc/sparc.c, objc/objc-act.c: Likewise. * stor-layout.c (layout_type, case COMPLEX_TYPE): Test for REAL_TYPE, not INTEGER_TYPE. (layout_type, case VECTOR_TYPE): Simplify code. * tree.c (build_vector_type_for_mode): Remove dup unsigned setting. * tree.h: Update comments. (STRIP_NOPS): Use TYPE_UNSIGNED. (TYPE_UNSIGNED): New macro. (TYPE_TRAP_SIGNED): Remove now redundant check. (SAVE_EXPR_NOPLACEHOLDER): Don't use TREE_UNSIGNED. * cp/call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED. * cp/class.c (check_bitfield_decl): Likewise. * cp/cvt.c (type_promotes_to): Likewise. * cp/decl.c (finish_enum): Likewise. * cp/mangle.c (write_builtin_type): Likewise. * cp/semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise. * cp/typeck.c (type_after_usual_arithmetic_conversions): Likewise. (build_binary_op): Likewise. * f/com.c (ffecom_arrayref_): Use TYPE_UNSIGNED, not TREE_UNSIGNED. (ffecom_expr_): Likewise. * java/jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED. * treelang/treetree.c (tree_lang_signed_or_unsigned_type): Use TYPE_UNSIGNED, not TREE_UNSIGNED. * ada/decl.c (gnat_to_gnu_entity, make_type_from_size): Use TYPE_UNSIGNED, not TREE_UNSIGNED. * ada/trans.c (tree_transform, convert_with_check): Likewise. * ada/utils.c (gnat_signed_or_unsigned_type): Likewise. (build_vms_descriptor, unchecked_convert): Likewise. * ada/utils2.c (nonbinary_modular_operation): Likewise. From-SVN: r80287
2004-04-01 05:50:43 +02:00
2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
* class.c (check_bitfield_decl): Likewise.
* cvt.c (type_promotes_to): Likewise.
* decl.c (finish_enum): Likewise.
* mangle.c (write_builtin_type): Likewise.
* semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
* typeck.c (type_after_usual_arithmetic_conversions): Likewise.
(build_binary_op): Likewise.
2004-03-31 Jan Hubicka <jh@suse.cz>
* tree.h (optimize_function): Kill prototype.
* optimize.c (dump_function, optimize_function, dump_finction): Kill.
* semantics.c (expand_body): Kill.
2004-03-30 Mark Mitchell <mark@codesourcery.com>
PR c++/14724
* decl.c (start_decl_1): Do not decide whether or not to create a
new cleanup level until after the type has been completed.
PR c++/14763
* pt.c (tsubst_default_argument): Clear current_function_decl.
2004-03-30 Zack Weinberg <zack@codesourcery.com>
* name-lookup.c, parser.c: Use new shorter form of GTY markers.
2004-03-29 Zack Weinberg <zack@codesourcery.com>
* error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
is null, just print the literal name and return.
2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
* cxx-pretty-print.c: Fix comment typos.
2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
* cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
Update copyright.
2004-03-23 Ziemowit Laski <zlaski@apple.com>
* Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
* mangle.c (write_type): Add call to 'mangle_fundamental_type'
target hook.
PR 12267, 12391, 12560, 13129, 14114, 14113 * c-tree.h: Forward declare struct c_binding. Declare c_override_bindings_to_false. Update prototypes. (struct lang_identifier): Update comments. Change fields to be struct c_binding *. (IDENTIFIER_SYMBOL_VALUE, IDENTIFIER_TAG_VALUE) (IDENTIFIER_LABEL_VALUE, C_DECL_INVISIBLE) (KEEP_NO, KEEP_YES, KEEP_MAYBE): Delete. (C_DECL_IN_EXTERNAL_SCOPE, C_DECL_DECLARED_BUILTIN): New. * c-common.h: Update prototypes. * c-decl.c (struct c_scope): Update commentary. Remove names, names_last, parms, parms_last, tags, and shadowed fields. Add bindings and depth fields. (scope_freelist): Move to more appropriate location. (c_print_identifier): Update for changes to struct lang_identifier. (objc_mark_locals_volatile): Update for new bindings structures. (global_bindings_p): Honor c_override_global_bindings_to_false. (pushlevel): Rename to push_scope; take no arguments; use the scope_freelist; initialize scope->depth and check for overflow. (poplevel): Rename to pop_scope; totally rewritten for new bindings structures. (diagnose_mismatched_decls): Use C_DECL_DECLARED_BUILTIN, not C_DECL_INVISIBLE, for certain decisions. Adjust some diagnostics. Improve some commentary. Adjust handling of forward parm decls. (merge_decls): Set C_DECL_DECLARED_BUILTIN when appropriate. Preserve C_DECL_IN_EXTERNAL_SCOPE. (warn_if_shadowing): Correct indentation. Improve diagnostics. (pushdecl): Remove unnecessary assertion. Short-circuit anonymous decls. Rewrite for new bindings structures. Improve commentary. Eliminate the copy_node call. (implicit_decl_warning): Use the "diag" idiom (as seen in locate_old_decl) to reduce code duplication; call locate_old_decl if appropriate. Relocate to remove need for forward declaration. (implicitly_declare): Adjust for new bindings structures. Kludge around Objective-C not-really-builtin functions. (undeclared_variable): Improve diagnostics. If current_function_decl is nonnull but current_function_scope is null, use current_scope. Use bind. (lookup_tag): Adjust for new bindings structures. Kludge around Objective-C's tag declarations that wind up in the external scope. (lookup_name): Adjust for new bindings structures. Kludge around c-common.c's pseudo-typedefs that wind up in the external scope. (lookup_name_current_level): Rename lookup_name_in_scope; take a second argument indicating the scope to examine; rewrite for new bindings structures. (c_init_decl_processing): Adjust for renamed functions. Do not initialize current_file_decl, first_builtin_decl, last_builtin_decl. First scope pushed is the external scope, not the global scope. (builtin_function): Use bind, not pushdecl. Adjust other bits for new data structures. Keep track of builtins that should be made visible automatically. (start_decl): Adjust diagnostics. Remove unnecessary call to expand_decl. (grokparms): Return 0 if arg_types is error_mark_node. (get_parm_info): Rename "void_at_end" argument to "ellipsis", with reversed sense. Rewrite for new bindings structures. Do not leave any decls in the scope, to prevent pop_scope from doing contradictory things with them. (finish_struct, finish_enum): Remove redundant diagnostics. (build_enumerator): Don't cascade diagnostics for error_mark_node. Mark location where -pedantic changes the meaning of the program. (store_parm_decls_newstyle, store_parm_decls_oldstyle): Load the parameter decls into the function's scope structure using bind. Warn here about function definitions in the wrong style. Adjust diagnostics. (store_parm_decls): Correct the determination of whether a function was defined with a prototype. (c_write_global_declarations): Operate on all file decls and on the external scope. Split body of the loop to... (c_write_global_declarations_1): ... this new function, to avoid code duplication. (truly_local_externals, first_builtin_decl, last_builtin_decl) (make_scope, pop_scope, in_parm_level_p, set_block) (any_external_decl, record_external_decl, bind_label, getdecls) (link_hash_hash, link_hash_eq, merge_translation_unit_decls) (c_reset_state): Delete. (visible_builtins, c_override_global_bindings_to_false) (c_binding, I_SYMBOL_BINDING, I_SYMBOL_DECL, I_TAG_BINDING) (I_TAG_DECL, I_LABEL_BINDING, I_LABEL_DECL, file_scope) (external_scope, binding_freelist, bind, free_binding_and_advance) (push_file_scope, pop_file_scope): New. (pushtag, pushdecl_top_level, lookup_label, declare_label) (define_label, c_make_fname_decl, finish_decl) (mark_forward_parm_decls, build_compound_literal) (grokdeclarator, start_function, check_for_loop_decls) (identifier_global_value, record_builtin_type): Minor adjustments for new bindings structures. Improve diagnostics and commentary. * c-objc-common.c (start_cdtor, finish_cdtor): Adjust calls to pushlevel/poplevel respectively. (c_objc_common_finish_file): Don't call merge_translation_unit_decls. * c-opts.c (c_common_parse_file): Remove spurious ATTRIBUTE_UNUSED. Warn about YYDEBUG not being defined only if -dy. Remove no-longer- correct loop over multiple translation units; call fatal_error if requested to compile more than one file at once. (This disables IMA temporarily - an up-front error being preferable to a crash.) * c-parse.in (pushlevel, poplevel rules): Rename push_scope, pop_scope. (all actions): Adjust calls to pushlevel/poplevel. (parsing_iso_function_signature): Delete. (extdef_1): Fold into extdef. (old_style_parm_decls_1): Fold into old_style_parm_decls. Don't warn here about function definitions in the wrong style. (after_tyle_declarator, parm_declarator_starttypename) (parm_declarator_nostarttypename, notype_declarator): Remove commented-out productions. (parmlist_1, parmlist_2): Use make_node, not tree_cons, to create an empty TREE_LIST node. Adjust calls to get_parm_info. (parmlist_2 : ELLIPSIS): Tag the arg-info block with error_mark_node to suppress -Wold-style-definition after this error. (c_parse_file): Don't clear the binding stack or call finish_fname_decls here. Correct comment. * c-typeck.c (same_translation_unit_p): Export. (common_type): Use c_override_global_bindings_to_false, not pushlevel/poplevel/declare_parm_level. * c-lang.c: Override LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK, and LANG_HOOKS_GETDECLS with do-nothing stubs. * objc/objc-lang.c: Likewise. * objc/objc-act.c: Adjust all calls to pushlevel, poplevel, get_parm_info. (OBJC_VOID_AT_END): Delete; replace all uses with void_list_node. (generate_forward_declaration_to_string_table): Delete. * objc/objc-act.h (OCTI_STRG_DECL, UOBJC_STRINGS_decl): Delete. * coverage.c (create_coverage): Don't pushdecl anything. * langhooks.c (lhd_clear_binding_stack): Call lang_hooks.decls.poplevel, not poplevel. * tree.c (list_length): If ENABLE_TREE_CHECKING, abort on a circular list rather than going into an infinite loop. cp: * cp-lang.c (c_reset_state): Delete. (push_file_scope, pop_file_scope): New stubs. * parser.c (c_parse_file): Call sorry() here if called more than once. testsuite: * gcc.dg/Wold-style-definition-1.c, gcc.dg/builtins-30.c * gcc.dg/unused-4.c, gcc.dg/noncompile/label-1.c * gcc.dg/noncompile/label-lineno-1.c, objc.dg/naming-1.m: Adjust error regexps. * gcc.dg/Wshadow-2.c, gcc.dg/noncompile/incomplete-3.c * gcc.dg/noncompile/undeclared-1.c: New test cases. * gcc.dg/decl-5.c, gcc.dg/redecl-1.c: Remove XFAIL. * gcc.dg/local1.c: Add explanatory comment. From-SVN: r79883
2004-03-24 00:47:53 +01:00
2004-03-23 Zack Weinberg <zack@codesourcery.com>
PR 12267, 12391, 12560, 13129, 14114, 14133
PR 12267, 12391, 12560, 13129, 14114, 14113 * c-tree.h: Forward declare struct c_binding. Declare c_override_bindings_to_false. Update prototypes. (struct lang_identifier): Update comments. Change fields to be struct c_binding *. (IDENTIFIER_SYMBOL_VALUE, IDENTIFIER_TAG_VALUE) (IDENTIFIER_LABEL_VALUE, C_DECL_INVISIBLE) (KEEP_NO, KEEP_YES, KEEP_MAYBE): Delete. (C_DECL_IN_EXTERNAL_SCOPE, C_DECL_DECLARED_BUILTIN): New. * c-common.h: Update prototypes. * c-decl.c (struct c_scope): Update commentary. Remove names, names_last, parms, parms_last, tags, and shadowed fields. Add bindings and depth fields. (scope_freelist): Move to more appropriate location. (c_print_identifier): Update for changes to struct lang_identifier. (objc_mark_locals_volatile): Update for new bindings structures. (global_bindings_p): Honor c_override_global_bindings_to_false. (pushlevel): Rename to push_scope; take no arguments; use the scope_freelist; initialize scope->depth and check for overflow. (poplevel): Rename to pop_scope; totally rewritten for new bindings structures. (diagnose_mismatched_decls): Use C_DECL_DECLARED_BUILTIN, not C_DECL_INVISIBLE, for certain decisions. Adjust some diagnostics. Improve some commentary. Adjust handling of forward parm decls. (merge_decls): Set C_DECL_DECLARED_BUILTIN when appropriate. Preserve C_DECL_IN_EXTERNAL_SCOPE. (warn_if_shadowing): Correct indentation. Improve diagnostics. (pushdecl): Remove unnecessary assertion. Short-circuit anonymous decls. Rewrite for new bindings structures. Improve commentary. Eliminate the copy_node call. (implicit_decl_warning): Use the "diag" idiom (as seen in locate_old_decl) to reduce code duplication; call locate_old_decl if appropriate. Relocate to remove need for forward declaration. (implicitly_declare): Adjust for new bindings structures. Kludge around Objective-C not-really-builtin functions. (undeclared_variable): Improve diagnostics. If current_function_decl is nonnull but current_function_scope is null, use current_scope. Use bind. (lookup_tag): Adjust for new bindings structures. Kludge around Objective-C's tag declarations that wind up in the external scope. (lookup_name): Adjust for new bindings structures. Kludge around c-common.c's pseudo-typedefs that wind up in the external scope. (lookup_name_current_level): Rename lookup_name_in_scope; take a second argument indicating the scope to examine; rewrite for new bindings structures. (c_init_decl_processing): Adjust for renamed functions. Do not initialize current_file_decl, first_builtin_decl, last_builtin_decl. First scope pushed is the external scope, not the global scope. (builtin_function): Use bind, not pushdecl. Adjust other bits for new data structures. Keep track of builtins that should be made visible automatically. (start_decl): Adjust diagnostics. Remove unnecessary call to expand_decl. (grokparms): Return 0 if arg_types is error_mark_node. (get_parm_info): Rename "void_at_end" argument to "ellipsis", with reversed sense. Rewrite for new bindings structures. Do not leave any decls in the scope, to prevent pop_scope from doing contradictory things with them. (finish_struct, finish_enum): Remove redundant diagnostics. (build_enumerator): Don't cascade diagnostics for error_mark_node. Mark location where -pedantic changes the meaning of the program. (store_parm_decls_newstyle, store_parm_decls_oldstyle): Load the parameter decls into the function's scope structure using bind. Warn here about function definitions in the wrong style. Adjust diagnostics. (store_parm_decls): Correct the determination of whether a function was defined with a prototype. (c_write_global_declarations): Operate on all file decls and on the external scope. Split body of the loop to... (c_write_global_declarations_1): ... this new function, to avoid code duplication. (truly_local_externals, first_builtin_decl, last_builtin_decl) (make_scope, pop_scope, in_parm_level_p, set_block) (any_external_decl, record_external_decl, bind_label, getdecls) (link_hash_hash, link_hash_eq, merge_translation_unit_decls) (c_reset_state): Delete. (visible_builtins, c_override_global_bindings_to_false) (c_binding, I_SYMBOL_BINDING, I_SYMBOL_DECL, I_TAG_BINDING) (I_TAG_DECL, I_LABEL_BINDING, I_LABEL_DECL, file_scope) (external_scope, binding_freelist, bind, free_binding_and_advance) (push_file_scope, pop_file_scope): New. (pushtag, pushdecl_top_level, lookup_label, declare_label) (define_label, c_make_fname_decl, finish_decl) (mark_forward_parm_decls, build_compound_literal) (grokdeclarator, start_function, check_for_loop_decls) (identifier_global_value, record_builtin_type): Minor adjustments for new bindings structures. Improve diagnostics and commentary. * c-objc-common.c (start_cdtor, finish_cdtor): Adjust calls to pushlevel/poplevel respectively. (c_objc_common_finish_file): Don't call merge_translation_unit_decls. * c-opts.c (c_common_parse_file): Remove spurious ATTRIBUTE_UNUSED. Warn about YYDEBUG not being defined only if -dy. Remove no-longer- correct loop over multiple translation units; call fatal_error if requested to compile more than one file at once. (This disables IMA temporarily - an up-front error being preferable to a crash.) * c-parse.in (pushlevel, poplevel rules): Rename push_scope, pop_scope. (all actions): Adjust calls to pushlevel/poplevel. (parsing_iso_function_signature): Delete. (extdef_1): Fold into extdef. (old_style_parm_decls_1): Fold into old_style_parm_decls. Don't warn here about function definitions in the wrong style. (after_tyle_declarator, parm_declarator_starttypename) (parm_declarator_nostarttypename, notype_declarator): Remove commented-out productions. (parmlist_1, parmlist_2): Use make_node, not tree_cons, to create an empty TREE_LIST node. Adjust calls to get_parm_info. (parmlist_2 : ELLIPSIS): Tag the arg-info block with error_mark_node to suppress -Wold-style-definition after this error. (c_parse_file): Don't clear the binding stack or call finish_fname_decls here. Correct comment. * c-typeck.c (same_translation_unit_p): Export. (common_type): Use c_override_global_bindings_to_false, not pushlevel/poplevel/declare_parm_level. * c-lang.c: Override LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK, and LANG_HOOKS_GETDECLS with do-nothing stubs. * objc/objc-lang.c: Likewise. * objc/objc-act.c: Adjust all calls to pushlevel, poplevel, get_parm_info. (OBJC_VOID_AT_END): Delete; replace all uses with void_list_node. (generate_forward_declaration_to_string_table): Delete. * objc/objc-act.h (OCTI_STRG_DECL, UOBJC_STRINGS_decl): Delete. * coverage.c (create_coverage): Don't pushdecl anything. * langhooks.c (lhd_clear_binding_stack): Call lang_hooks.decls.poplevel, not poplevel. * tree.c (list_length): If ENABLE_TREE_CHECKING, abort on a circular list rather than going into an infinite loop. cp: * cp-lang.c (c_reset_state): Delete. (push_file_scope, pop_file_scope): New stubs. * parser.c (c_parse_file): Call sorry() here if called more than once. testsuite: * gcc.dg/Wold-style-definition-1.c, gcc.dg/builtins-30.c * gcc.dg/unused-4.c, gcc.dg/noncompile/label-1.c * gcc.dg/noncompile/label-lineno-1.c, objc.dg/naming-1.m: Adjust error regexps. * gcc.dg/Wshadow-2.c, gcc.dg/noncompile/incomplete-3.c * gcc.dg/noncompile/undeclared-1.c: New test cases. * gcc.dg/decl-5.c, gcc.dg/redecl-1.c: Remove XFAIL. * gcc.dg/local1.c: Add explanatory comment. From-SVN: r79883
2004-03-24 00:47:53 +01:00
* cp-lang.c (c_reset_state): Delete.
(push_file_scope, pop_file_scope): New stubs.
* parser.c (c_parse_file): Call sorry() here if called more than once.
2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
for INTEGER_CST.
2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
* error.c (enum pad): Remove.
(dump_qualifiers): Likewise.
(dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
(dump_aggr_type): Likewise.
(dump_type_suffix): Likewise.
(dump_simple_decl): Likewise.
(dump_function_decl): Likewise.
(cv_to_string): Likewise.
PR 12267, 12391, 12560, 13129, 14114, 14113 * c-tree.h: Forward declare struct c_binding. Declare c_override_bindings_to_false. Update prototypes. (struct lang_identifier): Update comments. Change fields to be struct c_binding *. (IDENTIFIER_SYMBOL_VALUE, IDENTIFIER_TAG_VALUE) (IDENTIFIER_LABEL_VALUE, C_DECL_INVISIBLE) (KEEP_NO, KEEP_YES, KEEP_MAYBE): Delete. (C_DECL_IN_EXTERNAL_SCOPE, C_DECL_DECLARED_BUILTIN): New. * c-common.h: Update prototypes. * c-decl.c (struct c_scope): Update commentary. Remove names, names_last, parms, parms_last, tags, and shadowed fields. Add bindings and depth fields. (scope_freelist): Move to more appropriate location. (c_print_identifier): Update for changes to struct lang_identifier. (objc_mark_locals_volatile): Update for new bindings structures. (global_bindings_p): Honor c_override_global_bindings_to_false. (pushlevel): Rename to push_scope; take no arguments; use the scope_freelist; initialize scope->depth and check for overflow. (poplevel): Rename to pop_scope; totally rewritten for new bindings structures. (diagnose_mismatched_decls): Use C_DECL_DECLARED_BUILTIN, not C_DECL_INVISIBLE, for certain decisions. Adjust some diagnostics. Improve some commentary. Adjust handling of forward parm decls. (merge_decls): Set C_DECL_DECLARED_BUILTIN when appropriate. Preserve C_DECL_IN_EXTERNAL_SCOPE. (warn_if_shadowing): Correct indentation. Improve diagnostics. (pushdecl): Remove unnecessary assertion. Short-circuit anonymous decls. Rewrite for new bindings structures. Improve commentary. Eliminate the copy_node call. (implicit_decl_warning): Use the "diag" idiom (as seen in locate_old_decl) to reduce code duplication; call locate_old_decl if appropriate. Relocate to remove need for forward declaration. (implicitly_declare): Adjust for new bindings structures. Kludge around Objective-C not-really-builtin functions. (undeclared_variable): Improve diagnostics. If current_function_decl is nonnull but current_function_scope is null, use current_scope. Use bind. (lookup_tag): Adjust for new bindings structures. Kludge around Objective-C's tag declarations that wind up in the external scope. (lookup_name): Adjust for new bindings structures. Kludge around c-common.c's pseudo-typedefs that wind up in the external scope. (lookup_name_current_level): Rename lookup_name_in_scope; take a second argument indicating the scope to examine; rewrite for new bindings structures. (c_init_decl_processing): Adjust for renamed functions. Do not initialize current_file_decl, first_builtin_decl, last_builtin_decl. First scope pushed is the external scope, not the global scope. (builtin_function): Use bind, not pushdecl. Adjust other bits for new data structures. Keep track of builtins that should be made visible automatically. (start_decl): Adjust diagnostics. Remove unnecessary call to expand_decl. (grokparms): Return 0 if arg_types is error_mark_node. (get_parm_info): Rename "void_at_end" argument to "ellipsis", with reversed sense. Rewrite for new bindings structures. Do not leave any decls in the scope, to prevent pop_scope from doing contradictory things with them. (finish_struct, finish_enum): Remove redundant diagnostics. (build_enumerator): Don't cascade diagnostics for error_mark_node. Mark location where -pedantic changes the meaning of the program. (store_parm_decls_newstyle, store_parm_decls_oldstyle): Load the parameter decls into the function's scope structure using bind. Warn here about function definitions in the wrong style. Adjust diagnostics. (store_parm_decls): Correct the determination of whether a function was defined with a prototype. (c_write_global_declarations): Operate on all file decls and on the external scope. Split body of the loop to... (c_write_global_declarations_1): ... this new function, to avoid code duplication. (truly_local_externals, first_builtin_decl, last_builtin_decl) (make_scope, pop_scope, in_parm_level_p, set_block) (any_external_decl, record_external_decl, bind_label, getdecls) (link_hash_hash, link_hash_eq, merge_translation_unit_decls) (c_reset_state): Delete. (visible_builtins, c_override_global_bindings_to_false) (c_binding, I_SYMBOL_BINDING, I_SYMBOL_DECL, I_TAG_BINDING) (I_TAG_DECL, I_LABEL_BINDING, I_LABEL_DECL, file_scope) (external_scope, binding_freelist, bind, free_binding_and_advance) (push_file_scope, pop_file_scope): New. (pushtag, pushdecl_top_level, lookup_label, declare_label) (define_label, c_make_fname_decl, finish_decl) (mark_forward_parm_decls, build_compound_literal) (grokdeclarator, start_function, check_for_loop_decls) (identifier_global_value, record_builtin_type): Minor adjustments for new bindings structures. Improve diagnostics and commentary. * c-objc-common.c (start_cdtor, finish_cdtor): Adjust calls to pushlevel/poplevel respectively. (c_objc_common_finish_file): Don't call merge_translation_unit_decls. * c-opts.c (c_common_parse_file): Remove spurious ATTRIBUTE_UNUSED. Warn about YYDEBUG not being defined only if -dy. Remove no-longer- correct loop over multiple translation units; call fatal_error if requested to compile more than one file at once. (This disables IMA temporarily - an up-front error being preferable to a crash.) * c-parse.in (pushlevel, poplevel rules): Rename push_scope, pop_scope. (all actions): Adjust calls to pushlevel/poplevel. (parsing_iso_function_signature): Delete. (extdef_1): Fold into extdef. (old_style_parm_decls_1): Fold into old_style_parm_decls. Don't warn here about function definitions in the wrong style. (after_tyle_declarator, parm_declarator_starttypename) (parm_declarator_nostarttypename, notype_declarator): Remove commented-out productions. (parmlist_1, parmlist_2): Use make_node, not tree_cons, to create an empty TREE_LIST node. Adjust calls to get_parm_info. (parmlist_2 : ELLIPSIS): Tag the arg-info block with error_mark_node to suppress -Wold-style-definition after this error. (c_parse_file): Don't clear the binding stack or call finish_fname_decls here. Correct comment. * c-typeck.c (same_translation_unit_p): Export. (common_type): Use c_override_global_bindings_to_false, not pushlevel/poplevel/declare_parm_level. * c-lang.c: Override LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK, and LANG_HOOKS_GETDECLS with do-nothing stubs. * objc/objc-lang.c: Likewise. * objc/objc-act.c: Adjust all calls to pushlevel, poplevel, get_parm_info. (OBJC_VOID_AT_END): Delete; replace all uses with void_list_node. (generate_forward_declaration_to_string_table): Delete. * objc/objc-act.h (OCTI_STRG_DECL, UOBJC_STRINGS_decl): Delete. * coverage.c (create_coverage): Don't pushdecl anything. * langhooks.c (lhd_clear_binding_stack): Call lang_hooks.decls.poplevel, not poplevel. * tree.c (list_length): If ENABLE_TREE_CHECKING, abort on a circular list rather than going into an infinite loop. cp: * cp-lang.c (c_reset_state): Delete. (push_file_scope, pop_file_scope): New stubs. * parser.c (c_parse_file): Call sorry() here if called more than once. testsuite: * gcc.dg/Wold-style-definition-1.c, gcc.dg/builtins-30.c * gcc.dg/unused-4.c, gcc.dg/noncompile/label-1.c * gcc.dg/noncompile/label-lineno-1.c, objc.dg/naming-1.m: Adjust error regexps. * gcc.dg/Wshadow-2.c, gcc.dg/noncompile/incomplete-3.c * gcc.dg/noncompile/undeclared-1.c: New test cases. * gcc.dg/decl-5.c, gcc.dg/redecl-1.c: Remove XFAIL. * gcc.dg/local1.c: Add explanatory comment. From-SVN: r79883
2004-03-24 00:47:53 +01:00
(dump_type_prefix): Likewise. Adjust return void.
* cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
cxx_pretty_print.h.
(pp_cxx_template_keyword_if_needed): Document.
(pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
(pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
PR 12267, 12391, 12560, 13129, 14114, 14113 * c-tree.h: Forward declare struct c_binding. Declare c_override_bindings_to_false. Update prototypes. (struct lang_identifier): Update comments. Change fields to be struct c_binding *. (IDENTIFIER_SYMBOL_VALUE, IDENTIFIER_TAG_VALUE) (IDENTIFIER_LABEL_VALUE, C_DECL_INVISIBLE) (KEEP_NO, KEEP_YES, KEEP_MAYBE): Delete. (C_DECL_IN_EXTERNAL_SCOPE, C_DECL_DECLARED_BUILTIN): New. * c-common.h: Update prototypes. * c-decl.c (struct c_scope): Update commentary. Remove names, names_last, parms, parms_last, tags, and shadowed fields. Add bindings and depth fields. (scope_freelist): Move to more appropriate location. (c_print_identifier): Update for changes to struct lang_identifier. (objc_mark_locals_volatile): Update for new bindings structures. (global_bindings_p): Honor c_override_global_bindings_to_false. (pushlevel): Rename to push_scope; take no arguments; use the scope_freelist; initialize scope->depth and check for overflow. (poplevel): Rename to pop_scope; totally rewritten for new bindings structures. (diagnose_mismatched_decls): Use C_DECL_DECLARED_BUILTIN, not C_DECL_INVISIBLE, for certain decisions. Adjust some diagnostics. Improve some commentary. Adjust handling of forward parm decls. (merge_decls): Set C_DECL_DECLARED_BUILTIN when appropriate. Preserve C_DECL_IN_EXTERNAL_SCOPE. (warn_if_shadowing): Correct indentation. Improve diagnostics. (pushdecl): Remove unnecessary assertion. Short-circuit anonymous decls. Rewrite for new bindings structures. Improve commentary. Eliminate the copy_node call. (implicit_decl_warning): Use the "diag" idiom (as seen in locate_old_decl) to reduce code duplication; call locate_old_decl if appropriate. Relocate to remove need for forward declaration. (implicitly_declare): Adjust for new bindings structures. Kludge around Objective-C not-really-builtin functions. (undeclared_variable): Improve diagnostics. If current_function_decl is nonnull but current_function_scope is null, use current_scope. Use bind. (lookup_tag): Adjust for new bindings structures. Kludge around Objective-C's tag declarations that wind up in the external scope. (lookup_name): Adjust for new bindings structures. Kludge around c-common.c's pseudo-typedefs that wind up in the external scope. (lookup_name_current_level): Rename lookup_name_in_scope; take a second argument indicating the scope to examine; rewrite for new bindings structures. (c_init_decl_processing): Adjust for renamed functions. Do not initialize current_file_decl, first_builtin_decl, last_builtin_decl. First scope pushed is the external scope, not the global scope. (builtin_function): Use bind, not pushdecl. Adjust other bits for new data structures. Keep track of builtins that should be made visible automatically. (start_decl): Adjust diagnostics. Remove unnecessary call to expand_decl. (grokparms): Return 0 if arg_types is error_mark_node. (get_parm_info): Rename "void_at_end" argument to "ellipsis", with reversed sense. Rewrite for new bindings structures. Do not leave any decls in the scope, to prevent pop_scope from doing contradictory things with them. (finish_struct, finish_enum): Remove redundant diagnostics. (build_enumerator): Don't cascade diagnostics for error_mark_node. Mark location where -pedantic changes the meaning of the program. (store_parm_decls_newstyle, store_parm_decls_oldstyle): Load the parameter decls into the function's scope structure using bind. Warn here about function definitions in the wrong style. Adjust diagnostics. (store_parm_decls): Correct the determination of whether a function was defined with a prototype. (c_write_global_declarations): Operate on all file decls and on the external scope. Split body of the loop to... (c_write_global_declarations_1): ... this new function, to avoid code duplication. (truly_local_externals, first_builtin_decl, last_builtin_decl) (make_scope, pop_scope, in_parm_level_p, set_block) (any_external_decl, record_external_decl, bind_label, getdecls) (link_hash_hash, link_hash_eq, merge_translation_unit_decls) (c_reset_state): Delete. (visible_builtins, c_override_global_bindings_to_false) (c_binding, I_SYMBOL_BINDING, I_SYMBOL_DECL, I_TAG_BINDING) (I_TAG_DECL, I_LABEL_BINDING, I_LABEL_DECL, file_scope) (external_scope, binding_freelist, bind, free_binding_and_advance) (push_file_scope, pop_file_scope): New. (pushtag, pushdecl_top_level, lookup_label, declare_label) (define_label, c_make_fname_decl, finish_decl) (mark_forward_parm_decls, build_compound_literal) (grokdeclarator, start_function, check_for_loop_decls) (identifier_global_value, record_builtin_type): Minor adjustments for new bindings structures. Improve diagnostics and commentary. * c-objc-common.c (start_cdtor, finish_cdtor): Adjust calls to pushlevel/poplevel respectively. (c_objc_common_finish_file): Don't call merge_translation_unit_decls. * c-opts.c (c_common_parse_file): Remove spurious ATTRIBUTE_UNUSED. Warn about YYDEBUG not being defined only if -dy. Remove no-longer- correct loop over multiple translation units; call fatal_error if requested to compile more than one file at once. (This disables IMA temporarily - an up-front error being preferable to a crash.) * c-parse.in (pushlevel, poplevel rules): Rename push_scope, pop_scope. (all actions): Adjust calls to pushlevel/poplevel. (parsing_iso_function_signature): Delete. (extdef_1): Fold into extdef. (old_style_parm_decls_1): Fold into old_style_parm_decls. Don't warn here about function definitions in the wrong style. (after_tyle_declarator, parm_declarator_starttypename) (parm_declarator_nostarttypename, notype_declarator): Remove commented-out productions. (parmlist_1, parmlist_2): Use make_node, not tree_cons, to create an empty TREE_LIST node. Adjust calls to get_parm_info. (parmlist_2 : ELLIPSIS): Tag the arg-info block with error_mark_node to suppress -Wold-style-definition after this error. (c_parse_file): Don't clear the binding stack or call finish_fname_decls here. Correct comment. * c-typeck.c (same_translation_unit_p): Export. (common_type): Use c_override_global_bindings_to_false, not pushlevel/poplevel/declare_parm_level. * c-lang.c: Override LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK, and LANG_HOOKS_GETDECLS with do-nothing stubs. * objc/objc-lang.c: Likewise. * objc/objc-act.c: Adjust all calls to pushlevel, poplevel, get_parm_info. (OBJC_VOID_AT_END): Delete; replace all uses with void_list_node. (generate_forward_declaration_to_string_table): Delete. * objc/objc-act.h (OCTI_STRG_DECL, UOBJC_STRINGS_decl): Delete. * coverage.c (create_coverage): Don't pushdecl anything. * langhooks.c (lhd_clear_binding_stack): Call lang_hooks.decls.poplevel, not poplevel. * tree.c (list_length): If ENABLE_TREE_CHECKING, abort on a circular list rather than going into an infinite loop. cp: * cp-lang.c (c_reset_state): Delete. (push_file_scope, pop_file_scope): New stubs. * parser.c (c_parse_file): Call sorry() here if called more than once. testsuite: * gcc.dg/Wold-style-definition-1.c, gcc.dg/builtins-30.c * gcc.dg/unused-4.c, gcc.dg/noncompile/label-1.c * gcc.dg/noncompile/label-lineno-1.c, objc.dg/naming-1.m: Adjust error regexps. * gcc.dg/Wshadow-2.c, gcc.dg/noncompile/incomplete-3.c * gcc.dg/noncompile/undeclared-1.c: New test cases. * gcc.dg/decl-5.c, gcc.dg/redecl-1.c: Remove XFAIL. * gcc.dg/local1.c: Add explanatory comment. From-SVN: r79883
2004-03-24 00:47:53 +01:00
MUST_NOT_THROW_EXPR.
2004-03-21 Mark Mitchell <mark@codesourcery.com>
PR c++/14616
* decl.c (cp_finish_decl): Compute the size of arrays declared in
templates, if their type is non-dependent.
call.c (build_op_delete_call): Do not forget the placement arguments when iterating through mutiple delete... * call.c (build_op_delete_call): Do not forget the placement arguments when iterating through mutiple delete operators. * cp-tree.h (svaed_scope): Remove last_parms. (NEW_DELETE_OPNAME_P): New macro. (last_function_parms): Remove. (do_friend): Adjust prototype. * decl.c (grokparms): Return the PARM_DECLs directly, rather than using last_function_parms. (grokfndecl): Take the PARM_DECLs as an argument, rather than using last_function_parms. (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs for class-specific operator new and operator delete. (grok_op_properties): Do not look for allocation functions with METHOD_TYPEs. (start_function): Use DECL_ARGUMENTS instead of last_function_parms. * decl.h (last_function_parms): Do not declare. * decl2.c (grokclassfn): Do not use last_function_parms. * friend.c (do_friend): Remove parmdecls parameter. * name-lookup.c (push_to_top_level): Do not save last_function_parms. (pop_from_top_level): Do not restore it. * pt.c (check_explicit_specialization): Do not adjust last_function_parms. * name-lookup.c (do_local_using_decl): Create a local binding for types brought in via using declarations. * name-lookup.c (lookup_arg_dependent): Handle block-scope function declarations correctly. * semantics.c (finish_id_expression): Correct handling of conversion operators to dependent types. * typeck.c (lookup_destructor): Allow the use of destructors from base classes. * g++.dg/init/placement3.C: New test. * g++.dg/template/spec13.C: New test. * g++.dg/lookup/using11.C: New test. * g++.dg/lookup/koenig3.C: New test. * g++.dg/template/operator2.C: New test. * g++.dg/expr/dtor3.C: New test. * g++.old-deja/g++.brendan/crash15.C: Remove incorrect dg-error marker. * g++.old-deja/g++.law/visibility28.C: Likewise. From-SVN: r79722
2004-03-20 01:18:24 +01:00
2004-03-19 Mark Mitchell <mark@codesourcery.com>
* call.c (build_op_delete_call): Do not forget the placement
arguments when iterating through mutiple delete operators.
* cp-tree.h (svaed_scope): Remove last_parms.
(NEW_DELETE_OPNAME_P): New macro.
(last_function_parms): Remove.
(do_friend): Adjust prototype.
* decl.c (grokparms): Return the PARM_DECLs directly, rather than
using last_function_parms.
(grokfndecl): Take the PARM_DECLs as an argument, rather than
using last_function_parms.
(grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
for class-specific operator new and operator delete.
(grok_op_properties): Do not look for allocation functions with
METHOD_TYPEs.
(start_function): Use DECL_ARGUMENTS instead of
last_function_parms.
* decl.h (last_function_parms): Do not declare.
* decl2.c (grokclassfn): Do not use last_function_parms.
* friend.c (do_friend): Remove parmdecls parameter.
* name-lookup.c (push_to_top_level): Do not save last_function_parms.
(pop_from_top_level): Do not restore it.
* pt.c (check_explicit_specialization): Do not adjust
last_function_parms.
* name-lookup.c (do_local_using_decl): Create a local binding for
types brought in via using declarations.
* name-lookup.c (lookup_arg_dependent): Handle block-scope
function declarations correctly.
* semantics.c (finish_id_expression): Correct handling of
conversion operators to dependent types.
* typeck.c (lookup_destructor): Allow the use of destructors from
base classes.
PR 12267, 12391, 12560, 13129, 14114, 14113 * c-tree.h: Forward declare struct c_binding. Declare c_override_bindings_to_false. Update prototypes. (struct lang_identifier): Update comments. Change fields to be struct c_binding *. (IDENTIFIER_SYMBOL_VALUE, IDENTIFIER_TAG_VALUE) (IDENTIFIER_LABEL_VALUE, C_DECL_INVISIBLE) (KEEP_NO, KEEP_YES, KEEP_MAYBE): Delete. (C_DECL_IN_EXTERNAL_SCOPE, C_DECL_DECLARED_BUILTIN): New. * c-common.h: Update prototypes. * c-decl.c (struct c_scope): Update commentary. Remove names, names_last, parms, parms_last, tags, and shadowed fields. Add bindings and depth fields. (scope_freelist): Move to more appropriate location. (c_print_identifier): Update for changes to struct lang_identifier. (objc_mark_locals_volatile): Update for new bindings structures. (global_bindings_p): Honor c_override_global_bindings_to_false. (pushlevel): Rename to push_scope; take no arguments; use the scope_freelist; initialize scope->depth and check for overflow. (poplevel): Rename to pop_scope; totally rewritten for new bindings structures. (diagnose_mismatched_decls): Use C_DECL_DECLARED_BUILTIN, not C_DECL_INVISIBLE, for certain decisions. Adjust some diagnostics. Improve some commentary. Adjust handling of forward parm decls. (merge_decls): Set C_DECL_DECLARED_BUILTIN when appropriate. Preserve C_DECL_IN_EXTERNAL_SCOPE. (warn_if_shadowing): Correct indentation. Improve diagnostics. (pushdecl): Remove unnecessary assertion. Short-circuit anonymous decls. Rewrite for new bindings structures. Improve commentary. Eliminate the copy_node call. (implicit_decl_warning): Use the "diag" idiom (as seen in locate_old_decl) to reduce code duplication; call locate_old_decl if appropriate. Relocate to remove need for forward declaration. (implicitly_declare): Adjust for new bindings structures. Kludge around Objective-C not-really-builtin functions. (undeclared_variable): Improve diagnostics. If current_function_decl is nonnull but current_function_scope is null, use current_scope. Use bind. (lookup_tag): Adjust for new bindings structures. Kludge around Objective-C's tag declarations that wind up in the external scope. (lookup_name): Adjust for new bindings structures. Kludge around c-common.c's pseudo-typedefs that wind up in the external scope. (lookup_name_current_level): Rename lookup_name_in_scope; take a second argument indicating the scope to examine; rewrite for new bindings structures. (c_init_decl_processing): Adjust for renamed functions. Do not initialize current_file_decl, first_builtin_decl, last_builtin_decl. First scope pushed is the external scope, not the global scope. (builtin_function): Use bind, not pushdecl. Adjust other bits for new data structures. Keep track of builtins that should be made visible automatically. (start_decl): Adjust diagnostics. Remove unnecessary call to expand_decl. (grokparms): Return 0 if arg_types is error_mark_node. (get_parm_info): Rename "void_at_end" argument to "ellipsis", with reversed sense. Rewrite for new bindings structures. Do not leave any decls in the scope, to prevent pop_scope from doing contradictory things with them. (finish_struct, finish_enum): Remove redundant diagnostics. (build_enumerator): Don't cascade diagnostics for error_mark_node. Mark location where -pedantic changes the meaning of the program. (store_parm_decls_newstyle, store_parm_decls_oldstyle): Load the parameter decls into the function's scope structure using bind. Warn here about function definitions in the wrong style. Adjust diagnostics. (store_parm_decls): Correct the determination of whether a function was defined with a prototype. (c_write_global_declarations): Operate on all file decls and on the external scope. Split body of the loop to... (c_write_global_declarations_1): ... this new function, to avoid code duplication. (truly_local_externals, first_builtin_decl, last_builtin_decl) (make_scope, pop_scope, in_parm_level_p, set_block) (any_external_decl, record_external_decl, bind_label, getdecls) (link_hash_hash, link_hash_eq, merge_translation_unit_decls) (c_reset_state): Delete. (visible_builtins, c_override_global_bindings_to_false) (c_binding, I_SYMBOL_BINDING, I_SYMBOL_DECL, I_TAG_BINDING) (I_TAG_DECL, I_LABEL_BINDING, I_LABEL_DECL, file_scope) (external_scope, binding_freelist, bind, free_binding_and_advance) (push_file_scope, pop_file_scope): New. (pushtag, pushdecl_top_level, lookup_label, declare_label) (define_label, c_make_fname_decl, finish_decl) (mark_forward_parm_decls, build_compound_literal) (grokdeclarator, start_function, check_for_loop_decls) (identifier_global_value, record_builtin_type): Minor adjustments for new bindings structures. Improve diagnostics and commentary. * c-objc-common.c (start_cdtor, finish_cdtor): Adjust calls to pushlevel/poplevel respectively. (c_objc_common_finish_file): Don't call merge_translation_unit_decls. * c-opts.c (c_common_parse_file): Remove spurious ATTRIBUTE_UNUSED. Warn about YYDEBUG not being defined only if -dy. Remove no-longer- correct loop over multiple translation units; call fatal_error if requested to compile more than one file at once. (This disables IMA temporarily - an up-front error being preferable to a crash.) * c-parse.in (pushlevel, poplevel rules): Rename push_scope, pop_scope. (all actions): Adjust calls to pushlevel/poplevel. (parsing_iso_function_signature): Delete. (extdef_1): Fold into extdef. (old_style_parm_decls_1): Fold into old_style_parm_decls. Don't warn here about function definitions in the wrong style. (after_tyle_declarator, parm_declarator_starttypename) (parm_declarator_nostarttypename, notype_declarator): Remove commented-out productions. (parmlist_1, parmlist_2): Use make_node, not tree_cons, to create an empty TREE_LIST node. Adjust calls to get_parm_info. (parmlist_2 : ELLIPSIS): Tag the arg-info block with error_mark_node to suppress -Wold-style-definition after this error. (c_parse_file): Don't clear the binding stack or call finish_fname_decls here. Correct comment. * c-typeck.c (same_translation_unit_p): Export. (common_type): Use c_override_global_bindings_to_false, not pushlevel/poplevel/declare_parm_level. * c-lang.c: Override LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK, and LANG_HOOKS_GETDECLS with do-nothing stubs. * objc/objc-lang.c: Likewise. * objc/objc-act.c: Adjust all calls to pushlevel, poplevel, get_parm_info. (OBJC_VOID_AT_END): Delete; replace all uses with void_list_node. (generate_forward_declaration_to_string_table): Delete. * objc/objc-act.h (OCTI_STRG_DECL, UOBJC_STRINGS_decl): Delete. * coverage.c (create_coverage): Don't pushdecl anything. * langhooks.c (lhd_clear_binding_stack): Call lang_hooks.decls.poplevel, not poplevel. * tree.c (list_length): If ENABLE_TREE_CHECKING, abort on a circular list rather than going into an infinite loop. cp: * cp-lang.c (c_reset_state): Delete. (push_file_scope, pop_file_scope): New stubs. * parser.c (c_parse_file): Call sorry() here if called more than once. testsuite: * gcc.dg/Wold-style-definition-1.c, gcc.dg/builtins-30.c * gcc.dg/unused-4.c, gcc.dg/noncompile/label-1.c * gcc.dg/noncompile/label-lineno-1.c, objc.dg/naming-1.m: Adjust error regexps. * gcc.dg/Wshadow-2.c, gcc.dg/noncompile/incomplete-3.c * gcc.dg/noncompile/undeclared-1.c: New test cases. * gcc.dg/decl-5.c, gcc.dg/redecl-1.c: Remove XFAIL. * gcc.dg/local1.c: Add explanatory comment. From-SVN: r79883
2004-03-24 00:47:53 +01:00
2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* cxx-pretty-print.c (pp_cxx_unqualified_id): Use
TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
* search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
the field is named TEMPLATE_TYPE_PARM_INDEX.
2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/14545
* parser.c (cp_parser_functional_cast): A cast to anything
but integral or enumaration type is not an integral constant
expression.
* pt.c (value_dependent_expression_p): Handle cast expressions
without operands (such as "int()").
2004-03-18 Mark Mitchell <mark@codesourcery.com>
* semantics.c (finish_pseudo_destructor_expr): Allow differing
cv-qualification between the type named by the
pseudo-destructor-name and the object-type.
* search.c (accessible_base_p): Handle non-proper bases.
* name-lookup.c (do_nonmember_using_decl): If a using declaration
refers to a single overloaded function, set the type of the
function.
* tree.c (lvalue_type): Simplify.
* typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
unknown type.
(build_unary_op): Handle OVERLOADs with known types.
* decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
function templates.
* parser.c (cp_parser_postfix_expression): Handle the use of
"typename" in non-dependent contexts. Convert appropriately when
when using a qualified name after "->" or ".".
* call.c (conditional_conversion): Honor the requirement that some
conversions refer to the original object.
2004-03-18 Mark Mitchell <mark@codesourcery.com>
* call.c (build_conditional_expr): Do not call force_rvalue for
operands of void_type when the conditional expression itself has
void type.
* name-lookup.c (pushdecl): Don't consider a declaration of a
function named "main" to be an overload of a type named "main".
* parser.c (cp_parser_template_name): Perform name lookup when the
template name is proceeded by "template" if the qualifying scope
is non-dependent.
* typeck.c (composite_pointer_type_r): Correctly handle
pointer-to-member types.
(build_const_cast): Likewise.
tree.h (TREE_CHECK2, [...]): New macros. * tree.h (TREE_CHECK2, TREE_CHECK3, TREE_CHECK5): New macros. (tree_check2_failed, tree_check3_failed, tree_check5_failed): New decl. (FUNC_OR_METHOD_CHECK, SET_ARRAY_OR_VECTOR_CHECK): New macros. (REC_OR_UNION_CHECK, NUMERICAL_TYPE_CHECK): Likewise. (TYPE_VALUES, TYPE_DOMAIN, TYPE_FIELDS, TYPE_METHODS, TYPE_VFIELD): Protect with proper check. (TYPE_ARG_TYPES, TYPE_METHOD_BASETYPE, TYPE_OFFSET_BASETYPE): Likewise. (TYPE_MIN_VALUE, TYPE_MAX_VALUE): Likewise. * tree.c (type_hash_eq): Rewrite to access proper fields for each type. (tree_check2_failed, tree_check3_failed, tree_check5_failed): New. * c-typeck.c (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES. * dwarf2out.c (gen_enumeration_type_die): Use TYPE_VALUES, not TYPE_FIELDS. * cp/class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS. * cp/error.c (dump_type): Use TYPEOF_TYPE_EXPR. * cp/pt.c (tsubst): Likewise. * cp/semantics.c (finish_typeof): Likewise. * cp/search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE, and TEMPLATE_TYPE_PARM. * cp/typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN. (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES. * java/java-tree.h: Changes throughout to add checking to macros and numerous whitespace changes. (VAR_OR_FIELD_CHECK): New macro. * java/jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC, FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL. * ada/ada-tree.h (TYPE_LEFT_JUSTIFIED_MODULAR_P): Add checking. (TYPE_CONTAINS_TEMPLATE_P, TYPE_OBJECT_RECORD_TYPE): Likewise. (TYPE_RM_SIZE_INT): Directly use type.values. (TREE_LOOP_ID): Clean up check. * ada/decl.c (gnat_to_gnu_entity, case E_Enumeration_Type): Use TYPE_VALUES, not TYPE_FIELDS. * ada/trans.c (convert_with_check): Delay access of bounds of basetype until sure is numeric. From-SVN: r79638
2004-03-18 21:58:49 +01:00
2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
* cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
(DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
(KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
(TYPENAME_TYPE_FULLNAME): Add check and use type.values.
(TYPEOF_TYPE_EXPR): New macro.
tree.h (TREE_CHECK2, [...]): New macros. * tree.h (TREE_CHECK2, TREE_CHECK3, TREE_CHECK5): New macros. (tree_check2_failed, tree_check3_failed, tree_check5_failed): New decl. (FUNC_OR_METHOD_CHECK, SET_ARRAY_OR_VECTOR_CHECK): New macros. (REC_OR_UNION_CHECK, NUMERICAL_TYPE_CHECK): Likewise. (TYPE_VALUES, TYPE_DOMAIN, TYPE_FIELDS, TYPE_METHODS, TYPE_VFIELD): Protect with proper check. (TYPE_ARG_TYPES, TYPE_METHOD_BASETYPE, TYPE_OFFSET_BASETYPE): Likewise. (TYPE_MIN_VALUE, TYPE_MAX_VALUE): Likewise. * tree.c (type_hash_eq): Rewrite to access proper fields for each type. (tree_check2_failed, tree_check3_failed, tree_check5_failed): New. * c-typeck.c (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES. * dwarf2out.c (gen_enumeration_type_die): Use TYPE_VALUES, not TYPE_FIELDS. * cp/class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS. * cp/error.c (dump_type): Use TYPEOF_TYPE_EXPR. * cp/pt.c (tsubst): Likewise. * cp/semantics.c (finish_typeof): Likewise. * cp/search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE, and TEMPLATE_TYPE_PARM. * cp/typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN. (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES. * java/java-tree.h: Changes throughout to add checking to macros and numerous whitespace changes. (VAR_OR_FIELD_CHECK): New macro. * java/jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC, FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL. * ada/ada-tree.h (TYPE_LEFT_JUSTIFIED_MODULAR_P): Add checking. (TYPE_CONTAINS_TEMPLATE_P, TYPE_OBJECT_RECORD_TYPE): Likewise. (TYPE_RM_SIZE_INT): Directly use type.values. (TREE_LOOP_ID): Clean up check. * ada/decl.c (gnat_to_gnu_entity, case E_Enumeration_Type): Use TYPE_VALUES, not TYPE_FIELDS. * ada/trans.c (convert_with_check): Delay access of bounds of basetype until sure is numeric. From-SVN: r79638
2004-03-18 21:58:49 +01:00
* class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
* error.c (dump_type): Use TYPEOF_TYPE_EXPR.
* pt.c (tsubst): Likewise.
* semantics.c (finish_typeof): Likewise.
* search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
and TEMPLATE_TYPE_PARM.
* typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
(build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
2004-03-16 Mark Mitchell <mark@codesourcery.com>
PR c++/14586
* cp-tree.h (build_new_op): Change prototype.
(build_x_binary_op): Likewise.
* call.c (build_new_op): Add overloaded_p parameter.
* decl2.c (grok_array_decl): Adjust call to build_new_op.
* parser.c (cp_parser_binary_expression): Note that uses of
overloaded operators prevents an expression from being considered
an integral constant.
* pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
build_x_binary_op.
* semantics.c (finish_call_expr): Likewise.
* typeck.c (rationalize_conditional_expr): Likewise.
(build_x_indirect_ref): Likewise.
(build_x_binary_op): Likewise.
(build_x_unary_op): Likewise.
(build_x_compound_expr): Likewise.
(build_modify_expr): Likewise.
* typeck2.c (build_x_arrow): Likewise.
2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
* cp-lang.c, ptree.c: Update copyright.
2004-03-13 Mark Mitchell <mark@codesourcery.com>
PR c++/14550
* parser.c (cp_parser_non_integral_constant_expression): Encode
more of the idiom that surrounded calls to this function within
the function itself
(cp_parser_primary_expression): Adjust accordingly.
(cp_parser_postfix_expression): Likewise.
(cp_parser_unary_expression): Likewise.
(cp_parser_cast_expression): Likewise.
(cp_parser_assignment_expression): Likewise.
(cp_parser_expression): Likewise.
(cp_parser_new_expression): Note that new-expressions are not
allowed in integral constant expressions.
(cp_parser_delete_expression): Likewise.
Enabled linkonce support for Darwin. * target.h (struct gcc_target): New target hook, unwind_label. * target-def.h (TARGET_ASM_EMIT_UNWIND_LABEL): New hook. * output.h (default_emit_unwind_label): New function. * default.h (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): New macro. (TARGET_USES_WEAK_UNWIND_INFO): New target macro. (TARGET_SUPPORTS_HIDDEN): New target macro. * dwarf2out.c (struct dw_fde_struct): Add field for function decl that corresponds to this FDE. (FRAME_BEGIN_LABEL): Allow target to override default label. (output_call_frame_info): If FDEs are linknonce, then use extra indirection for FDE encoding, output a label for each FDE, and output an empty label for each function without an FDE. (dwarf2out_begin_prologue): Set up decl field when creating an FDE. * varasm.c (globalize_decl): Call ASM_MAKE_LABEL_LINKONCE for decls with DECL_ONE_ONLY set, if that macro is defined. (make_decl_one_only): Don't use DECL_COMMON if we're compiling for a SUPPORTS_ONE_ONLY target. * config/darwin-protos.h (darwin_unique_section): Declare. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_make_decl_one_only): Likewise. * config/darwin.c (machopic_finish): Get rid of tweak that eliminate stubs for symbols that are defined. (darwin_encode_section_info): Don't treat weak functions as defined. (darwin_make_decl_one_only): Define. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_unique_section): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_asm_output_dwarf_delta): Difference between two labels is local only if both labels are local. * config/darwin.h (MAKE_DECL_ONE_ONLY): Define. (ASM_MAKE_LABEL_LINKONCE): Likewise. (TARGET_SUPPORTS_HIDDEN): Likewise. (TARGET_USES_WEAK_UNWIND_INFO): Likewise. (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): Likewise. (FRAME_BEGIN_LABEL): Likewise. (ASM_DECLARE_OBJECT_NAME): Make references to weak symbols indirect. (ASM_DECLARE_FUNCTION_NAME): Likewise. (darwin_eh_frame_section): Give __eh_frame section the coalesced flag. (TARGET_ASM_UNIQUE_SECTION): Define. (EH_FRAME_SECTION_NAME): Define. (EH_FRAME_SECTION_ATTR): Likewise. (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Likewise. (TARGET_ASM_NAMED_SECTION): Likewise. (TARGET_SECTION_TYPE_FLAGS): Likewise. * doc/tm.texi: Document TARGET_USES_WEAK_UNWIND_INFO, TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY, TARGET_SUPPORTS_HIDDEN, TARGET_ASM_EMIT_UNWIND_LABEL. * cp/decl2.c (maybe_make_one_only): Look at TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether to make an explicit instantiation weak. * cp/method.c (use_thunk): Make sure we call comdat_linkage when appropriate. * cp/pt.c (do_type_instantiation): On systems where weak symbols don't go in a static archive's TOC, explicit instantiation of a class must imply *explicit* instantiation of its memeber. From-SVN: r79394
2004-03-12 18:09:03 +01:00
2004-03-12 Matt Austern <austern@apple.com>
* decl2.c (maybe_make_one_only): Look at
TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
to make an explicit instantiation weak.
* method.c (use_thunk): Make sure we call comdat_linkage
when appropriate.
* pt.c (do_type_instantiation): On systems where weak symbols
don't go in a static archive's TOC, explicit instantiation of a
class must imply *explicit* instantiation of its memeber.
PR 12267, 12391, 12560, 13129, 14114, 14113 * c-tree.h: Forward declare struct c_binding. Declare c_override_bindings_to_false. Update prototypes. (struct lang_identifier): Update comments. Change fields to be struct c_binding *. (IDENTIFIER_SYMBOL_VALUE, IDENTIFIER_TAG_VALUE) (IDENTIFIER_LABEL_VALUE, C_DECL_INVISIBLE) (KEEP_NO, KEEP_YES, KEEP_MAYBE): Delete. (C_DECL_IN_EXTERNAL_SCOPE, C_DECL_DECLARED_BUILTIN): New. * c-common.h: Update prototypes. * c-decl.c (struct c_scope): Update commentary. Remove names, names_last, parms, parms_last, tags, and shadowed fields. Add bindings and depth fields. (scope_freelist): Move to more appropriate location. (c_print_identifier): Update for changes to struct lang_identifier. (objc_mark_locals_volatile): Update for new bindings structures. (global_bindings_p): Honor c_override_global_bindings_to_false. (pushlevel): Rename to push_scope; take no arguments; use the scope_freelist; initialize scope->depth and check for overflow. (poplevel): Rename to pop_scope; totally rewritten for new bindings structures. (diagnose_mismatched_decls): Use C_DECL_DECLARED_BUILTIN, not C_DECL_INVISIBLE, for certain decisions. Adjust some diagnostics. Improve some commentary. Adjust handling of forward parm decls. (merge_decls): Set C_DECL_DECLARED_BUILTIN when appropriate. Preserve C_DECL_IN_EXTERNAL_SCOPE. (warn_if_shadowing): Correct indentation. Improve diagnostics. (pushdecl): Remove unnecessary assertion. Short-circuit anonymous decls. Rewrite for new bindings structures. Improve commentary. Eliminate the copy_node call. (implicit_decl_warning): Use the "diag" idiom (as seen in locate_old_decl) to reduce code duplication; call locate_old_decl if appropriate. Relocate to remove need for forward declaration. (implicitly_declare): Adjust for new bindings structures. Kludge around Objective-C not-really-builtin functions. (undeclared_variable): Improve diagnostics. If current_function_decl is nonnull but current_function_scope is null, use current_scope. Use bind. (lookup_tag): Adjust for new bindings structures. Kludge around Objective-C's tag declarations that wind up in the external scope. (lookup_name): Adjust for new bindings structures. Kludge around c-common.c's pseudo-typedefs that wind up in the external scope. (lookup_name_current_level): Rename lookup_name_in_scope; take a second argument indicating the scope to examine; rewrite for new bindings structures. (c_init_decl_processing): Adjust for renamed functions. Do not initialize current_file_decl, first_builtin_decl, last_builtin_decl. First scope pushed is the external scope, not the global scope. (builtin_function): Use bind, not pushdecl. Adjust other bits for new data structures. Keep track of builtins that should be made visible automatically. (start_decl): Adjust diagnostics. Remove unnecessary call to expand_decl. (grokparms): Return 0 if arg_types is error_mark_node. (get_parm_info): Rename "void_at_end" argument to "ellipsis", with reversed sense. Rewrite for new bindings structures. Do not leave any decls in the scope, to prevent pop_scope from doing contradictory things with them. (finish_struct, finish_enum): Remove redundant diagnostics. (build_enumerator): Don't cascade diagnostics for error_mark_node. Mark location where -pedantic changes the meaning of the program. (store_parm_decls_newstyle, store_parm_decls_oldstyle): Load the parameter decls into the function's scope structure using bind. Warn here about function definitions in the wrong style. Adjust diagnostics. (store_parm_decls): Correct the determination of whether a function was defined with a prototype. (c_write_global_declarations): Operate on all file decls and on the external scope. Split body of the loop to... (c_write_global_declarations_1): ... this new function, to avoid code duplication. (truly_local_externals, first_builtin_decl, last_builtin_decl) (make_scope, pop_scope, in_parm_level_p, set_block) (any_external_decl, record_external_decl, bind_label, getdecls) (link_hash_hash, link_hash_eq, merge_translation_unit_decls) (c_reset_state): Delete. (visible_builtins, c_override_global_bindings_to_false) (c_binding, I_SYMBOL_BINDING, I_SYMBOL_DECL, I_TAG_BINDING) (I_TAG_DECL, I_LABEL_BINDING, I_LABEL_DECL, file_scope) (external_scope, binding_freelist, bind, free_binding_and_advance) (push_file_scope, pop_file_scope): New. (pushtag, pushdecl_top_level, lookup_label, declare_label) (define_label, c_make_fname_decl, finish_decl) (mark_forward_parm_decls, build_compound_literal) (grokdeclarator, start_function, check_for_loop_decls) (identifier_global_value, record_builtin_type): Minor adjustments for new bindings structures. Improve diagnostics and commentary. * c-objc-common.c (start_cdtor, finish_cdtor): Adjust calls to pushlevel/poplevel respectively. (c_objc_common_finish_file): Don't call merge_translation_unit_decls. * c-opts.c (c_common_parse_file): Remove spurious ATTRIBUTE_UNUSED. Warn about YYDEBUG not being defined only if -dy. Remove no-longer- correct loop over multiple translation units; call fatal_error if requested to compile more than one file at once. (This disables IMA temporarily - an up-front error being preferable to a crash.) * c-parse.in (pushlevel, poplevel rules): Rename push_scope, pop_scope. (all actions): Adjust calls to pushlevel/poplevel. (parsing_iso_function_signature): Delete. (extdef_1): Fold into extdef. (old_style_parm_decls_1): Fold into old_style_parm_decls. Don't warn here about function definitions in the wrong style. (after_tyle_declarator, parm_declarator_starttypename) (parm_declarator_nostarttypename, notype_declarator): Remove commented-out productions. (parmlist_1, parmlist_2): Use make_node, not tree_cons, to create an empty TREE_LIST node. Adjust calls to get_parm_info. (parmlist_2 : ELLIPSIS): Tag the arg-info block with error_mark_node to suppress -Wold-style-definition after this error. (c_parse_file): Don't clear the binding stack or call finish_fname_decls here. Correct comment. * c-typeck.c (same_translation_unit_p): Export. (common_type): Use c_override_global_bindings_to_false, not pushlevel/poplevel/declare_parm_level. * c-lang.c: Override LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK, and LANG_HOOKS_GETDECLS with do-nothing stubs. * objc/objc-lang.c: Likewise. * objc/objc-act.c: Adjust all calls to pushlevel, poplevel, get_parm_info. (OBJC_VOID_AT_END): Delete; replace all uses with void_list_node. (generate_forward_declaration_to_string_table): Delete. * objc/objc-act.h (OCTI_STRG_DECL, UOBJC_STRINGS_decl): Delete. * coverage.c (create_coverage): Don't pushdecl anything. * langhooks.c (lhd_clear_binding_stack): Call lang_hooks.decls.poplevel, not poplevel. * tree.c (list_length): If ENABLE_TREE_CHECKING, abort on a circular list rather than going into an infinite loop. cp: * cp-lang.c (c_reset_state): Delete. (push_file_scope, pop_file_scope): New stubs. * parser.c (c_parse_file): Call sorry() here if called more than once. testsuite: * gcc.dg/Wold-style-definition-1.c, gcc.dg/builtins-30.c * gcc.dg/unused-4.c, gcc.dg/noncompile/label-1.c * gcc.dg/noncompile/label-lineno-1.c, objc.dg/naming-1.m: Adjust error regexps. * gcc.dg/Wshadow-2.c, gcc.dg/noncompile/incomplete-3.c * gcc.dg/noncompile/undeclared-1.c: New test cases. * gcc.dg/decl-5.c, gcc.dg/redecl-1.c: Remove XFAIL. * gcc.dg/local1.c: Add explanatory comment. From-SVN: r79883
2004-03-24 00:47:53 +01:00
2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
* call.c, cp-tree.h, pt.c: Fix comment typos.
2004-03-10 Mark Mitchell <mark@codesourcery.com>
PR c++/14510
* decl.c (xref_tag): Disregard non-type declarations when
PR 12267, 12391, 12560, 13129, 14114, 14113 * c-tree.h: Forward declare struct c_binding. Declare c_override_bindings_to_false. Update prototypes. (struct lang_identifier): Update comments. Change fields to be struct c_binding *. (IDENTIFIER_SYMBOL_VALUE, IDENTIFIER_TAG_VALUE) (IDENTIFIER_LABEL_VALUE, C_DECL_INVISIBLE) (KEEP_NO, KEEP_YES, KEEP_MAYBE): Delete. (C_DECL_IN_EXTERNAL_SCOPE, C_DECL_DECLARED_BUILTIN): New. * c-common.h: Update prototypes. * c-decl.c (struct c_scope): Update commentary. Remove names, names_last, parms, parms_last, tags, and shadowed fields. Add bindings and depth fields. (scope_freelist): Move to more appropriate location. (c_print_identifier): Update for changes to struct lang_identifier. (objc_mark_locals_volatile): Update for new bindings structures. (global_bindings_p): Honor c_override_global_bindings_to_false. (pushlevel): Rename to push_scope; take no arguments; use the scope_freelist; initialize scope->depth and check for overflow. (poplevel): Rename to pop_scope; totally rewritten for new bindings structures. (diagnose_mismatched_decls): Use C_DECL_DECLARED_BUILTIN, not C_DECL_INVISIBLE, for certain decisions. Adjust some diagnostics. Improve some commentary. Adjust handling of forward parm decls. (merge_decls): Set C_DECL_DECLARED_BUILTIN when appropriate. Preserve C_DECL_IN_EXTERNAL_SCOPE. (warn_if_shadowing): Correct indentation. Improve diagnostics. (pushdecl): Remove unnecessary assertion. Short-circuit anonymous decls. Rewrite for new bindings structures. Improve commentary. Eliminate the copy_node call. (implicit_decl_warning): Use the "diag" idiom (as seen in locate_old_decl) to reduce code duplication; call locate_old_decl if appropriate. Relocate to remove need for forward declaration. (implicitly_declare): Adjust for new bindings structures. Kludge around Objective-C not-really-builtin functions. (undeclared_variable): Improve diagnostics. If current_function_decl is nonnull but current_function_scope is null, use current_scope. Use bind. (lookup_tag): Adjust for new bindings structures. Kludge around Objective-C's tag declarations that wind up in the external scope. (lookup_name): Adjust for new bindings structures. Kludge around c-common.c's pseudo-typedefs that wind up in the external scope. (lookup_name_current_level): Rename lookup_name_in_scope; take a second argument indicating the scope to examine; rewrite for new bindings structures. (c_init_decl_processing): Adjust for renamed functions. Do not initialize current_file_decl, first_builtin_decl, last_builtin_decl. First scope pushed is the external scope, not the global scope. (builtin_function): Use bind, not pushdecl. Adjust other bits for new data structures. Keep track of builtins that should be made visible automatically. (start_decl): Adjust diagnostics. Remove unnecessary call to expand_decl. (grokparms): Return 0 if arg_types is error_mark_node. (get_parm_info): Rename "void_at_end" argument to "ellipsis", with reversed sense. Rewrite for new bindings structures. Do not leave any decls in the scope, to prevent pop_scope from doing contradictory things with them. (finish_struct, finish_enum): Remove redundant diagnostics. (build_enumerator): Don't cascade diagnostics for error_mark_node. Mark location where -pedantic changes the meaning of the program. (store_parm_decls_newstyle, store_parm_decls_oldstyle): Load the parameter decls into the function's scope structure using bind. Warn here about function definitions in the wrong style. Adjust diagnostics. (store_parm_decls): Correct the determination of whether a function was defined with a prototype. (c_write_global_declarations): Operate on all file decls and on the external scope. Split body of the loop to... (c_write_global_declarations_1): ... this new function, to avoid code duplication. (truly_local_externals, first_builtin_decl, last_builtin_decl) (make_scope, pop_scope, in_parm_level_p, set_block) (any_external_decl, record_external_decl, bind_label, getdecls) (link_hash_hash, link_hash_eq, merge_translation_unit_decls) (c_reset_state): Delete. (visible_builtins, c_override_global_bindings_to_false) (c_binding, I_SYMBOL_BINDING, I_SYMBOL_DECL, I_TAG_BINDING) (I_TAG_DECL, I_LABEL_BINDING, I_LABEL_DECL, file_scope) (external_scope, binding_freelist, bind, free_binding_and_advance) (push_file_scope, pop_file_scope): New. (pushtag, pushdecl_top_level, lookup_label, declare_label) (define_label, c_make_fname_decl, finish_decl) (mark_forward_parm_decls, build_compound_literal) (grokdeclarator, start_function, check_for_loop_decls) (identifier_global_value, record_builtin_type): Minor adjustments for new bindings structures. Improve diagnostics and commentary. * c-objc-common.c (start_cdtor, finish_cdtor): Adjust calls to pushlevel/poplevel respectively. (c_objc_common_finish_file): Don't call merge_translation_unit_decls. * c-opts.c (c_common_parse_file): Remove spurious ATTRIBUTE_UNUSED. Warn about YYDEBUG not being defined only if -dy. Remove no-longer- correct loop over multiple translation units; call fatal_error if requested to compile more than one file at once. (This disables IMA temporarily - an up-front error being preferable to a crash.) * c-parse.in (pushlevel, poplevel rules): Rename push_scope, pop_scope. (all actions): Adjust calls to pushlevel/poplevel. (parsing_iso_function_signature): Delete. (extdef_1): Fold into extdef. (old_style_parm_decls_1): Fold into old_style_parm_decls. Don't warn here about function definitions in the wrong style. (after_tyle_declarator, parm_declarator_starttypename) (parm_declarator_nostarttypename, notype_declarator): Remove commented-out productions. (parmlist_1, parmlist_2): Use make_node, not tree_cons, to create an empty TREE_LIST node. Adjust calls to get_parm_info. (parmlist_2 : ELLIPSIS): Tag the arg-info block with error_mark_node to suppress -Wold-style-definition after this error. (c_parse_file): Don't clear the binding stack or call finish_fname_decls here. Correct comment. * c-typeck.c (same_translation_unit_p): Export. (common_type): Use c_override_global_bindings_to_false, not pushlevel/poplevel/declare_parm_level. * c-lang.c: Override LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK, and LANG_HOOKS_GETDECLS with do-nothing stubs. * objc/objc-lang.c: Likewise. * objc/objc-act.c: Adjust all calls to pushlevel, poplevel, get_parm_info. (OBJC_VOID_AT_END): Delete; replace all uses with void_list_node. (generate_forward_declaration_to_string_table): Delete. * objc/objc-act.h (OCTI_STRG_DECL, UOBJC_STRINGS_decl): Delete. * coverage.c (create_coverage): Don't pushdecl anything. * langhooks.c (lhd_clear_binding_stack): Call lang_hooks.decls.poplevel, not poplevel. * tree.c (list_length): If ENABLE_TREE_CHECKING, abort on a circular list rather than going into an infinite loop. cp: * cp-lang.c (c_reset_state): Delete. (push_file_scope, pop_file_scope): New stubs. * parser.c (c_parse_file): Call sorry() here if called more than once. testsuite: * gcc.dg/Wold-style-definition-1.c, gcc.dg/builtins-30.c * gcc.dg/unused-4.c, gcc.dg/noncompile/label-1.c * gcc.dg/noncompile/label-lineno-1.c, objc.dg/naming-1.m: Adjust error regexps. * gcc.dg/Wshadow-2.c, gcc.dg/noncompile/incomplete-3.c * gcc.dg/noncompile/undeclared-1.c: New test cases. * gcc.dg/decl-5.c, gcc.dg/redecl-1.c: Remove XFAIL. * gcc.dg/local1.c: Add explanatory comment. From-SVN: r79883
2004-03-24 00:47:53 +01:00
looking up a tagged type.
2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
PR c++/14397
* call.c (convert_like_real): Build a const qualified temporary,
when testing ctor access.
2004-03-09 Mark Mitchell <mark@codesourcery.com>
* call.c (initialize_reference): Fix typo.
2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/14409
* pt.c (determine_specialization): For member templates, match also
constness.
PR c++/14448
* parser.c (cp_parser_initializer_clause): Fold initializer if it is
non-dependent.
* pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
2004-03-09 Mark Mitchell <mark@codesourcery.com>
PR c++/14230
* call.c (initialize_reference): Handle initializers that are
class-member access expressions applies to rvalues.
2004-03-09 Mark Mitchell <mark@codesourcery.com>
PR c++/14432
* name-lookup.c (supplement_binding): Ignore functions that are
marked DECL_ANTICIPATED.
2004-03-08 Mark Mitchell <mark@codesourcery.com>
PR c++/14401
* class.c (check_field_decls): Complain about non-static data
members of reference type in unions. Propagate
CLASSTYPE_REF_FIELDS_NEED_INIT and
CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
data members.
* init.c (perform_member_init): Complain about mbmers with const
type that are not explicitly initialized.
2004-03-08 Mark Mitchell <mark@codesourcery.com>
* class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
* cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
(lang_identifier): Remove implicit_decl and error_locus.
(IDENTIFIER_IMPLICIT_DECL): Remove.
(SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
(IDENTIFIER_ERROR_LOCUS): Likewise.
(SET_IDENTIFIER_ERROR_LOCUS): Likewise.
(TYPE_ASSEMBLER_NAME_STRING): Likewise.
(TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
(implicitly_declare): Remove.
* decl.c (warn_extern_redeclared_static): Remove check of
IDENTIFIER_IMPLICIT_DECL.
(duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
(implicitly_declare): Remove.
(grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
(start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
(start_method): Don't check IDENTIFIER_ERROR_LOCUS.
* lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
in the innermost scope, rather than at namespace scope.
* name-lookup.c (push_local_binding): Give it external linkage.
(pushdecl): Remove dead code.
* name-lookup.h (push_local_binding): Declare it.
* ptree.c (cxx_print_identifier): Don't print
IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
* search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
not IDENTIFIER_ERROR_LOCUS.
* typeck.c (build_function_call): Remove dead code.
2004-03-08 Jason Merrill <jason@redhat.com>
PR c++/13170
* decl.c (xref_tag): Remove attribute handling.
* cp-tree.h: Adjust prototype.
* decl.c, parser.c, rtti.c: Adjust callers.
* parser.c (cp_parser_class_head): Pass back attributes in the
class head.
(cp_parser_class_specifier): Adjust.
2004-03-08 Matt Austern <austern@apple.com>
PR debug/14079
* name-lookup.c (add_decl_to_level): Add extern variables, as well
as static, to static_decls array.
PR 12267, 12391, 12560, 13129, 14114, 14113 * c-tree.h: Forward declare struct c_binding. Declare c_override_bindings_to_false. Update prototypes. (struct lang_identifier): Update comments. Change fields to be struct c_binding *. (IDENTIFIER_SYMBOL_VALUE, IDENTIFIER_TAG_VALUE) (IDENTIFIER_LABEL_VALUE, C_DECL_INVISIBLE) (KEEP_NO, KEEP_YES, KEEP_MAYBE): Delete. (C_DECL_IN_EXTERNAL_SCOPE, C_DECL_DECLARED_BUILTIN): New. * c-common.h: Update prototypes. * c-decl.c (struct c_scope): Update commentary. Remove names, names_last, parms, parms_last, tags, and shadowed fields. Add bindings and depth fields. (scope_freelist): Move to more appropriate location. (c_print_identifier): Update for changes to struct lang_identifier. (objc_mark_locals_volatile): Update for new bindings structures. (global_bindings_p): Honor c_override_global_bindings_to_false. (pushlevel): Rename to push_scope; take no arguments; use the scope_freelist; initialize scope->depth and check for overflow. (poplevel): Rename to pop_scope; totally rewritten for new bindings structures. (diagnose_mismatched_decls): Use C_DECL_DECLARED_BUILTIN, not C_DECL_INVISIBLE, for certain decisions. Adjust some diagnostics. Improve some commentary. Adjust handling of forward parm decls. (merge_decls): Set C_DECL_DECLARED_BUILTIN when appropriate. Preserve C_DECL_IN_EXTERNAL_SCOPE. (warn_if_shadowing): Correct indentation. Improve diagnostics. (pushdecl): Remove unnecessary assertion. Short-circuit anonymous decls. Rewrite for new bindings structures. Improve commentary. Eliminate the copy_node call. (implicit_decl_warning): Use the "diag" idiom (as seen in locate_old_decl) to reduce code duplication; call locate_old_decl if appropriate. Relocate to remove need for forward declaration. (implicitly_declare): Adjust for new bindings structures. Kludge around Objective-C not-really-builtin functions. (undeclared_variable): Improve diagnostics. If current_function_decl is nonnull but current_function_scope is null, use current_scope. Use bind. (lookup_tag): Adjust for new bindings structures. Kludge around Objective-C's tag declarations that wind up in the external scope. (lookup_name): Adjust for new bindings structures. Kludge around c-common.c's pseudo-typedefs that wind up in the external scope. (lookup_name_current_level): Rename lookup_name_in_scope; take a second argument indicating the scope to examine; rewrite for new bindings structures. (c_init_decl_processing): Adjust for renamed functions. Do not initialize current_file_decl, first_builtin_decl, last_builtin_decl. First scope pushed is the external scope, not the global scope. (builtin_function): Use bind, not pushdecl. Adjust other bits for new data structures. Keep track of builtins that should be made visible automatically. (start_decl): Adjust diagnostics. Remove unnecessary call to expand_decl. (grokparms): Return 0 if arg_types is error_mark_node. (get_parm_info): Rename "void_at_end" argument to "ellipsis", with reversed sense. Rewrite for new bindings structures. Do not leave any decls in the scope, to prevent pop_scope from doing contradictory things with them. (finish_struct, finish_enum): Remove redundant diagnostics. (build_enumerator): Don't cascade diagnostics for error_mark_node. Mark location where -pedantic changes the meaning of the program. (store_parm_decls_newstyle, store_parm_decls_oldstyle): Load the parameter decls into the function's scope structure using bind. Warn here about function definitions in the wrong style. Adjust diagnostics. (store_parm_decls): Correct the determination of whether a function was defined with a prototype. (c_write_global_declarations): Operate on all file decls and on the external scope. Split body of the loop to... (c_write_global_declarations_1): ... this new function, to avoid code duplication. (truly_local_externals, first_builtin_decl, last_builtin_decl) (make_scope, pop_scope, in_parm_level_p, set_block) (any_external_decl, record_external_decl, bind_label, getdecls) (link_hash_hash, link_hash_eq, merge_translation_unit_decls) (c_reset_state): Delete. (visible_builtins, c_override_global_bindings_to_false) (c_binding, I_SYMBOL_BINDING, I_SYMBOL_DECL, I_TAG_BINDING) (I_TAG_DECL, I_LABEL_BINDING, I_LABEL_DECL, file_scope) (external_scope, binding_freelist, bind, free_binding_and_advance) (push_file_scope, pop_file_scope): New. (pushtag, pushdecl_top_level, lookup_label, declare_label) (define_label, c_make_fname_decl, finish_decl) (mark_forward_parm_decls, build_compound_literal) (grokdeclarator, start_function, check_for_loop_decls) (identifier_global_value, record_builtin_type): Minor adjustments for new bindings structures. Improve diagnostics and commentary. * c-objc-common.c (start_cdtor, finish_cdtor): Adjust calls to pushlevel/poplevel respectively. (c_objc_common_finish_file): Don't call merge_translation_unit_decls. * c-opts.c (c_common_parse_file): Remove spurious ATTRIBUTE_UNUSED. Warn about YYDEBUG not being defined only if -dy. Remove no-longer- correct loop over multiple translation units; call fatal_error if requested to compile more than one file at once. (This disables IMA temporarily - an up-front error being preferable to a crash.) * c-parse.in (pushlevel, poplevel rules): Rename push_scope, pop_scope. (all actions): Adjust calls to pushlevel/poplevel. (parsing_iso_function_signature): Delete. (extdef_1): Fold into extdef. (old_style_parm_decls_1): Fold into old_style_parm_decls. Don't warn here about function definitions in the wrong style. (after_tyle_declarator, parm_declarator_starttypename) (parm_declarator_nostarttypename, notype_declarator): Remove commented-out productions. (parmlist_1, parmlist_2): Use make_node, not tree_cons, to create an empty TREE_LIST node. Adjust calls to get_parm_info. (parmlist_2 : ELLIPSIS): Tag the arg-info block with error_mark_node to suppress -Wold-style-definition after this error. (c_parse_file): Don't clear the binding stack or call finish_fname_decls here. Correct comment. * c-typeck.c (same_translation_unit_p): Export. (common_type): Use c_override_global_bindings_to_false, not pushlevel/poplevel/declare_parm_level. * c-lang.c: Override LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK, and LANG_HOOKS_GETDECLS with do-nothing stubs. * objc/objc-lang.c: Likewise. * objc/objc-act.c: Adjust all calls to pushlevel, poplevel, get_parm_info. (OBJC_VOID_AT_END): Delete; replace all uses with void_list_node. (generate_forward_declaration_to_string_table): Delete. * objc/objc-act.h (OCTI_STRG_DECL, UOBJC_STRINGS_decl): Delete. * coverage.c (create_coverage): Don't pushdecl anything. * langhooks.c (lhd_clear_binding_stack): Call lang_hooks.decls.poplevel, not poplevel. * tree.c (list_length): If ENABLE_TREE_CHECKING, abort on a circular list rather than going into an infinite loop. cp: * cp-lang.c (c_reset_state): Delete. (push_file_scope, pop_file_scope): New stubs. * parser.c (c_parse_file): Call sorry() here if called more than once. testsuite: * gcc.dg/Wold-style-definition-1.c, gcc.dg/builtins-30.c * gcc.dg/unused-4.c, gcc.dg/noncompile/label-1.c * gcc.dg/noncompile/label-lineno-1.c, objc.dg/naming-1.m: Adjust error regexps. * gcc.dg/Wshadow-2.c, gcc.dg/noncompile/incomplete-3.c * gcc.dg/noncompile/undeclared-1.c: New test cases. * gcc.dg/decl-5.c, gcc.dg/redecl-1.c: Remove XFAIL. * gcc.dg/local1.c: Add explanatory comment. From-SVN: r79883
2004-03-24 00:47:53 +01:00
2004-03-05 Jason Merrill <jason@redhat.com>
* tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
2004-03-04 Geoffrey Keating <geoffk@apple.com>
* decl.c (grokfndecl): Update old incorrect comment.
(grokvardecl): Diagnose C++ variables of type with no linkage.
2004-03-01 Mark Mitchell <mark@codesourcery.com>
PR c++/14369
* pt.c (build_non_dependent_expr): Do not create a
NON_DEPENDENT_EXPR for a THROW_EXPR.
2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
PR c++/14369
* error.c (dump_expr): Handle THROW_EXPR.
2004-03-01 Mark Mitchell <mark@codesourcery.com>
PR c++/14360
* parser.c (cp_parser_postfix_expression): Do not perform Koenig
lookup if ordinary name-lookup finds a non-function.
* pt.c (tsubst_copy_and_build): Likewise.
PR c++/14361
* parser.c (cp_parser_late_parsing_default_args): Check that there
are no extra tokens after the end of the default-argument
expression.
PR 12267, 12391, 12560, 13129, 14114, 14113 * c-tree.h: Forward declare struct c_binding. Declare c_override_bindings_to_false. Update prototypes. (struct lang_identifier): Update comments. Change fields to be struct c_binding *. (IDENTIFIER_SYMBOL_VALUE, IDENTIFIER_TAG_VALUE) (IDENTIFIER_LABEL_VALUE, C_DECL_INVISIBLE) (KEEP_NO, KEEP_YES, KEEP_MAYBE): Delete. (C_DECL_IN_EXTERNAL_SCOPE, C_DECL_DECLARED_BUILTIN): New. * c-common.h: Update prototypes. * c-decl.c (struct c_scope): Update commentary. Remove names, names_last, parms, parms_last, tags, and shadowed fields. Add bindings and depth fields. (scope_freelist): Move to more appropriate location. (c_print_identifier): Update for changes to struct lang_identifier. (objc_mark_locals_volatile): Update for new bindings structures. (global_bindings_p): Honor c_override_global_bindings_to_false. (pushlevel): Rename to push_scope; take no arguments; use the scope_freelist; initialize scope->depth and check for overflow. (poplevel): Rename to pop_scope; totally rewritten for new bindings structures. (diagnose_mismatched_decls): Use C_DECL_DECLARED_BUILTIN, not C_DECL_INVISIBLE, for certain decisions. Adjust some diagnostics. Improve some commentary. Adjust handling of forward parm decls. (merge_decls): Set C_DECL_DECLARED_BUILTIN when appropriate. Preserve C_DECL_IN_EXTERNAL_SCOPE. (warn_if_shadowing): Correct indentation. Improve diagnostics. (pushdecl): Remove unnecessary assertion. Short-circuit anonymous decls. Rewrite for new bindings structures. Improve commentary. Eliminate the copy_node call. (implicit_decl_warning): Use the "diag" idiom (as seen in locate_old_decl) to reduce code duplication; call locate_old_decl if appropriate. Relocate to remove need for forward declaration. (implicitly_declare): Adjust for new bindings structures. Kludge around Objective-C not-really-builtin functions. (undeclared_variable): Improve diagnostics. If current_function_decl is nonnull but current_function_scope is null, use current_scope. Use bind. (lookup_tag): Adjust for new bindings structures. Kludge around Objective-C's tag declarations that wind up in the external scope. (lookup_name): Adjust for new bindings structures. Kludge around c-common.c's pseudo-typedefs that wind up in the external scope. (lookup_name_current_level): Rename lookup_name_in_scope; take a second argument indicating the scope to examine; rewrite for new bindings structures. (c_init_decl_processing): Adjust for renamed functions. Do not initialize current_file_decl, first_builtin_decl, last_builtin_decl. First scope pushed is the external scope, not the global scope. (builtin_function): Use bind, not pushdecl. Adjust other bits for new data structures. Keep track of builtins that should be made visible automatically. (start_decl): Adjust diagnostics. Remove unnecessary call to expand_decl. (grokparms): Return 0 if arg_types is error_mark_node. (get_parm_info): Rename "void_at_end" argument to "ellipsis", with reversed sense. Rewrite for new bindings structures. Do not leave any decls in the scope, to prevent pop_scope from doing contradictory things with them. (finish_struct, finish_enum): Remove redundant diagnostics. (build_enumerator): Don't cascade diagnostics for error_mark_node. Mark location where -pedantic changes the meaning of the program. (store_parm_decls_newstyle, store_parm_decls_oldstyle): Load the parameter decls into the function's scope structure using bind. Warn here about function definitions in the wrong style. Adjust diagnostics. (store_parm_decls): Correct the determination of whether a function was defined with a prototype. (c_write_global_declarations): Operate on all file decls and on the external scope. Split body of the loop to... (c_write_global_declarations_1): ... this new function, to avoid code duplication. (truly_local_externals, first_builtin_decl, last_builtin_decl) (make_scope, pop_scope, in_parm_level_p, set_block) (any_external_decl, record_external_decl, bind_label, getdecls) (link_hash_hash, link_hash_eq, merge_translation_unit_decls) (c_reset_state): Delete. (visible_builtins, c_override_global_bindings_to_false) (c_binding, I_SYMBOL_BINDING, I_SYMBOL_DECL, I_TAG_BINDING) (I_TAG_DECL, I_LABEL_BINDING, I_LABEL_DECL, file_scope) (external_scope, binding_freelist, bind, free_binding_and_advance) (push_file_scope, pop_file_scope): New. (pushtag, pushdecl_top_level, lookup_label, declare_label) (define_label, c_make_fname_decl, finish_decl) (mark_forward_parm_decls, build_compound_literal) (grokdeclarator, start_function, check_for_loop_decls) (identifier_global_value, record_builtin_type): Minor adjustments for new bindings structures. Improve diagnostics and commentary. * c-objc-common.c (start_cdtor, finish_cdtor): Adjust calls to pushlevel/poplevel respectively. (c_objc_common_finish_file): Don't call merge_translation_unit_decls. * c-opts.c (c_common_parse_file): Remove spurious ATTRIBUTE_UNUSED. Warn about YYDEBUG not being defined only if -dy. Remove no-longer- correct loop over multiple translation units; call fatal_error if requested to compile more than one file at once. (This disables IMA temporarily - an up-front error being preferable to a crash.) * c-parse.in (pushlevel, poplevel rules): Rename push_scope, pop_scope. (all actions): Adjust calls to pushlevel/poplevel. (parsing_iso_function_signature): Delete. (extdef_1): Fold into extdef. (old_style_parm_decls_1): Fold into old_style_parm_decls. Don't warn here about function definitions in the wrong style. (after_tyle_declarator, parm_declarator_starttypename) (parm_declarator_nostarttypename, notype_declarator): Remove commented-out productions. (parmlist_1, parmlist_2): Use make_node, not tree_cons, to create an empty TREE_LIST node. Adjust calls to get_parm_info. (parmlist_2 : ELLIPSIS): Tag the arg-info block with error_mark_node to suppress -Wold-style-definition after this error. (c_parse_file): Don't clear the binding stack or call finish_fname_decls here. Correct comment. * c-typeck.c (same_translation_unit_p): Export. (common_type): Use c_override_global_bindings_to_false, not pushlevel/poplevel/declare_parm_level. * c-lang.c: Override LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK, and LANG_HOOKS_GETDECLS with do-nothing stubs. * objc/objc-lang.c: Likewise. * objc/objc-act.c: Adjust all calls to pushlevel, poplevel, get_parm_info. (OBJC_VOID_AT_END): Delete; replace all uses with void_list_node. (generate_forward_declaration_to_string_table): Delete. * objc/objc-act.h (OCTI_STRG_DECL, UOBJC_STRINGS_decl): Delete. * coverage.c (create_coverage): Don't pushdecl anything. * langhooks.c (lhd_clear_binding_stack): Call lang_hooks.decls.poplevel, not poplevel. * tree.c (list_length): If ENABLE_TREE_CHECKING, abort on a circular list rather than going into an infinite loop. cp: * cp-lang.c (c_reset_state): Delete. (push_file_scope, pop_file_scope): New stubs. * parser.c (c_parse_file): Call sorry() here if called more than once. testsuite: * gcc.dg/Wold-style-definition-1.c, gcc.dg/builtins-30.c * gcc.dg/unused-4.c, gcc.dg/noncompile/label-1.c * gcc.dg/noncompile/label-lineno-1.c, objc.dg/naming-1.m: Adjust error regexps. * gcc.dg/Wshadow-2.c, gcc.dg/noncompile/incomplete-3.c * gcc.dg/noncompile/undeclared-1.c: New test cases. * gcc.dg/decl-5.c, gcc.dg/redecl-1.c: Remove XFAIL. * gcc.dg/local1.c: Add explanatory comment. From-SVN: r79883
2004-03-24 00:47:53 +01:00
2004-03-01 Mark Mitchell <mark@codesourcery.com>
PR c++/14324
* lex.c (retrofit_lang_decl): Treat entities with no linkage as
having C++ linkage for name-mangling purposes.
PR c++/14260
* parser.c (cp_parser_direct_declarator): Recognize constructor
declarators that use a template-id to name the class being
constructed.
PR c++/14337
* pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
(tsubst_expr): Do not call tsubst_copy, even when
PR 12267, 12391, 12560, 13129, 14114, 14113 * c-tree.h: Forward declare struct c_binding. Declare c_override_bindings_to_false. Update prototypes. (struct lang_identifier): Update comments. Change fields to be struct c_binding *. (IDENTIFIER_SYMBOL_VALUE, IDENTIFIER_TAG_VALUE) (IDENTIFIER_LABEL_VALUE, C_DECL_INVISIBLE) (KEEP_NO, KEEP_YES, KEEP_MAYBE): Delete. (C_DECL_IN_EXTERNAL_SCOPE, C_DECL_DECLARED_BUILTIN): New. * c-common.h: Update prototypes. * c-decl.c (struct c_scope): Update commentary. Remove names, names_last, parms, parms_last, tags, and shadowed fields. Add bindings and depth fields. (scope_freelist): Move to more appropriate location. (c_print_identifier): Update for changes to struct lang_identifier. (objc_mark_locals_volatile): Update for new bindings structures. (global_bindings_p): Honor c_override_global_bindings_to_false. (pushlevel): Rename to push_scope; take no arguments; use the scope_freelist; initialize scope->depth and check for overflow. (poplevel): Rename to pop_scope; totally rewritten for new bindings structures. (diagnose_mismatched_decls): Use C_DECL_DECLARED_BUILTIN, not C_DECL_INVISIBLE, for certain decisions. Adjust some diagnostics. Improve some commentary. Adjust handling of forward parm decls. (merge_decls): Set C_DECL_DECLARED_BUILTIN when appropriate. Preserve C_DECL_IN_EXTERNAL_SCOPE. (warn_if_shadowing): Correct indentation. Improve diagnostics. (pushdecl): Remove unnecessary assertion. Short-circuit anonymous decls. Rewrite for new bindings structures. Improve commentary. Eliminate the copy_node call. (implicit_decl_warning): Use the "diag" idiom (as seen in locate_old_decl) to reduce code duplication; call locate_old_decl if appropriate. Relocate to remove need for forward declaration. (implicitly_declare): Adjust for new bindings structures. Kludge around Objective-C not-really-builtin functions. (undeclared_variable): Improve diagnostics. If current_function_decl is nonnull but current_function_scope is null, use current_scope. Use bind. (lookup_tag): Adjust for new bindings structures. Kludge around Objective-C's tag declarations that wind up in the external scope. (lookup_name): Adjust for new bindings structures. Kludge around c-common.c's pseudo-typedefs that wind up in the external scope. (lookup_name_current_level): Rename lookup_name_in_scope; take a second argument indicating the scope to examine; rewrite for new bindings structures. (c_init_decl_processing): Adjust for renamed functions. Do not initialize current_file_decl, first_builtin_decl, last_builtin_decl. First scope pushed is the external scope, not the global scope. (builtin_function): Use bind, not pushdecl. Adjust other bits for new data structures. Keep track of builtins that should be made visible automatically. (start_decl): Adjust diagnostics. Remove unnecessary call to expand_decl. (grokparms): Return 0 if arg_types is error_mark_node. (get_parm_info): Rename "void_at_end" argument to "ellipsis", with reversed sense. Rewrite for new bindings structures. Do not leave any decls in the scope, to prevent pop_scope from doing contradictory things with them. (finish_struct, finish_enum): Remove redundant diagnostics. (build_enumerator): Don't cascade diagnostics for error_mark_node. Mark location where -pedantic changes the meaning of the program. (store_parm_decls_newstyle, store_parm_decls_oldstyle): Load the parameter decls into the function's scope structure using bind. Warn here about function definitions in the wrong style. Adjust diagnostics. (store_parm_decls): Correct the determination of whether a function was defined with a prototype. (c_write_global_declarations): Operate on all file decls and on the external scope. Split body of the loop to... (c_write_global_declarations_1): ... this new function, to avoid code duplication. (truly_local_externals, first_builtin_decl, last_builtin_decl) (make_scope, pop_scope, in_parm_level_p, set_block) (any_external_decl, record_external_decl, bind_label, getdecls) (link_hash_hash, link_hash_eq, merge_translation_unit_decls) (c_reset_state): Delete. (visible_builtins, c_override_global_bindings_to_false) (c_binding, I_SYMBOL_BINDING, I_SYMBOL_DECL, I_TAG_BINDING) (I_TAG_DECL, I_LABEL_BINDING, I_LABEL_DECL, file_scope) (external_scope, binding_freelist, bind, free_binding_and_advance) (push_file_scope, pop_file_scope): New. (pushtag, pushdecl_top_level, lookup_label, declare_label) (define_label, c_make_fname_decl, finish_decl) (mark_forward_parm_decls, build_compound_literal) (grokdeclarator, start_function, check_for_loop_decls) (identifier_global_value, record_builtin_type): Minor adjustments for new bindings structures. Improve diagnostics and commentary. * c-objc-common.c (start_cdtor, finish_cdtor): Adjust calls to pushlevel/poplevel respectively. (c_objc_common_finish_file): Don't call merge_translation_unit_decls. * c-opts.c (c_common_parse_file): Remove spurious ATTRIBUTE_UNUSED. Warn about YYDEBUG not being defined only if -dy. Remove no-longer- correct loop over multiple translation units; call fatal_error if requested to compile more than one file at once. (This disables IMA temporarily - an up-front error being preferable to a crash.) * c-parse.in (pushlevel, poplevel rules): Rename push_scope, pop_scope. (all actions): Adjust calls to pushlevel/poplevel. (parsing_iso_function_signature): Delete. (extdef_1): Fold into extdef. (old_style_parm_decls_1): Fold into old_style_parm_decls. Don't warn here about function definitions in the wrong style. (after_tyle_declarator, parm_declarator_starttypename) (parm_declarator_nostarttypename, notype_declarator): Remove commented-out productions. (parmlist_1, parmlist_2): Use make_node, not tree_cons, to create an empty TREE_LIST node. Adjust calls to get_parm_info. (parmlist_2 : ELLIPSIS): Tag the arg-info block with error_mark_node to suppress -Wold-style-definition after this error. (c_parse_file): Don't clear the binding stack or call finish_fname_decls here. Correct comment. * c-typeck.c (same_translation_unit_p): Export. (common_type): Use c_override_global_bindings_to_false, not pushlevel/poplevel/declare_parm_level. * c-lang.c: Override LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK, and LANG_HOOKS_GETDECLS with do-nothing stubs. * objc/objc-lang.c: Likewise. * objc/objc-act.c: Adjust all calls to pushlevel, poplevel, get_parm_info. (OBJC_VOID_AT_END): Delete; replace all uses with void_list_node. (generate_forward_declaration_to_string_table): Delete. * objc/objc-act.h (OCTI_STRG_DECL, UOBJC_STRINGS_decl): Delete. * coverage.c (create_coverage): Don't pushdecl anything. * langhooks.c (lhd_clear_binding_stack): Call lang_hooks.decls.poplevel, not poplevel. * tree.c (list_length): If ENABLE_TREE_CHECKING, abort on a circular list rather than going into an infinite loop. cp: * cp-lang.c (c_reset_state): Delete. (push_file_scope, pop_file_scope): New stubs. * parser.c (c_parse_file): Call sorry() here if called more than once. testsuite: * gcc.dg/Wold-style-definition-1.c, gcc.dg/builtins-30.c * gcc.dg/unused-4.c, gcc.dg/noncompile/label-1.c * gcc.dg/noncompile/label-lineno-1.c, objc.dg/naming-1.m: Adjust error regexps. * gcc.dg/Wshadow-2.c, gcc.dg/noncompile/incomplete-3.c * gcc.dg/noncompile/undeclared-1.c: New test cases. * gcc.dg/decl-5.c, gcc.dg/redecl-1.c: Remove XFAIL. * gcc.dg/local1.c: Add explanatory comment. From-SVN: r79883
2004-03-24 00:47:53 +01:00
processing_template_decl.
2004-03-01 Jeff Law <law@redhat.com>
* init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
the proper type.
2004-02-29 Mark Mitchell <mark@codesourcery.com>
PR c++/14138
* name-lookup.h (push_scope): Change prototype.
* name-lookup.c (push_scope): Do not reenter the current class
scope.
* decl.c (grokfndecl): Check return code from push_scope before
calling pop_scope.
* decl2.c (check_classfn): Likewise.
* parser.c (cp_parser_conversion_function_id): Likewise.
(cp_parser_init_declarator): Likewise.
(cp_parser_direct_declarator): Likewise.
(cp_parser_class_specifier): Likewise.
(cp_parser_class_head): Likewise.
(cp_parser_lookup_name): Likewise.
(cp_parser_constructor_declarator_p): Likewise.
* pt.c (instantiate_class_template): Likewise.
(resolve_typename_type): Likewise.
2004-02-29 Mark Mitchell <mark@codesourcery.com>
PR c++/14267
* typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
extension.
PR debug/12103
* class.c (update_vtable_entry_for_fn): Do not go through
covariance machinery if the type returned by an overrider is the
same as the original.
2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
* call.c: Fix a comment typo.
2004-02-27 Ziemowit Laski <zlaski@apple.com>
* tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
2004-02-26 Mark Mitchell <mark@codesourcery.com>
PR c++/14278
* parser.c (cp_parser_parameter_declaration_list): Commit
to fewer tentative parses.
2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/14284
* pt.c (dependent_type_p_r): A template template parameter is a
dependent type.
2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/14246
* mangle.c (write_template_arg_literal): Don't rely on identity for
boolean constants.
2004-02-24 Jason Merrill <jason@redhat.com>
* tree.c (build_exception_variant): Use check_qualified_type.
2004-02-23 22:43:18 +01:00
2004-02-23 Zack Weinberg <zack@codesourcery.com>
Kazu Hirata <kazu@cs.umass.edu>
* decl.c (cxx_init_decl_processing): Don't check
flag_writable_strings.
2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/14156
* typeck.c (maybe_warn_about_returning_address_of_location):
Change check for VAR_DECL to use DECL_P instead.
2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/14250
* cvt.c (build_expr_type_conversion): Type must be complete before
looking up for conversions.
2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/14143
PR 12267, 12391, 12560, 13129, 14114, 14113 * c-tree.h: Forward declare struct c_binding. Declare c_override_bindings_to_false. Update prototypes. (struct lang_identifier): Update comments. Change fields to be struct c_binding *. (IDENTIFIER_SYMBOL_VALUE, IDENTIFIER_TAG_VALUE) (IDENTIFIER_LABEL_VALUE, C_DECL_INVISIBLE) (KEEP_NO, KEEP_YES, KEEP_MAYBE): Delete. (C_DECL_IN_EXTERNAL_SCOPE, C_DECL_DECLARED_BUILTIN): New. * c-common.h: Update prototypes. * c-decl.c (struct c_scope): Update commentary. Remove names, names_last, parms, parms_last, tags, and shadowed fields. Add bindings and depth fields. (scope_freelist): Move to more appropriate location. (c_print_identifier): Update for changes to struct lang_identifier. (objc_mark_locals_volatile): Update for new bindings structures. (global_bindings_p): Honor c_override_global_bindings_to_false. (pushlevel): Rename to push_scope; take no arguments; use the scope_freelist; initialize scope->depth and check for overflow. (poplevel): Rename to pop_scope; totally rewritten for new bindings structures. (diagnose_mismatched_decls): Use C_DECL_DECLARED_BUILTIN, not C_DECL_INVISIBLE, for certain decisions. Adjust some diagnostics. Improve some commentary. Adjust handling of forward parm decls. (merge_decls): Set C_DECL_DECLARED_BUILTIN when appropriate. Preserve C_DECL_IN_EXTERNAL_SCOPE. (warn_if_shadowing): Correct indentation. Improve diagnostics. (pushdecl): Remove unnecessary assertion. Short-circuit anonymous decls. Rewrite for new bindings structures. Improve commentary. Eliminate the copy_node call. (implicit_decl_warning): Use the "diag" idiom (as seen in locate_old_decl) to reduce code duplication; call locate_old_decl if appropriate. Relocate to remove need for forward declaration. (implicitly_declare): Adjust for new bindings structures. Kludge around Objective-C not-really-builtin functions. (undeclared_variable): Improve diagnostics. If current_function_decl is nonnull but current_function_scope is null, use current_scope. Use bind. (lookup_tag): Adjust for new bindings structures. Kludge around Objective-C's tag declarations that wind up in the external scope. (lookup_name): Adjust for new bindings structures. Kludge around c-common.c's pseudo-typedefs that wind up in the external scope. (lookup_name_current_level): Rename lookup_name_in_scope; take a second argument indicating the scope to examine; rewrite for new bindings structures. (c_init_decl_processing): Adjust for renamed functions. Do not initialize current_file_decl, first_builtin_decl, last_builtin_decl. First scope pushed is the external scope, not the global scope. (builtin_function): Use bind, not pushdecl. Adjust other bits for new data structures. Keep track of builtins that should be made visible automatically. (start_decl): Adjust diagnostics. Remove unnecessary call to expand_decl. (grokparms): Return 0 if arg_types is error_mark_node. (get_parm_info): Rename "void_at_end" argument to "ellipsis", with reversed sense. Rewrite for new bindings structures. Do not leave any decls in the scope, to prevent pop_scope from doing contradictory things with them. (finish_struct, finish_enum): Remove redundant diagnostics. (build_enumerator): Don't cascade diagnostics for error_mark_node. Mark location where -pedantic changes the meaning of the program. (store_parm_decls_newstyle, store_parm_decls_oldstyle): Load the parameter decls into the function's scope structure using bind. Warn here about function definitions in the wrong style. Adjust diagnostics. (store_parm_decls): Correct the determination of whether a function was defined with a prototype. (c_write_global_declarations): Operate on all file decls and on the external scope. Split body of the loop to... (c_write_global_declarations_1): ... this new function, to avoid code duplication. (truly_local_externals, first_builtin_decl, last_builtin_decl) (make_scope, pop_scope, in_parm_level_p, set_block) (any_external_decl, record_external_decl, bind_label, getdecls) (link_hash_hash, link_hash_eq, merge_translation_unit_decls) (c_reset_state): Delete. (visible_builtins, c_override_global_bindings_to_false) (c_binding, I_SYMBOL_BINDING, I_SYMBOL_DECL, I_TAG_BINDING) (I_TAG_DECL, I_LABEL_BINDING, I_LABEL_DECL, file_scope) (external_scope, binding_freelist, bind, free_binding_and_advance) (push_file_scope, pop_file_scope): New. (pushtag, pushdecl_top_level, lookup_label, declare_label) (define_label, c_make_fname_decl, finish_decl) (mark_forward_parm_decls, build_compound_literal) (grokdeclarator, start_function, check_for_loop_decls) (identifier_global_value, record_builtin_type): Minor adjustments for new bindings structures. Improve diagnostics and commentary. * c-objc-common.c (start_cdtor, finish_cdtor): Adjust calls to pushlevel/poplevel respectively. (c_objc_common_finish_file): Don't call merge_translation_unit_decls. * c-opts.c (c_common_parse_file): Remove spurious ATTRIBUTE_UNUSED. Warn about YYDEBUG not being defined only if -dy. Remove no-longer- correct loop over multiple translation units; call fatal_error if requested to compile more than one file at once. (This disables IMA temporarily - an up-front error being preferable to a crash.) * c-parse.in (pushlevel, poplevel rules): Rename push_scope, pop_scope. (all actions): Adjust calls to pushlevel/poplevel. (parsing_iso_function_signature): Delete. (extdef_1): Fold into extdef. (old_style_parm_decls_1): Fold into old_style_parm_decls. Don't warn here about function definitions in the wrong style. (after_tyle_declarator, parm_declarator_starttypename) (parm_declarator_nostarttypename, notype_declarator): Remove commented-out productions. (parmlist_1, parmlist_2): Use make_node, not tree_cons, to create an empty TREE_LIST node. Adjust calls to get_parm_info. (parmlist_2 : ELLIPSIS): Tag the arg-info block with error_mark_node to suppress -Wold-style-definition after this error. (c_parse_file): Don't clear the binding stack or call finish_fname_decls here. Correct comment. * c-typeck.c (same_translation_unit_p): Export. (common_type): Use c_override_global_bindings_to_false, not pushlevel/poplevel/declare_parm_level. * c-lang.c: Override LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK, and LANG_HOOKS_GETDECLS with do-nothing stubs. * objc/objc-lang.c: Likewise. * objc/objc-act.c: Adjust all calls to pushlevel, poplevel, get_parm_info. (OBJC_VOID_AT_END): Delete; replace all uses with void_list_node. (generate_forward_declaration_to_string_table): Delete. * objc/objc-act.h (OCTI_STRG_DECL, UOBJC_STRINGS_decl): Delete. * coverage.c (create_coverage): Don't pushdecl anything. * langhooks.c (lhd_clear_binding_stack): Call lang_hooks.decls.poplevel, not poplevel. * tree.c (list_length): If ENABLE_TREE_CHECKING, abort on a circular list rather than going into an infinite loop. cp: * cp-lang.c (c_reset_state): Delete. (push_file_scope, pop_file_scope): New stubs. * parser.c (c_parse_file): Call sorry() here if called more than once. testsuite: * gcc.dg/Wold-style-definition-1.c, gcc.dg/builtins-30.c * gcc.dg/unused-4.c, gcc.dg/noncompile/label-1.c * gcc.dg/noncompile/label-lineno-1.c, objc.dg/naming-1.m: Adjust error regexps. * gcc.dg/Wshadow-2.c, gcc.dg/noncompile/incomplete-3.c * gcc.dg/noncompile/undeclared-1.c: New test cases. * gcc.dg/decl-5.c, gcc.dg/redecl-1.c: Remove XFAIL. * gcc.dg/local1.c: Add explanatory comment. From-SVN: r79883
2004-03-24 00:47:53 +01:00
* name-lookup.c (arg_assoc_class): Don't look into template
arguments if it is not a primary template.
2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR c++/12007
* method.c (use_thunk): Always clone function argument tree.
2004-02-20 Mark Mitchell <mark@codesourcery.com>
PR c++/14199
* pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
PR c++/14173
* semantics.c (begin_class_definition): Set TYPE_PACKED correctly
for all type variants.
2004-02-19 Mark Mitchell <mark@codesourcery.com>
PR c++/13927
* decl.c (duplicate_decls): Return error_mark_node for invalid
redeclarations.
* name-lookup.c (push_namespace): Ignore the return value from
pushdecl.
* pt.c (push_template_decl_real): Robustify.
PR c++/14186
* name-lookup.c (push_class_level_binding): Do not complain about
adding a binding for a member whose name is the same as the
enclosing class if the member is located in a base class of the
current class.
2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/14181
PR 12267, 12391, 12560, 13129, 14114, 14113 * c-tree.h: Forward declare struct c_binding. Declare c_override_bindings_to_false. Update prototypes. (struct lang_identifier): Update comments. Change fields to be struct c_binding *. (IDENTIFIER_SYMBOL_VALUE, IDENTIFIER_TAG_VALUE) (IDENTIFIER_LABEL_VALUE, C_DECL_INVISIBLE) (KEEP_NO, KEEP_YES, KEEP_MAYBE): Delete. (C_DECL_IN_EXTERNAL_SCOPE, C_DECL_DECLARED_BUILTIN): New. * c-common.h: Update prototypes. * c-decl.c (struct c_scope): Update commentary. Remove names, names_last, parms, parms_last, tags, and shadowed fields. Add bindings and depth fields. (scope_freelist): Move to more appropriate location. (c_print_identifier): Update for changes to struct lang_identifier. (objc_mark_locals_volatile): Update for new bindings structures. (global_bindings_p): Honor c_override_global_bindings_to_false. (pushlevel): Rename to push_scope; take no arguments; use the scope_freelist; initialize scope->depth and check for overflow. (poplevel): Rename to pop_scope; totally rewritten for new bindings structures. (diagnose_mismatched_decls): Use C_DECL_DECLARED_BUILTIN, not C_DECL_INVISIBLE, for certain decisions. Adjust some diagnostics. Improve some commentary. Adjust handling of forward parm decls. (merge_decls): Set C_DECL_DECLARED_BUILTIN when appropriate. Preserve C_DECL_IN_EXTERNAL_SCOPE. (warn_if_shadowing): Correct indentation. Improve diagnostics. (pushdecl): Remove unnecessary assertion. Short-circuit anonymous decls. Rewrite for new bindings structures. Improve commentary. Eliminate the copy_node call. (implicit_decl_warning): Use the "diag" idiom (as seen in locate_old_decl) to reduce code duplication; call locate_old_decl if appropriate. Relocate to remove need for forward declaration. (implicitly_declare): Adjust for new bindings structures. Kludge around Objective-C not-really-builtin functions. (undeclared_variable): Improve diagnostics. If current_function_decl is nonnull but current_function_scope is null, use current_scope. Use bind. (lookup_tag): Adjust for new bindings structures. Kludge around Objective-C's tag declarations that wind up in the external scope. (lookup_name): Adjust for new bindings structures. Kludge around c-common.c's pseudo-typedefs that wind up in the external scope. (lookup_name_current_level): Rename lookup_name_in_scope; take a second argument indicating the scope to examine; rewrite for new bindings structures. (c_init_decl_processing): Adjust for renamed functions. Do not initialize current_file_decl, first_builtin_decl, last_builtin_decl. First scope pushed is the external scope, not the global scope. (builtin_function): Use bind, not pushdecl. Adjust other bits for new data structures. Keep track of builtins that should be made visible automatically. (start_decl): Adjust diagnostics. Remove unnecessary call to expand_decl. (grokparms): Return 0 if arg_types is error_mark_node. (get_parm_info): Rename "void_at_end" argument to "ellipsis", with reversed sense. Rewrite for new bindings structures. Do not leave any decls in the scope, to prevent pop_scope from doing contradictory things with them. (finish_struct, finish_enum): Remove redundant diagnostics. (build_enumerator): Don't cascade diagnostics for error_mark_node. Mark location where -pedantic changes the meaning of the program. (store_parm_decls_newstyle, store_parm_decls_oldstyle): Load the parameter decls into the function's scope structure using bind. Warn here about function definitions in the wrong style. Adjust diagnostics. (store_parm_decls): Correct the determination of whether a function was defined with a prototype. (c_write_global_declarations): Operate on all file decls and on the external scope. Split body of the loop to... (c_write_global_declarations_1): ... this new function, to avoid code duplication. (truly_local_externals, first_builtin_decl, last_builtin_decl) (make_scope, pop_scope, in_parm_level_p, set_block) (any_external_decl, record_external_decl, bind_label, getdecls) (link_hash_hash, link_hash_eq, merge_translation_unit_decls) (c_reset_state): Delete. (visible_builtins, c_override_global_bindings_to_false) (c_binding, I_SYMBOL_BINDING, I_SYMBOL_DECL, I_TAG_BINDING) (I_TAG_DECL, I_LABEL_BINDING, I_LABEL_DECL, file_scope) (external_scope, binding_freelist, bind, free_binding_and_advance) (push_file_scope, pop_file_scope): New. (pushtag, pushdecl_top_level, lookup_label, declare_label) (define_label, c_make_fname_decl, finish_decl) (mark_forward_parm_decls, build_compound_literal) (grokdeclarator, start_function, check_for_loop_decls) (identifier_global_value, record_builtin_type): Minor adjustments for new bindings structures. Improve diagnostics and commentary. * c-objc-common.c (start_cdtor, finish_cdtor): Adjust calls to pushlevel/poplevel respectively. (c_objc_common_finish_file): Don't call merge_translation_unit_decls. * c-opts.c (c_common_parse_file): Remove spurious ATTRIBUTE_UNUSED. Warn about YYDEBUG not being defined only if -dy. Remove no-longer- correct loop over multiple translation units; call fatal_error if requested to compile more than one file at once. (This disables IMA temporarily - an up-front error being preferable to a crash.) * c-parse.in (pushlevel, poplevel rules): Rename push_scope, pop_scope. (all actions): Adjust calls to pushlevel/poplevel. (parsing_iso_function_signature): Delete. (extdef_1): Fold into extdef. (old_style_parm_decls_1): Fold into old_style_parm_decls. Don't warn here about function definitions in the wrong style. (after_tyle_declarator, parm_declarator_starttypename) (parm_declarator_nostarttypename, notype_declarator): Remove commented-out productions. (parmlist_1, parmlist_2): Use make_node, not tree_cons, to create an empty TREE_LIST node. Adjust calls to get_parm_info. (parmlist_2 : ELLIPSIS): Tag the arg-info block with error_mark_node to suppress -Wold-style-definition after this error. (c_parse_file): Don't clear the binding stack or call finish_fname_decls here. Correct comment. * c-typeck.c (same_translation_unit_p): Export. (common_type): Use c_override_global_bindings_to_false, not pushlevel/poplevel/declare_parm_level. * c-lang.c: Override LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK, and LANG_HOOKS_GETDECLS with do-nothing stubs. * objc/objc-lang.c: Likewise. * objc/objc-act.c: Adjust all calls to pushlevel, poplevel, get_parm_info. (OBJC_VOID_AT_END): Delete; replace all uses with void_list_node. (generate_forward_declaration_to_string_table): Delete. * objc/objc-act.h (OCTI_STRG_DECL, UOBJC_STRINGS_decl): Delete. * coverage.c (create_coverage): Don't pushdecl anything. * langhooks.c (lhd_clear_binding_stack): Call lang_hooks.decls.poplevel, not poplevel. * tree.c (list_length): If ENABLE_TREE_CHECKING, abort on a circular list rather than going into an infinite loop. cp: * cp-lang.c (c_reset_state): Delete. (push_file_scope, pop_file_scope): New stubs. * parser.c (c_parse_file): Call sorry() here if called more than once. testsuite: * gcc.dg/Wold-style-definition-1.c, gcc.dg/builtins-30.c * gcc.dg/unused-4.c, gcc.dg/noncompile/label-1.c * gcc.dg/noncompile/label-lineno-1.c, objc.dg/naming-1.m: Adjust error regexps. * gcc.dg/Wshadow-2.c, gcc.dg/noncompile/incomplete-3.c * gcc.dg/noncompile/undeclared-1.c: New test cases. * gcc.dg/decl-5.c, gcc.dg/redecl-1.c: Remove XFAIL. * gcc.dg/local1.c: Add explanatory comment. From-SVN: r79883
2004-03-24 00:47:53 +01:00
* parser.c (cp_parser_new_expression): Parse an ill-formed
direct-new-declarator after a parenthesized type-id to emit good
diagnostic.
2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
* cp-tree.def, cvt.c: Update copyright.
2004-02-17 Mark Mitchell <mark@codesourcery.com>
PR c++/11326
* cp-tree.h (abi_version_at_least): Remove.
* mangle.c: Include flags.h.
2004-02-15 Mark Mitchell <mark@codesourcery.com>
PR c++/13971
* call.c (build_conditional_expr): Handle conversions between
class types which result in differently cv-qualified type
variants.
PR c++/14086
* class.c (delete_duplicate_fields_1): Remove.
(delete_duplicate_fields): Likewise.
(finish_struct_anon): Remove check for members with the same name
as their enclosing class.
(check_field_decls): Do not call duplicate_fields.
* decl.c (grokdeclarator): Remove check for static data members
with the same name as their enclosing class.
* name-lookup.c (push_class_level_binding): Check for members with
the same name as their enclosing class.
2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
PR c++/14085
* error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/13635
* pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
has full set of arguments.
2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/13927
* error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
2004-02-13 Mark Mitchell <mark@codesourcery.com>
PR c++/14122
* cp-tree.h (delete_sanity): Change prototype.
* decl2.c (delete_sanity): Make doing_vec a bool, not an int.
Remove dead code. Adjust code to warn about deleting an array.
* typekc.c (decay_conversion): Use build_address and build_nop.
PR c++/14108
* search.c (accessible_p): Do not check access in thunks.
PR c++/14083
* call.c (build_conditional_expr): Call force_rvalue on the
non-void operand in the case that one result is a throw-expression
and the other is not.
2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
PR c++/9851
* parser.c (cp_parser_pseudo_destructor_name): Check for errors on
the type name and look ahead for ::~, and bail out early with a
better error message if the parse is going to fail.
call.c (conversion_kind): New type. * call.c (conversion_kind): New type. (conversion_rank): Likewise. (conversion): Likewise. (CONVERSION_RANK): New macro. (conversion_obstack): New variable. (obstack_initialized): Likewise. (z_candidate): Change type of convs and second_conv. (candidate_warning): New type. (IDENTITY_RANK): Remove. (EXACT_RANK): Likewise. (PROMO_RANK): Likewise. (STD_RANK): Likewise. (PBOOL_RANK): Likewise. (USER_RANK): Likewise. (ELLIPSIS_RANK): Likewise. (BAD_RANK): Likewise. (ICS_RANK): Likewise. (ICS_STD_RANK): Likewise. (ICS_USER_FLAG): Likewise. (ICS_ELLIPSIS_FLAG): Likewise. (ICS_THIS_FLAG): Likewise. (ICS_BAD_FLAG): Likewise. (NEED_TEMPORARY_P): Likewise. (CHECK_COPY_CONSTRUCTOR_P): Likewise. (USER_CONV_CAND): Likewise. (USER_CONV_FN): Likewise. (conversion_obstack_alloc): New function. (alloc_conversion): Likewise. (validate_conversion_obstack): Likewise. (alloc_conversions): Likewise. (build_conv): Adjust to deal with new conversion data structures. (build_identity_conv): New function. (build_ambiguous_conv): Likewise. (standard_conversion): Adjust to deal with new conversion data structures. (convert_class_to_reference): Likewise. (direct_reference_binding): Likewise. (reference_binding): Likewise. (implicit_conversion): Likewise. (add_candidate): Likewise. (add_function_candidate): Likewise. (add_conv_candidate): Likewise. (build_builtin_candidate): Likewise. (print_z_candidate): Likewise. (merge_conversion_sequences): Likewise. (build_user_type_conversion_1): Likewise. (build_user_type_conversion): Likewise. (build_new_function_call): Likewise. (build_object_call): Likewise. (conditional_conversion): Likewise. (build_conditional_expr): Likewise. (build_new_op): Likewise. (build_op_delete_call): Likewise. (convert_like_real): Likewise. (build_over_call): Likewise. (build_new_method_call): Likewise. (is_subseq): Likewise. (maybe_handle_implicit_object): Likewise. (maybe_handle_ref_bind): Likewise. (compare_ics): Likewise. (source_type): Likewise. (add_warning): Likewise. (joust): Likewise. (can_convert_arg): Likewise. (can_convert_arg_bad): Likewise. (perform_implicit_conversion): Likewise. (perform_direct_initialization_if_possible): Likewise. (initialize_reference): Likewise. * cp-lang.c (cp_tree_size): Do not handle WRAPPER. * cp-tree.def (WRAPPER): Likewise. (IDENTITY_CONV): Remove. (LVALUE_CONV): Likewise. (QUAL_CONV): Likewise. (STD_CONV): Likewise. (PTR_CONV): Likewise. (PMEM_CONV): Likewise. (BASE_CONV): Likewise. (REF_BIND): Likewise. (USER_CONV): Likewise. (AMBIG_CONV): Likewise. (RVALUE_CONV): Likewise. * cp-tree.h (tree_wrapper): Remove. (WRAPPER_ZC): Remove. (lang_tree_node): Remove wrapper. (LOOKUP_SPECULATIVELY): Remove. (build_op_delete_call): Adjust prototype. (validate_conversion_obstack): Declare. (build_zc_wrapper): Remove. * cvt.c (convert_to_reference): Remove dead code. (ocp_convert): Likewise. * decl.c (redeclaration_error_message): Correct handling of templates. (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY. (cp_tree_node_structure): Remove WRAPPER case. * decl2.c (finish_file): Call validate_conversion_obstack. * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY. (build_op_delete_call): Likewise. (build_x_delete): Likewise. (build_delete): Adjust call to build_op_delete_call. * pt.c (tsubst_friend_declaration): Adjust code to determine whether or not a friend template is a definition. (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs. * tree.c (build_zc_wrapper): Remove. From-SVN: r77752
2004-02-13 08:19:25 +01:00
2004-02-12 Mark Mitchell <mark@codesourcery.com>
* call.c (conversion_kind): New type.
(conversion_rank): Likewise.
(conversion): Likewise.
(CONVERSION_RANK): New macro.
(conversion_obstack): New variable.
(obstack_initialized): Likewise.
(z_candidate): Change type of convs and second_conv.
(candidate_warning): New type.
(IDENTITY_RANK): Remove.
(EXACT_RANK): Likewise.
(PROMO_RANK): Likewise.
(STD_RANK): Likewise.
(PBOOL_RANK): Likewise.
(USER_RANK): Likewise.
(ELLIPSIS_RANK): Likewise.
(BAD_RANK): Likewise.
(ICS_RANK): Likewise.
(ICS_STD_RANK): Likewise.
(ICS_USER_FLAG): Likewise.
(ICS_ELLIPSIS_FLAG): Likewise.
(ICS_THIS_FLAG): Likewise.
(ICS_BAD_FLAG): Likewise.
(NEED_TEMPORARY_P): Likewise.
(CHECK_COPY_CONSTRUCTOR_P): Likewise.
(USER_CONV_CAND): Likewise.
(USER_CONV_FN): Likewise.
(conversion_obstack_alloc): New function.
(alloc_conversion): Likewise.
(validate_conversion_obstack): Likewise.
(alloc_conversions): Likewise.
(build_conv): Adjust to deal with new conversion data structures.
(build_identity_conv): New function.
(build_ambiguous_conv): Likewise.
(standard_conversion): Adjust to deal with new conversion data
structures.
(convert_class_to_reference): Likewise.
(direct_reference_binding): Likewise.
(reference_binding): Likewise.
(implicit_conversion): Likewise.
(add_candidate): Likewise.
(add_function_candidate): Likewise.
(add_conv_candidate): Likewise.
(build_builtin_candidate): Likewise.
(print_z_candidate): Likewise.
(merge_conversion_sequences): Likewise.
(build_user_type_conversion_1): Likewise.
(build_user_type_conversion): Likewise.
(build_new_function_call): Likewise.
(build_object_call): Likewise.
(conditional_conversion): Likewise.
(build_conditional_expr): Likewise.
(build_new_op): Likewise.
(build_op_delete_call): Likewise.
(convert_like_real): Likewise.
(build_over_call): Likewise.
(build_new_method_call): Likewise.
(is_subseq): Likewise.
(maybe_handle_implicit_object): Likewise.
(maybe_handle_ref_bind): Likewise.
(compare_ics): Likewise.
(source_type): Likewise.
(add_warning): Likewise.
(joust): Likewise.
(can_convert_arg): Likewise.
(can_convert_arg_bad): Likewise.
(perform_implicit_conversion): Likewise.
(perform_direct_initialization_if_possible): Likewise.
(initialize_reference): Likewise.
* cp-lang.c (cp_tree_size): Do not handle WRAPPER.
* cp-tree.def (WRAPPER): Likewise.
(IDENTITY_CONV): Remove.
(LVALUE_CONV): Likewise.
(QUAL_CONV): Likewise.
(STD_CONV): Likewise.
(PTR_CONV): Likewise.
(PMEM_CONV): Likewise.
(BASE_CONV): Likewise.
(REF_BIND): Likewise.
(USER_CONV): Likewise.
(AMBIG_CONV): Likewise.
(RVALUE_CONV): Likewise.
* cp-tree.h (tree_wrapper): Remove.
(WRAPPER_ZC): Remove.
(lang_tree_node): Remove wrapper.
(LOOKUP_SPECULATIVELY): Remove.
(build_op_delete_call): Adjust prototype.
(validate_conversion_obstack): Declare.
(build_zc_wrapper): Remove.
* cvt.c (convert_to_reference): Remove dead code.
(ocp_convert): Likewise.
* decl.c (redeclaration_error_message): Correct handling of
templates.
(finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
(cp_tree_node_structure): Remove WRAPPER case.
* decl2.c (finish_file): Call validate_conversion_obstack.
* init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
(build_op_delete_call): Likewise.
(build_x_delete): Likewise.
(build_delete): Adjust call to build_op_delete_call.
* pt.c (tsubst_friend_declaration): Adjust code to determine
whether or not a friend template is a definition.
(tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
* tree.c (build_zc_wrapper): Remove.
PR 12267, 12391, 12560, 13129, 14114, 14113 * c-tree.h: Forward declare struct c_binding. Declare c_override_bindings_to_false. Update prototypes. (struct lang_identifier): Update comments. Change fields to be struct c_binding *. (IDENTIFIER_SYMBOL_VALUE, IDENTIFIER_TAG_VALUE) (IDENTIFIER_LABEL_VALUE, C_DECL_INVISIBLE) (KEEP_NO, KEEP_YES, KEEP_MAYBE): Delete. (C_DECL_IN_EXTERNAL_SCOPE, C_DECL_DECLARED_BUILTIN): New. * c-common.h: Update prototypes. * c-decl.c (struct c_scope): Update commentary. Remove names, names_last, parms, parms_last, tags, and shadowed fields. Add bindings and depth fields. (scope_freelist): Move to more appropriate location. (c_print_identifier): Update for changes to struct lang_identifier. (objc_mark_locals_volatile): Update for new bindings structures. (global_bindings_p): Honor c_override_global_bindings_to_false. (pushlevel): Rename to push_scope; take no arguments; use the scope_freelist; initialize scope->depth and check for overflow. (poplevel): Rename to pop_scope; totally rewritten for new bindings structures. (diagnose_mismatched_decls): Use C_DECL_DECLARED_BUILTIN, not C_DECL_INVISIBLE, for certain decisions. Adjust some diagnostics. Improve some commentary. Adjust handling of forward parm decls. (merge_decls): Set C_DECL_DECLARED_BUILTIN when appropriate. Preserve C_DECL_IN_EXTERNAL_SCOPE. (warn_if_shadowing): Correct indentation. Improve diagnostics. (pushdecl): Remove unnecessary assertion. Short-circuit anonymous decls. Rewrite for new bindings structures. Improve commentary. Eliminate the copy_node call. (implicit_decl_warning): Use the "diag" idiom (as seen in locate_old_decl) to reduce code duplication; call locate_old_decl if appropriate. Relocate to remove need for forward declaration. (implicitly_declare): Adjust for new bindings structures. Kludge around Objective-C not-really-builtin functions. (undeclared_variable): Improve diagnostics. If current_function_decl is nonnull but current_function_scope is null, use current_scope. Use bind. (lookup_tag): Adjust for new bindings structures. Kludge around Objective-C's tag declarations that wind up in the external scope. (lookup_name): Adjust for new bindings structures. Kludge around c-common.c's pseudo-typedefs that wind up in the external scope. (lookup_name_current_level): Rename lookup_name_in_scope; take a second argument indicating the scope to examine; rewrite for new bindings structures. (c_init_decl_processing): Adjust for renamed functions. Do not initialize current_file_decl, first_builtin_decl, last_builtin_decl. First scope pushed is the external scope, not the global scope. (builtin_function): Use bind, not pushdecl. Adjust other bits for new data structures. Keep track of builtins that should be made visible automatically. (start_decl): Adjust diagnostics. Remove unnecessary call to expand_decl. (grokparms): Return 0 if arg_types is error_mark_node. (get_parm_info): Rename "void_at_end" argument to "ellipsis", with reversed sense. Rewrite for new bindings structures. Do not leave any decls in the scope, to prevent pop_scope from doing contradictory things with them. (finish_struct, finish_enum): Remove redundant diagnostics. (build_enumerator): Don't cascade diagnostics for error_mark_node. Mark location where -pedantic changes the meaning of the program. (store_parm_decls_newstyle, store_parm_decls_oldstyle): Load the parameter decls into the function's scope structure using bind. Warn here about function definitions in the wrong style. Adjust diagnostics. (store_parm_decls): Correct the determination of whether a function was defined with a prototype. (c_write_global_declarations): Operate on all file decls and on the external scope. Split body of the loop to... (c_write_global_declarations_1): ... this new function, to avoid code duplication. (truly_local_externals, first_builtin_decl, last_builtin_decl) (make_scope, pop_scope, in_parm_level_p, set_block) (any_external_decl, record_external_decl, bind_label, getdecls) (link_hash_hash, link_hash_eq, merge_translation_unit_decls) (c_reset_state): Delete. (visible_builtins, c_override_global_bindings_to_false) (c_binding, I_SYMBOL_BINDING, I_SYMBOL_DECL, I_TAG_BINDING) (I_TAG_DECL, I_LABEL_BINDING, I_LABEL_DECL, file_scope) (external_scope, binding_freelist, bind, free_binding_and_advance) (push_file_scope, pop_file_scope): New. (pushtag, pushdecl_top_level, lookup_label, declare_label) (define_label, c_make_fname_decl, finish_decl) (mark_forward_parm_decls, build_compound_literal) (grokdeclarator, start_function, check_for_loop_decls) (identifier_global_value, record_builtin_type): Minor adjustments for new bindings structures. Improve diagnostics and commentary. * c-objc-common.c (start_cdtor, finish_cdtor): Adjust calls to pushlevel/poplevel respectively. (c_objc_common_finish_file): Don't call merge_translation_unit_decls. * c-opts.c (c_common_parse_file): Remove spurious ATTRIBUTE_UNUSED. Warn about YYDEBUG not being defined only if -dy. Remove no-longer- correct loop over multiple translation units; call fatal_error if requested to compile more than one file at once. (This disables IMA temporarily - an up-front error being preferable to a crash.) * c-parse.in (pushlevel, poplevel rules): Rename push_scope, pop_scope. (all actions): Adjust calls to pushlevel/poplevel. (parsing_iso_function_signature): Delete. (extdef_1): Fold into extdef. (old_style_parm_decls_1): Fold into old_style_parm_decls. Don't warn here about function definitions in the wrong style. (after_tyle_declarator, parm_declarator_starttypename) (parm_declarator_nostarttypename, notype_declarator): Remove commented-out productions. (parmlist_1, parmlist_2): Use make_node, not tree_cons, to create an empty TREE_LIST node. Adjust calls to get_parm_info. (parmlist_2 : ELLIPSIS): Tag the arg-info block with error_mark_node to suppress -Wold-style-definition after this error. (c_parse_file): Don't clear the binding stack or call finish_fname_decls here. Correct comment. * c-typeck.c (same_translation_unit_p): Export. (common_type): Use c_override_global_bindings_to_false, not pushlevel/poplevel/declare_parm_level. * c-lang.c: Override LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK, and LANG_HOOKS_GETDECLS with do-nothing stubs. * objc/objc-lang.c: Likewise. * objc/objc-act.c: Adjust all calls to pushlevel, poplevel, get_parm_info. (OBJC_VOID_AT_END): Delete; replace all uses with void_list_node. (generate_forward_declaration_to_string_table): Delete. * objc/objc-act.h (OCTI_STRG_DECL, UOBJC_STRINGS_decl): Delete. * coverage.c (create_coverage): Don't pushdecl anything. * langhooks.c (lhd_clear_binding_stack): Call lang_hooks.decls.poplevel, not poplevel. * tree.c (list_length): If ENABLE_TREE_CHECKING, abort on a circular list rather than going into an infinite loop. cp: * cp-lang.c (c_reset_state): Delete. (push_file_scope, pop_file_scope): New stubs. * parser.c (c_parse_file): Call sorry() here if called more than once. testsuite: * gcc.dg/Wold-style-definition-1.c, gcc.dg/builtins-30.c * gcc.dg/unused-4.c, gcc.dg/noncompile/label-1.c * gcc.dg/noncompile/label-lineno-1.c, objc.dg/naming-1.m: Adjust error regexps. * gcc.dg/Wshadow-2.c, gcc.dg/noncompile/incomplete-3.c * gcc.dg/noncompile/undeclared-1.c: New test cases. * gcc.dg/decl-5.c, gcc.dg/redecl-1.c: Remove XFAIL. * gcc.dg/local1.c: Add explanatory comment. From-SVN: r79883
2004-03-24 00:47:53 +01:00
debug.h (struct gcc_debug_hooks): Add type_decl field. * debug.h (struct gcc_debug_hooks): Add type_decl field. (debug_nothing_tree_int): Prototype. (dwarf_debug_hooks): Delete, unused. * debug.c (do_nothing_debug_hooks): Update. (debug_nothing_tree_int): New function. * langhooks.h (struct lang_hooks_for_decls): Remove builtin_type_decls field. * langhooks-def.h (LANG_HOOKS_BUILTIN_TYPE_DECLS): Delete. (LANG_HOOKS_DECLS): Update. * toplev.c (rest_of_decl_compilation, rest_of_type_compilation): Use debug_hooks->type_decl. * dbxout.c (preinit_symbols): New static. (dbx_debug_hooks, xcoff_debug_hooks): Update. (dbxout_init): Don't call DBX_OUTPUT_STANDARD_TYPES or lang_hooks.decls.builtin_type_decls. Do scan preinit_symbols for symbols to output. (dbxout_type_decl): New function. (dbxout_symbol): If called before dbxout_init has run, queue the symbol for later. Apply DBX_ASSIGN_FUNDAMENTAL_TYPE_NUMBER to TYPE_DECLs before emitting them. * xcoffout.c (assign_type_number): Delete. (xcoff_type_numbers): New static table. (xcoff_assign_fundamental_type_number): New function. * xcoffout.h: Define DBX_ASSIGN_FUNDAMENTAL_TYPE_NUMBER, not DBX_OUTPUT_STANDARD_TYPES. Remove unnecessary #ifdefs. * sdbout.c: Include varray.h. (deferred_global_decls): New static. (sdb_debug_hooks): Update. (sdbout_global_decl): If we can't emit something right now, remember it in deferred_global_decls. (sdbout_finish): Just scan deferred_global_decls; don't call getdecls. (sdbout_init): Initialize deferred_global_decls. * Makefile.in: Update dependencies of sdbout.o. * dwarf2out.c (dwarf2out_type_decl): New function. (dwarf2_debug_hooks): Update. * vmsdbgout.c (vmsdbg_debug_hooks): Update. * c-decl.c (getdecls): Just return 0. (check_for_loop_decls): Don't use getdecls. (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL. * c-objc-common.c (c_objc_common_finish_file): Don't use getdecls. cp: * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS. * cp-tree.h: Don't declare cxx_builtin_type_decls. * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete. (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL. From-SVN: r77730
2004-02-12 22:42:28 +01:00
2004-02-12 Zack Weinberg <zack@codesourcery.com>
* cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
* cp-tree.h: Don't declare cxx_builtin_type_decls.
* decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
(record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
2004-02-10 Mark Mitchell <mark@codesourcery.com>
* typeck.c (lookup_destructor): Fix typo in error message.
2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
* call.c, parser.c, tree.c: Fix comment typos.
2004-02-07 Zack Weinberg <zack@codesourcery.com>
Bug 13856
* optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
* decl.c (duplicate_decls, start_function): Likewise.
2004-02-07 Zack Weinberg <zack@codesourcery.com>
* name-lookup.c (pushdecl): Issue shadow warnings directly.
* parser.c (free_parser_stacks): Delete.
2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
* rtti.c: Update copyright.
2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/14033
* decl.c (require_complete_types_for_parms): Do not insert
error_mark_node in the parameter list.
2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/14028
* parser.c (cp_parser_enclosed_template_argument_list): Emit straight
error when terminator can not be found.
2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
Make-lang.in (po-generated): Delete.
2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
* call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
targetm.calls.promote_prototypes.
2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
PR middle-end/13750
Revert:
2004-01-15 Geoffrey Keating <geoffk@apple.com>
PR pch/13361
* cp/lex.c (handle_pragma_interface): Duplicate string from tree.
(handle_pragma_implementation): Likewise.
2004-02-05 Mark Mitchell <mark@codesourcery.com>
PR c++/13714
* typeck.c (lookup_destructor): Tweak error message.
2004-02-05 Jan Hubicka <jh@suse.cz>
* tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
functions.
2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/14008
* parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
code, only emits the diagnostic now. Added lookup of the identifier
and support for qualified ids.
(cp_parser_parse_and_diagnose_invalid_type_name): New function.
Parse an (invalid) type name as id-expression within a declarator.
(cp_parser_simple_declaration): Use it.
(cp_parser_member_declaration): Likewise.
(cp_parser_make_typename_type): New function. Handle errors through
cp_parser_diagnose_invalid_typename.
(cp_parser_elaborated_type_specifier): Use it.
2004-02-04 Mark Mitchell <mark@codesourcery.com>
PR c++/13932
* call.c (convert_like_real): Use "converting" rather than
"argument" as the descriptive keyword to
dubious_conversion_warnings.
* typeck.c (convert_for_assignment): Do not call
dubious_conversion_warnings.
2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/13086
* init.c (build_delete): Emit a more informative error message in
case of an incomplete type, and on the correct source line.
2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
* error.c, search.c: Update copyright.
2004-02-04 Mark Mitchell <mark@codesourcery.com>
PR c++/9941
* rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
linkage for the typeinfo name string.
2004-02-04 Mark Mitchell <mark@codesourcery.com>
PR c++/13969
* cp-tree.h (fold_non_dependent_expr): New function.
* parser.c (cp_parser_fold_non_dependent_expr): Remove.
(cp_parser_template_argument): Use fold_non_dependent_expr.
(cp_parser_direct_declarator): Likewise.
* pt.c (fold_non_dependent_expr): New function.
(convert_nontype_argument): Use it.
(tsubst_qualified_id): Simplify.
(tsubst_copy_and_build): Likewise.
2004-02-04 Mark Mitchell <mark@codesourcery.com>
* decl.c (cxx_push_function_context): Do not set
current_function_is_thunk.
* method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
actual function.
2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2004-02-04 12:30:20 +01:00
PR c++/13997
* pt.c (more_specialized_class): Increase processing_template_decl
while partial ordering.
2004-02-03 Mark Mitchell <mark@codesourcery.com>
PR c++/13925
* decl.c (start_function): Do not call pushdecl for any
instantiation or specialization of a primary template.
2004-02-03 Mark Mitchell <mark@codesourcery.com>
PR c++/13950
* parser.c (cp_parser_class_name): Robustify.
PR c++/13970
* parser.c (cp_parser_cache_group): Do not consume the EOF token.
PR c++/14002
* semantics.c (finish_id_expression): Do not return an
IDENTIFIER_NODE when lookup finds a PARM_DECL.
2004-02-03 Mark Mitchell <mark@codesourcery.com>
PR c++/13978
* pt.c (build_non_dependent_expr): Do not build
NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
PR c++/13968
* semantics.c (finish_id_expression): Do not return an
IDENTIFIER_NODE when lookup finds a VAR_DECL.
PR c++/13975
* parser.c (cp_parser_simple_declaration): When skipping to the
end of the statement swallow the terminating semicolon.
2004-02-02 Mark Mitchell <mark@codesourcery.com>
PR c++/13113
* init.c (build_offset_ref): Improve error recovery for invalid
uses of non-static member functions.
PR c++/13854
* cp-tree.h (cp_build_type_attribute_variant): New function.
* class.c (build_clone): Use cp_build_type_attribute_variant.
* decl.c (duplicate_decls): Likewise.
* pt.c (copy_default_args_to_explicit_spec): Likewise.
(tsubst_function_type): Likewise.
* tree.c (build_exception_variant): Check attributes before
concluding that two types are the same.
(cp_build_type-attribute_variant): New method.
* typeck.c (merge_types): Use cp_build_type_attribute_variant.
PR c++/13907
* call.c (convert_class_to_reference): Keep better track of
pedantically invalid user-defined conversions.
2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/13957
* pt.c (tsubst_qualified_id): Improved error message when a type
is expected but not found.
2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
* class.c: Fix comment typos.
* decl.c: Likewise.
* error.c: Likewise.
* parser.c: Likewise.
* pt.c: Likewise.
* search.c: Likewise.
* typeck.c: Likewise.
2004-01-30 Richard Henderson <rth@redhat.com>
PR c++/13693
* method.c (use_thunk): Don't force_target_expr for void thunks.
* tree.c (build_target_expr_with_type): Assert non-void type.
(force_target_expr): Likewise.
2004-01-30 Michael Matz <matz@suse.de>
* parser.c (cp_parser_labeled_statement): Accept case ranges.
2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
DR206
PR c++/13813
* decl.c (grokdeclarator): Check immediatly type completeness for
non-dependent types.
2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/13683
* call.c (convert_arg_to_ellipsis): Don't emit a warning if within
a sizeof expression.block
2004-01-29 Mark Mitchell <mark@codesourcery.com>
PR c++/13883
* mangle.c (write_encoding): Correct encoding of member template
constructors.
2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
* parser.c (cp_parser_template_id): Parse tentatively `[:' after a
template name as it was `<::' (digraph typo).
(cp_parser_nth_token_starts_template_argument_list_p): New function.
(cp_parser_id_expression): Use it.
(cp_parser_nested_name_specifier_opt): Likewise.
(cp_parser_template_name): Likewise.
(cp_parser_class_name): Likewise.
(cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
2004-01-28 Mark Mitchell <mark@codesourcery.com>
PR c++/13791
* typeck.c (merge_types): Do not merge attributes into
TYPENAME_TYPEs.
PR c++/13736
* parser.c (cp_parser_direct_declarator): Do not prevent
backtracking inside a parenthesized declarator.
(cp_parser_parameter_declaration): Fix typo in comment.
2004-01-28 Jan Hubicka <jh@suse.cz>
* semantics.c (expand_body) Do emit_associated_thunks before
expansion.
Makefile.in (dwarf2out.o): Depend on input.h 2004-01-27 Devang Patel <dpatel@apple.com> * Makefile.in (dwarf2out.o): Depend on input.h * dbxout.c (dbx_debug_hooks): Add new empty hook for imported_module_or_decl. (xcoff_debug_hooks): Same. * sdbout.c (sdb_debug_hooks): Same. * vmsdbgout.c (vmsdbg_debug_hooks): Same. * debug.c (do_nothing_debug_hooks): Same. (debug_nothing_tree_tree): New function. * debug.h (gcc_debug_hooks): New hook, imported_module_or_decl. * dwarf2out.c: Include input.h. (dwarf2_debug_hooks): Add new hook for imported_module_or_decl. (remove_child_TAG): New function. (dwarf_tag_name): Handle DW_TAG_imported_module. (gen_subprogram_die): Equate decl number to declaration die. Do not remove all children dies while reusing declaration die for definition. Instead, selectively remove only formal parameters. (gen_variable_die): Equate variable decl to declaration die. (gen_field_die): Equate field decl to line number. (force_namespace_die): Replace it with ... (force_decl_die): ... this. (force_type_die): New function. (setup_namespace_context): Replace use of force_namespace_die() with force_decl_die(). (gen_namespace_die): Same. (dwarf2out_imported_module_or_decl): New function. testsuite: * g++.dg/debug/namespace1.C: New test. cp: * name-lookup.c: Include "debug.h" (do_namespace_alias): Invoke debug_hooks to emit debug info for namespace alias. (do_local_using_decl): Invoke debug_hooks to emit debug info for using decl. (do_class_using_decl): Same. (do_toplevel_using_decl): Same. (do_using_directive): Same. (cp_emit_debug_info_for_using): New function. * Make-lang.in (cp/parser.o): Depend on debug.h (cp/name-lookup.o): Same. From-SVN: r76746
2004-01-27 21:36:02 +01:00
2004-01-27 Devang Patel <dpatel@apple.com>
* name-lookup.c: Include "debug.h"
(do_namespace_alias): Invoke debug_hooks to emit debug info
for namespace alias.
(do_local_using_decl): Invoke debug_hooks to emit debug info
Makefile.in (dwarf2out.o): Depend on input.h 2004-01-27 Devang Patel <dpatel@apple.com> * Makefile.in (dwarf2out.o): Depend on input.h * dbxout.c (dbx_debug_hooks): Add new empty hook for imported_module_or_decl. (xcoff_debug_hooks): Same. * sdbout.c (sdb_debug_hooks): Same. * vmsdbgout.c (vmsdbg_debug_hooks): Same. * debug.c (do_nothing_debug_hooks): Same. (debug_nothing_tree_tree): New function. * debug.h (gcc_debug_hooks): New hook, imported_module_or_decl. * dwarf2out.c: Include input.h. (dwarf2_debug_hooks): Add new hook for imported_module_or_decl. (remove_child_TAG): New function. (dwarf_tag_name): Handle DW_TAG_imported_module. (gen_subprogram_die): Equate decl number to declaration die. Do not remove all children dies while reusing declaration die for definition. Instead, selectively remove only formal parameters. (gen_variable_die): Equate variable decl to declaration die. (gen_field_die): Equate field decl to line number. (force_namespace_die): Replace it with ... (force_decl_die): ... this. (force_type_die): New function. (setup_namespace_context): Replace use of force_namespace_die() with force_decl_die(). (gen_namespace_die): Same. (dwarf2out_imported_module_or_decl): New function. testsuite: * g++.dg/debug/namespace1.C: New test. cp: * name-lookup.c: Include "debug.h" (do_namespace_alias): Invoke debug_hooks to emit debug info for namespace alias. (do_local_using_decl): Invoke debug_hooks to emit debug info for using decl. (do_class_using_decl): Same. (do_toplevel_using_decl): Same. (do_using_directive): Same. (cp_emit_debug_info_for_using): New function. * Make-lang.in (cp/parser.o): Depend on debug.h (cp/name-lookup.o): Same. From-SVN: r76746
2004-01-27 21:36:02 +01:00
for using decl.
(do_class_using_decl): Same.
(do_toplevel_using_decl): Same.
(do_using_directive): Same.
(cp_emit_debug_info_for_using): New function.
* Make-lang.in (cp/parser.o): Depend on debug.h
(cp/name-lookup.o): Same.
2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* cp-tree.h (language_function, lang_type_header): Use
BOOL_BITFIELD.
* name-lookup.h (cp_binding_level): Likewise.
2004-01-26 Mark Mitchell <mark@codesourcery.com>
PR c++/13663
* semantics.c (finish_for_expr): Check for unresolved overloaded
functions.
* class.c (add_method): Just check processing_template_decl to
determine whether or not we are within a template.
* decl2.c (maybe_retrofit_in_chrg): Likewise.
* init.c (decl_constant_value): Check the type of the declaration,
not TREE_READONLY.
* name-lookup.c (maybe_push_to_top_level): Rename to ...
(push_to_top_level): ... this.
* name-lookup.h (maybe_push_to_top_level): Do not declare it.
* pt.c (push_template_decl_real): Reorder condition for speed.
(convert_template_argument): Use dependency-checking functions in
place of uses_template_parms.
(lookup_template_class): Avoid calling uses_template_parms more
than once.
(uses_template_parms): Reimplement, using dependency-checking
functions.
(instantiate_class_template): Use push_to_top_level, not
maybe_push_to_top_level.
(type_unification_real): Simplify.
(type_dependent_expression_p): Handle OFFSET_REFs and
TEMPLATE_DECLs.
(any_dependent_template_arguments_p): Handle multiple levels of
template argument.
* semantics.c (expand_or_defer_fn): Do not check
uses_template_parms for template instantiations.
* typeck.c (comptypes): Avoid calling cp_type_quals.
2004-01-25 Mark Mitchell <mark@codesourcery.com>
PR c++/13833
* call.c (build_over_call): Do not convert arguments when
processing a template.
* pt.c (build_non_dependent_expr): Do not build a
NON_DEPENDENT_EXPR for arithmetic constants.
2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/13810
* parser.c (cp_parser_type_parameter): When cp_parser_id_expression
returns a TYPE_DECL. no further lookup is required.
* semantics.c (check_template_template_default_arg): A TYPE_DECL
is invalid. Rework to give better diagnostics.
2004-01-25 16:03:09 +01:00
2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/13797
* pt.c (instantiate_class_template): Add an error_mark_node
check.
(tsubst_decl) <TEMPLATE_DECL case>: Likewise.
2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/13701
* decl.c (finish_function): Move the call to
finish_fname_decls below the call to
finish_eh_spec_block.
2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
* optimize.c, typeck2.c: Update copyright.
2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
* Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
init.c, mangle.c, typeck.c: Update copyright.
2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
* parser.c (cp_parser_class_specifier): Prevent garbage collection.
re PR other/12730 (manual page install broken with old Pod::man) gcc/ 2004-01-20 Kelley Cook <kcook@gcc.gnu.org> PR bootstrap/12730 * configure.ac: Delete definition and subsitution of docdir. Add info, man, srcman and srcinfo to target hooks. Create doc/ directory. * configure: Regenerate. * Makefile.in: Don't substitute docdir and delete all references throughout. (MAKEINFOFLAGS): Define. (stmp-docobjdir): Delete. (INFOFILES, MANFILES): Define. (info): Call lang.info, srcinfo and lang.srcinfo. (generated-manpages): Call lang.man, srcman and lang.srcman. (srcinfo, srcman): New rules to copy back files to source directory. (doc/%.info, doc/%.dvi, doc/%.1, doc/%.7): New implict rule. (install-man): Revamp rule. (clean): Update dvi directory. (distclean): Delete TAGS from front end directorys. (maintainer-clean): Delete all document files in source directory. objc/Make-lang.in (objc.man, objc.info): Dummy entries. (objc.srcman, objc.srcinfo): Likewise. gcc/ada/ 2004-01-20 Kelley Cook <kcook@gcc.gnu.org> * Make-lang.in: Replace $(docdir) with doc. (doc/gnat_ug_unx.info, doc/gnat_ug_vwx.info, doc/gnat_ug_vms.info doc/gnat_ug_wnt.info, doc/gnat_rm.info, doc/gnat-style.info): Update to use consistent MAKEINFO rule. (ada.man, ada.srcman): Dummy entry. (ADA_INFOFILES): Define. (ada.info, ada.srcinfo): New rules. gcc/cp/ 2004-01-20 Kelley Cook <kcook@gcc.gnu.org> * Make-lang.in: Replace $(docdir) with doc. (c++.info, c++.srcinfo): Dummy entry. (c++.man, c++.srcman): New rules. (c++.install-man): Revamp rule. gcc/f/ 2004-01-20 Kelley Cook <kcook@gcc.gnu.org> * Make-lang.in: Replace $(docdir) with doc. (TEXI_G77_FILES): Define. (f77.rebuilt): Delete. (f77.srcextra): Add dependencies on f/BUGS and f/NEWS. (f77.srcman, f77.srcinfo, f77.man, f77.info): New rules. (doc/g77.info, doc/g77.dvi): Depend on TEXI_G77_FILES. Always build in doc directory. Use $(MAKEINFOFLAGS). (info, dvi, generated_manpages): Update to look in doc directory. (f/BUGS, f/NEWS): Generate in build directory. (f77.mostlyclean): Delete BUGS and NEWS from build directory. (f77.maintainer-clean): Adjust to delete from source directory. (f77.install-man): Revamp rule. gcc/java/ 2004-01-20 Kelley Cook <kcook@gcc.gnu.org> * Make-lang.in: Replace $(docdir) with doc. (java.info, java.srcinfo, java.man, java.srcman): New rules. (java.install-man): Revamp rule. gcc/treelang/ 2004-01-20 Kelley Cook <kcook@gcc.gnu.org> * Make-lang.in: Replace $(docdir) with doc. (treelang.info, treelang.srcinfo): New rules. (treelang.man, treelang.man): Dummy entries. maintainer-scripts/ 2004-01-20 Kelley Cook <kcook@gcc.gnu.org> * gcc_release (build_sources): Delete call to make f77.rebuilt. From-SVN: r76249
2004-01-21 03:01:55 +01:00
2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
* Make-lang.in: Replace $(docdir) with doc.
(c++.info, c++.srcinfo): Dummy entry.
(c++.man, c++.srcman): New rules.
(c++.install-man): Revamp rule.
2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
* Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
immediate $(shell) instead of deferred backquote.
2004-01-19 Mark Mitchell <mark@codesourcery.com>
PR c++/13651
* parser.c (cp_parser_postfix_expression): When encountering
incomplete type on left-hand side of "->" or ".", treat the entire
expression as erroneous.
PR c++/13592
* call.c (build_field_call): Remove.
(n_build_method_call): Likewise.
(build_method_call): Likewise.
(build_new_method_call): Do not call build_field_call.
* class.c (n_build_method_call): Remove.
(print_class_statistics): Do not print it.
* cp-tree.h (build_method_call): Remove declaration.
(finish_object_call_expr): Likewise.
(build_new_1): Do not use build_method_call.
* parser.c (cp_parser_postfix_expression): Use finish_call_expr
when the function appearing on the right-hand-side of "." or "->"
is not actually a function.
* pt.c (tsubst_copy_and_build): Likewise.
* semantics.c (finish_object_call_expr): Remove.
2004-01-18 Mark Mitchell <mark@codesourcery.com>
PR c++/13710
* pt.c (tsubst): Use finish_typeof.
2004-02-20 23:55:14 +01:00
2004-01-18 Jason Merrill <jason@redhat.com>
PR c++/11725
* except.c (build_throw): In a template, set
current_function_returns_abnormally.
2004-01-17 Fred Fish <fnf@intrinsity.com>
PR c++/11895
* decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
except don't call array_type_nelts() with a VECTOR_TYPE.
2004-01-16 Jan Hubicka <jh@suse.cz>
* mangle.c (write_mangled_name): Remove inline modifier.
2004-01-16 Mark Mitchell <mark@codesourcery.com>
PR c++/13574
* decl.c (compute_array_index_type): Fix grammar in comment.
* init.c (build_zero_init): Handle zero-sized arrays correctly.
PR c++/13178
* call.c (name_as_c_string): Print conversion operator names
correctly.
PR c++/13478
* call.c (initialize_reference): Pass -1 for inner parameter to
convert_like_real.
2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/13407
* parser.c (cp_parser_base_specifier): Check for an invalid
keyword `typename' and emit an user-friendly error message.
2004-01-15 Geoffrey Keating <geoffk@apple.com>
PR pch/13361
* cp/lex.c (handle_pragma_interface): Duplicate string from tree.
(handle_pragma_implementation): Likewise.
2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/9259
* typeck.c (build_class_member_access_expr): Allow to access members
of the currently open class.
(finish_class_member_access_expr): Likewise.
2004-01-15 Alexandre Oliva <aoliva@redhat.com>
PR c++/13659
* name-lookup.c (validate_nonmember_using_decl): Take scope and
name by value, instead of computing them.
(do_local_using_decl, do_toplevel_using_decl): Add scope and name
arguments. Pass them to validate_nonmember_using_decl.
* name-lookup.h (do_local_using_decl): Adjust.
(do_toplevel_using_decl): Likewise.
* parser.c (cp_parser_using_declaration): Likewise.
* pt.c (tsubst_expr): Likewise.
2004-01-15 Alexandre Oliva <aoliva@redhat.com>
PR c++/13594
PR c++/13658
* name-lookup.c (qualified_lookup_using_namespace): Search
strongly-associated namespaces first, and only then try other
namespaces.
re PR bootstrap/12744 (A GCC release tarball can no longer be built without bison/flex) gcc/ 2004-01-15 Kelley Cook <kcook@gcc.gnu.org> PR bootstrap/12744 * configure.in: Revamp enable-generated-files-in-srcdir rule to define GENINSRC and not parsedir. Define srcextra as a langhook. * configure: Regenerate. * Makefile.in: Suppress default .l.c rule. Don't substitute parsedir and delete all references throughout. Conditionally define rule for srcextra dependent on GENINSRC. (stmp-docobjdir): Delete. (c-parse.o, gengtype-lex.o, gengtype-yacc.o): Use implicit build rule. (srcextra): Copy c-parse.y, c-parse.c, gengtype-lex.c, gengtype-yacc.c, and gengtype-yacc.h back to source directory. (maintainer-clean): Delete all parse files in source directory. (distclean): Delete generated files. * objc/Make-lang.in (objc-parse.o): Use implicit build rule. (objc-parse.c, objc-parse.y): Don't use parsedir. (objc.srcextra): Copy objc-parse.y and objc-parse.c back to source directory if requested. (po-generated): Don't use parsedir. (objc.maintainer-clean): Delete above files from source directory. gcc/ada/ 2004-01-15 Kelley Cook <kcook@gcc.gnu.org> * Make-lang.in (ada.srcextra): Dummy entry. gcc/cp/ 2004-01-15 Kelley Cook <kcook@gcc.gnu.org> * Make-lang.in (c++.srcextra): Dummy entry. gcc/f/ 2004-01-15 Kelley Cook <kcook@gcc.gnu.org> * Make-lang.in (f77.srcextra): Dummy entry. gcc/java/ 2004-01-15 Kelley Cook <kcook@gcc.gnu.org> * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory. (java.srcextra): Copy above back to source directory if requested. (po-generated): Delete reference to $(parsedir). (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir). Use implicit rule. gcc/treelang/ 2004-01-15 Kelley Cook <kcook@gcc.gnu.org> * Make-lang.in (TREE_GENERATED): Delete reference to $(parsedir). (treelang/parse.o, treelang/lex.o): Look for sources in build directory. Use implicit rule. (treelang/parse.c, treelang/parse.h treelang/lex.c): Always build in doc directory. (treelang.srcextra): Copy above back to source directory if requested. From-SVN: r75903
2004-01-15 05:02:24 +01:00
2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
* Make-lang.in (c++.srcextra): Dummy entry.
2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/8856
* parser.c (cp_parser_template_name): Don't try to parse a
conversion-function-id, as it cannot be a template-name.
(cp_parser_simple_type_specifier): Check for invalid template-ids
even after a built-in type.
2004-01-14 Jan Hubicka <jh@suse.cz>
PR c++/12850
* pt.c (instantiate_decl): Do not increase function_depth.
2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
PR c++/9021
PR c++/11005
* parser.c (cp_parser_elaborated_type_specifier): Warn about
attributes and discard.
* decl.c (xref_tag): Don't overwite existing attributes with
NULL_TREE.
2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/12335
* parser.c (cp_parser_lookup_name): Return error_mark_node if there
is no destructor while looking up a BIT_NOT_EXPR.
2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
* cxxfilt.c: Remove unused file.
2004-01-14 Jan Hubicka <jh@suse.cz>
Partial fix to PR c++/12850
* decl2.c (mark_used): Do not proactively instantiate templates
when compiling in unit-at-a-time or not optimizing.
* optimize.c (maybe_clone_body): Do not increase function depth.
2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/13474
* pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
2004-01-12 Steven Bosscher <stevenb@suse.de>
PR c++/13558
* parser.c (cp_parser_member_declaration): Any non-type is also
not a class or a function.
2004-01-12 Jason Merrill <jason@redhat.com>
PR c++/12815
* class.c (build_base_path): Do not mark vtable references as
TREE_CONSTANT.
(build_vtbl_ref_1): Likewise.
2004-01-12 Richard Henderson <rth@redhat.com>
PR opt/10776
* typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
(store_init_value): Use it.
* decl.c (check_initializer): Expect full initialization code
from store_init_value.
* init.c (expand_aggr_init_1): Likewise.
* decl2.c (maybe_emit_vtables): Abort if runtime init needed.
2004-01-12 Mark Mitchell <mark@codesourcery.com>
* class.c (layout_class_type): For non-POD class types, also copy
the DECL_SIZE and DECL_MODE of fields to the base class type.
2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/13289
* pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
calling regenerate_decl_from_template.
2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
PR c++/4100
* parser.c (cp_parser_decl_specifier_seq): Add check for a friend
decl-specifier occurring along with a class definition.
2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
* parser.c (cp_parser_decl_specifier_seq): Add parenthetical
clauses to comments describing declares_class_or_enum.
(cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
false.
2004-01-12 Jan Hubicka <jh@suse.cz>
* pt.c (for_each_template_parm): Do not check for duplicates.
(for_each_template_parm): Use walk_tree duplicate checking code.
2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
PR c++/3478
* parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
is error_mark_node, don't add any more decl_specs.
(cp_parser_init_declarator): After committing to a declaration, if
the decl_specifiers start with error_mark_node, issue an error and
change the type to "int".
2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
PR bootstrap/7817
* Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
DR 337
PR c++/9256
* pt.c (tsubst): Substitution must fail if we are attempting to
create an array with element type that is an abstract class type.
* decl.c (cp_finish_decl): Strip pointers and array types recursively
before calling abstract_virtuals_error.
2004-01-09 Alexandre Oliva <aoliva@redhat.com>
* name-lookup.c (qualified_lookup_using_namespace): Consider
strong using directives even if we've already found a binding.
2004-01-09 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (cxx_expand_expr): Change prototype.
* expr.c (cxx_expand_expr): Add alt_rtl parameter.
2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/12573
* pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
looking into them recursively. They can be there because of the
new __offsetof__ extension.
2004-01-07 Zack Weinberg <zack@codesourcery.com>
* parser.c (cp_parser_save_member_function_body): Mark the
definition static.
2004-01-05 Mark Mitchell <mark@codesourcery.com>
PR c++/13057
* class.c (build_clone): Copy type attributes from the original
function to the clone.
PR c++/12815
* class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
references as constant.
PR c++/12132
* parser.c (cp_parser_explicit_instantiation): Improve error
recovery.
(cp_parser_require): Improve indication of the error location.
PR c++/13451
* parser.c (cp_parser_class_head): Reorder logic to check for
invalid qualification.
2004-01-04 Mark Mitchell <mark@codesourcery.com>
PR c++/13157
* name-lookup.c (lookup_using_namespace): Remove spacesp
parameter.
(unqualified_namespace_lookup): Likewise.
(lookup_qualified_name): Adjust accordingly.
(lookup_name_real): Likewise.
(lookup_arg_dependent): Do not eliminate the namespace of the
functions found by unqualified name lookup unless that is the
current namespace.
2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
* semantics.c (push_deferring_access_checks): Fix format.
(resume_deferring_access_checks): Likewise.
(stop_deferring_access_checks): Likewise.
(pop_deferring_access_checks): Likewise.
(get_deferred_access_checks): Likewise.
(pop_to_parent_deferring_access_checks): Likewise.
(perform_deferred_access_checks): Likewise.
(perform_or_defer_access_check): Likewise.
2004-01-04 Richard Henderson <rth@redhat.com>
* call.c (build_over_call): Don't create a save_expr of an
aggregate, but rather its address.
2004-01-04 Mark Mitchell <mark@codesourcery.com>
PR c++/13529
* parser.c (cp_parser_postfix_expression): Allow "." to appear in
an offsetof expression.
* parser.c (cp_parser_parameter_declaration): Fix comment.
PR c++/12226
* call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
(reference_binding): Set it when appropriate.
(build_temp): New function, split out from ...
(convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
(initialize_reference): Likewise.
PR c++/13536
* parser.c (cp_parser): Add in_type_id_in_expr_p.
(cp_parser_new): Initialize it.
(cp_parser_postfix_expression): Set it.
(cp_parser_sizeof_operand): Likewise.
(cp_parser_parameteR_declaration): Do not commit early to tenative
parsers when in_type_id_in_expr_p is set.
2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/13094
* parser.c (cp_parser_template_argument): Don't call
make_unbound_class_template directly.
(cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
UNBOUND_CLASS_TEMPLATE tree node.
2004-01-02 Richard Sandiford <rsandifo@redhat.com>
PR target/12729
* method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/13520
* cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
(DECL_FUNCTION_TEMPLATE_P): Use it.
(DECL_CLASS_TEMPLATE_P): Likewise.
* parser.c (cp_parser_lookup_name): Add is_template parameter.
(cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
(cp_parser_template_name): Likewise.
(cp_parser_elaborated_type_specifier): Likewise.
(cp_parser_namespace_name): Likewise.
(cp_parser_class_name): Likewise.
(cp_parser_lookup_name_simple): Likewise.
2004-01-01 01:48:12 +01:00
See ChangeLog.3 for earlier changes.