1. 30 Mar, 2007 1 commit
    • re PR c++/26099 (support for type traits is not available) · cb68ec50
      gcc/
      2007-03-30  Paolo Carlini  <pcarlini@suse.de>
      
      	PR c++/26099
      	* c-common.h (enum rid): Add RID_HAS_NOTHROW_ASSIGN,
      	RID_HAS_NOTHROW_CONSTRUCTOR, RID_HAS_NOTHROW_COPY,
      	RID_HAS_TRIVIAL_ASSIGN, RID_HAS_TRIVIAL_CONSTRUCTOR,
      	RID_HAS_TRIVIAL_COPY, RID_HAS_TRIVIAL_DESTRUCTOR,
      	RID_HAS_VIRTUAL_DESTRUCTOR, RID_IS_ABSTRACT, RID_IS_BASE_OF,
      	RID_IS_CONVERTIBLE_TO, RID_IS_CLASS, RID_IS_EMPTY, RID_IS_ENUM,
      	RID_IS_POD, RID_IS_POLYMORPHIC, RID_IS_UNION, as
      	C++ extensions.
      	* doc/extend.texi (Extensions to the C++ Language): Add Type Traits.
      
      gcc/cp/
      2007-03-30  Paolo Carlini  <pcarlini@suse.de>
      
      	PR c++/26099
      	* cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
      	TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
      	(enum cp_tree_node_structure_enum, union lang_tree_node): Update.
      	(CLASS_TYPE_NON_UNION_P): Add.
      	(struct lang_type_class): Add has_complex_dflt.
      	(TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
      	(locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
      	* cp-tree.def: Add TRAIT_EXPR.
      	* cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
      	* lex.c (struct resword): Add __has_nothrow_assign,
      	__has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
      	__has_trivial_constructor, __has_trivial_copy,
      	__has_trivial_destructor, __has_virtual_destructor, __is_abstract,
      	__is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
      	__is_pod, __is_polymorphic, __is_union.
      	* parser.c (cp_parser_primary_expression): Deal with the new RIDs.
      	(cp_parser_trait_expr): New.
      	* semantics.c (finish_trait_expr, trait_expr_value
      	classtype_has_nothrow_copy_or_assign_p): New.
      	* method.c (locate_copy, locate_ctor, locate_dtor): Do not define
      	as static.
      	* decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
      	* class.c (check_bases, check_field_decl, check_bases_and_members):
      	Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
      	* pt.c (uses_template_parms, tsubst_copy_and_build,
      	value_dependent_expression_p, type_dependent_expression_p): Deal with
      	TRAIT_EXPR.
      	* tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
      
      gcc/testsuite/
      2007-03-30  Paolo Carlini  <pcarlini@suse.de>
      
      	PR c++/26099
      	* g++.dg/ext/is_base_of.C: New.
      	* g++.dg/ext/has_virtual_destructor.C: New.
      	* g++.dg/ext/is_polymorphic.C: New.
      	* g++.dg/ext/is_base_of_diagnostic.C: New.
      	* g++.dg/ext/is_enum.C: New.
      	* g++.dg/ext/has_nothrow_assign.C: New.
      	* g++.dg/ext/has_nothrow_constructor.C: New.
      	* g++.dg/ext/is_empty.C: New.
      	* g++.dg/ext/has_trivial_copy.C: New.
      	* g++.dg/ext/has_trivial_assign.C: New.
      	* g++.dg/ext/is_abstract.C: New.
      	* g++.dg/ext/is_pod.C: New.
      	* g++.dg/ext/has_nothrow_copy.C: New.
      	* g++.dg/ext/is_class.C: New.
      	* g++.dg/ext/has_trivial_constructor.C: New.
      	* g++.dg/ext/is_union.C: New.
      	* g++.dg/ext/has_trivial_destructor.C: New.
      	* g++.dg/tree-ssa/pr22444.C: Adjust, avoid __is_pod.
      	* g++.dg/template/crash43.C: Likewise.
      
      libstdc++-v3/
      2007-03-30  Paolo Carlini  <pcarlini@suse.de>
      
      	PR c++/26099
      	* include/bits/cpp_type_traits.h (struct __is_pod, struct __is_empty):
      	Remove.
      	* include/bits/valarray_array.h: Adjust.
      	* include/bits/allocator.h: Likewise.
      	* include/bits/stl_tree.h: Likewise.
      
      From-SVN: r123366
      Paolo Carlini committed
  2. 04 Feb, 2007 1 commit
  3. 25 Jan, 2007 1 commit
    • lex.c (D_CPP0X): Rename. · 54654d29
      2007-01-24  Douglas Gregor  <dgregor@osl.iu.edu>
      
      	* lex.c (D_CPP0X): Rename.
      	(D_CXX0X): To this.
      	(reswords): D_CPP0X -> D_CXX0X.
      	(init_reswords): Ditto.
      	* parser.c (cp_lexer_get_preprocessor_token): Warn about the use
      	of C++0x keywords as identifiers.
      
      From-SVN: r121161
      Douglas Gregor committed
  4. 21 Nov, 2006 1 commit
    • cp-tree.def (STATIC_ASSERT): New. · 55a3debe
      2006-11-21      Douglas Gregor <doug.gregor@gmail.com>
      
              * cp-tree.def (STATIC_ASSERT): New.  
      	* cp-objcp-common.c (cp_tree_size): Handle STATIC_ASSERT.
      	* error.c (dump_decl): Handle STATIC_ASSERT.
      	* cp-tree.h (STATIC_ASSERT_CONDITION): New.
              (STATIC_ASSERT_MESSAGE): New.
      	(STATIC_ASSERT_SOURCE_LOCATION): New.
      	(struct tree_static_assert): New.
      	(enum cp_tree_node_structure_enum): Add TS_CP_STATIC_ASSERT.
      	(union lang_tree_node): Add static_assertion.
              (finish_static_assert): Declare.
      	* cxx-pretty-print.c (pp_cxx_statement): Handle STATIC_ASSERT.
      	(pp_cxx_declaration): Handle STATIC_ASSERT.
      	* pt.c (instantiate_class_template): Handle
      	STATIC_ASSERT members.
              (tsubst_expr): Handle STATIC_ASSERT statements.  
      	* semantics.c (finish_static_assert): New.
              * lex.c (D_CPP0X): New.
              (reswords): Add static_assert keyword.
              (init_reswords): If not flag_cpp0x, mask out C++0x keywords.
              * parser.c (cp_parser_block_declaration): Parse static
      	assertions.
              (cp_parser_static_assert): New.
              (cp_parser_member_declaration): Parse static assertions.
      
      From-SVN: r119066
      Douglas Gregor committed
  5. 07 Sep, 2006 1 commit
    • re PR c++/26195 (pragma interface no longer handles explicit names) · c533e34d
              PR c++/26195
              * decl.c (make_rtl_for_nonlocal_decl),
              (start_preparsed_function): Don't use lbasename on
              input_filename when calling get_fileinfo.
              * semantics.c (begin_class_definition): Likewise.
              * lex.c (cxx_make_type): Likewise.
              (handle_pragma_interface): Call get_fileinfo on input_filename,
              not on the parameter to the directive.
      
      From-SVN: r116740
      Zak Kipling committed
  6. 13 Feb, 2006 1 commit
  7. 29 Jan, 2006 1 commit
    • call.c (alloc_conversion): Use cast when converting from void *. · 67f5655f
              * call.c (alloc_conversion): Use cast when converting from
      	void *.
              (alloc_conversions): Likewise.
              (add_candidate): Likewise.
              (print_z_candidates): Likewise.
              (add_warning): Likewise.
              * pt.c (retrieve_local_specialization): Likewise.
              (process_partial_specialization): Likewise.
              (mangle_class_name_for_template): Likewise.
              (tsubst_template_args): Likewise.
              * typeck2.c (pat_calc_hash): Likewise.
              (pat_compare): Likewise.
              (abstract_virtuals_error): Likewise.
              * class.c (method_name_cmp): Likewise.
              (resort_method_name_cmp): Likewise.
              (get_vfield_name): Likewise.
              * decl2.c (generate_ctor_and_dtor_functions_for_priority):
      	Likewise.
              * lex.c (init_reswords): Likewise.
              * rtti.c (create_pseudo_type_info): Likewise.
              * search.c (dfs_lookup_base): Likewise.
              (dfs_dcast_hint_pre): Likewise.
              (dfs_dcast_hint_post): Likewise.
              * tree.c (hash_tree_cons): Likewise.
              * repo.c (extract_string): Likewise.
              (afgets): Likewise.
              * cp-objcp-common.c (decl_shadowed_for_var_lookup): Likewise.
              * g++spec.c (lang_specific_driver): Likewise.
      
      From-SVN: r110366
      Gabriel Dos Reis committed
  8. 04 Jan, 2006 1 commit
    • directives.c (struct pragma_entry): Add is_deferred. · bc4071dd
      libcpp/
      	* directives.c (struct pragma_entry): Add is_deferred.  Add ident
      	entry to value union.
      	(end_directive): Don't eat the line if in_deferred_pragma.
      	(run_directive): Remove pragma hacks.
      	(insert_pragma_entry): Remove.
      	(new_pragma_entry): New.
      	(register_pragma_1): Split out of register_pragma.  Only handle
      	the lookup tree and return the new entry.
      	(cpp_register_pragma): Fill in the pragma entry here.
      	(cpp_register_deferred_pragma): New.
      	(register_pragma_internal): New.
      	(_cpp_init_internal_pragmas): Use register_pragma_internal.
      	(do_pragma): Allow pragma expansion after namespace.  For deferred
      	pragmas, don't slurp the line into a string.
      	(destringize_and_run): Save tokens for deferred pragmas.
      	(cpp_handle_deferred_pragma): Remove.
      	* macro.c (builtin_macro): Remove pragma token hack.
      	(_cpp_push_token_context): Rename from push_token_context and export.
      	* internal.h (struct lexer_state): Add pragma_allow_expansion.
      	(_cpp_push_token_context): Declare.
      	* lex.c (_cpp_lex_token): Allow _cpp_handle_directive to return
      	a token.  Update the line number correctly if so.
      	(_cpp_lex_direct): Emit CPP_PRAGMA_EOL tokens.
      	(cpp_token_val_index): Return CPP_TOKEN_FLD_PRAGMA for pragmas.
      	* include/cpplib.h (PRAGMA_EOL): New.
      	(CPP_TOKEN_FLD_PRAGMA): New.
      	(struct cpp_token): Add val.pragma.
      	(struct cpp_options): Remove defer_pragmas.
      	(cpp_handle_deferred_pragma): Remove.
      	(cpp_register_deferred_pragma): Declare.
      
      gcc/
      	* c-lex.c (c_lex_with_flags) <CPP_PRAGMA>: Smuggle pragma id
      	via integer constant.
      	(pragma_lex): Remove.
      	* c-pch.c (c_common_pch_pragma): Accept the name as an argument,
      	rather than parsing it.
      	* c-pragma.c (handle_pragma_weak, handle_pragma_redefine_extname,
      	handle_pragma_extern_prefix): Add %< %> quotes.
      	(registered_pragmas): New.
      	(c_register_pragma_1): New.
      	(c_register_pragma): Use it.
      	(c_register_pragma_with_expansion): Likewise.
      	(c_invoke_pragma_handler): New.
      	(init_pragma): Use cpp_register_deferred_pragma directly for
      	pch_preprocess.
      	* c-pragma.h (enum pragma_kind): New.
      	(pragma_handler): New.
      	(c_invoke_pragma_handler): Declare.
      	* c-common.c (c_parse_error): Pretty print CPP_PRAGMA and
      	CPP_PRAGMA_EOL.
      	* c-common.h (c_common_pch_pragma): Update decl.
      	* Makefile.in (c-parser.o): Update dependencies.
      	(GTFILES): Add c-pragma.h.
      	* c-parser.c (struct c_token): Add pragma_kind.
      	(struct c_parser): Add in_pragma.
      	(c_lex_one_token): Always initialize keyword and pragma_kind.
      	Extract data for CPP_PRAGMA.
      	(c_parser_peek_2nd_token): Deny CPP_PRAGMA_EOL.
      	(c_parser_consume_token): Don't allow CPP_PRAGMA unless errors.
      	Don't allow CPP_PRAGMA_EOL if in_pragma.
      	(c_parser_consume_pragma): New.
      	(c_parser_skip_until_found): Stop on CPP_PRAGMA_EOL.
      	(c_parser_skip_to_end_of_parameter): Likewise.
      	(c_parser_skip_to_end_of_block_or_statement): Likewise.
      	(c_parser_skip_to_pragma_eol): New.
      	(c_parser_external_declaration): Handle CPP_PRAGMA.
      	(c_parser_compound_statement_nostart): Likewise.
      	(c_parser_statement_after_labels): Likewise.
      	(c_parser_pragma): New.
      	(pragma_lex): Likewise.
      	(c_parser_pragma_pch_preprocess): New.
      	(c_parser_new): Merge into ...
      	(c_parse_file): ... here.  Call c_parser_pragma_pch_preprocess.
      
      gcc/cp/
      	* lex.c (handle_pragma_java_exceptions): Fix whitespace.
      	* parser.c (struct cp_token): Add pragma_kind.
      	(eof_token): Update to match.
      	(struct cp_lexer): Add in_pragma; rearrange next for better packing.
      	(cp_parser_initial_pragma): New.
      	(cp_lexer_new_main): Use it.  Don't bother clearing
      	c_lex_return_raw_strings.
      	(cp_lexer_get_preprocessor_token): Always initialize keyword
      	and pragma_kind fields.  Handle CPP_PRAGMA.
      	(cp_lexer_consume_token): Don't allow CPP_PRAGMA_EOL when 
      	in_pragma is set.
      	(cp_lexer_handle_pragma): Remove.  Update callers to cp_parser_pragma.
      	(cp_lexer_print_token) <CPP_PRAGMA>: Don't print as a string.
      	(cp_parser_skip_to_pragma_eol): New.
      	(cp_parser_error): Use it.
      	(cp_parser_skip_to_closing_parenthesis): Stop at CPP_PRAGMA_EOL;
      	rearrange with switch statement.
      	(cp_parser_skip_to_end_of_statement): Likewise.
      	(cp_parser_skip_to_end_of_block_or_statement): Likewise.
      	(cp_parser_skip_to_closing_brace): Likewise.
      	(cp_parser_skip_until_found): Likewise.
      	(cp_parser_statement): Add in_compound argument; update callers.
      	Use it to decide how to handle pragma parsing.
      	(cp_parser_labeled_statement): Add in_compound argument; pass
      	it on to cp_parser_statement.
      	(cp_parser_statement_seq_opt): Stop at CPP_PRAGMA_EOL.
      	(cp_parser_declaration_seq_opt): Likewise.
      	(cp_parser_parameter_declaration): Likewise.
      	(cp_parser_member_specification_opt): Likewise.
      	(cp_parser_function_definition_after_decl): Likewise.
      	(cp_parser_cache_group): Handle CPP_PRAGMA/CPP_PRAGMA_EOL pairs.
      	(cp_parser_pragma): New.
      	(pragma_lex): New.
      
      gcc/testsuite/
      	* g++.dg/parse/pragma2.C: Update expected error lines.
      
      From-SVN: r109336
      Richard Henderson committed
  9. 02 Dec, 2005 1 commit
    • decl2.c (get_priority_info): Use XNEW, not xmalloc. · 0ac1b889
              * decl2.c (get_priority_info): Use XNEW, not xmalloc.
              * decl.c (push_switch): Likewise.
              * lex.c (handle_pragma_implementation): Likewise.
              * cp-objcp-common.c (decl_shadowed_for_var_insert): Use GGC_NEW,
              not ggc_alloc.
              (cxx_initialize_diagnostics): Use XNEW, not xmalloc.
              * class.c (init_class_processing): Use XNEWVEC, not xmalloc.
              * g++spec.c (lang_specific_driver): Likewise.
              * mangle.c (save_partially_mangled_name): Likewise.
              * parser.c (cp_lexer_new_main): Use GGC_NEWVEC, not ggc_alloc.
              (cp_parser_template_argument_list): Use XNEWVEC, nto xmalloc.
              (cp_parser_sizeof_operand): Likewise.
              * repo.c (open_repo_file, open_repo_file): Likewise.
      
      From-SVN: r107884
      Gabriel Dos Reis committed
  10. 26 Nov, 2005 1 commit
    • c-lex.c (pragma_lex): Rename from c_lex. · 75ce3d48
              * c-lex.c (pragma_lex): Rename from c_lex.
              * c-pch.c: Update for pragma_lex rename.
              * c-pragma.c, c-pragma.h, config/ia64/ia64-c.c: Likewise.
              * config/m32c/m32c-pragma.c, config/darwin-c.c: Likewise.
              * config/rs6000/rs6000-c.c, config/c4x/c4x-c.c: Likewise.
              * config/sol2-c.c, config/v850/v850-c.c: Likewise.
              * doc/tm.texi: Likewise.
      cp/
              * lex.c: Update for pragma_lex rename.
              * parser.c: Likewise.
      
      From-SVN: r107544
      Richard Henderson committed
  11. 25 Jun, 2005 1 commit
  12. 15 Jun, 2005 1 commit
  13. 14 Jun, 2005 1 commit
  14. 27 May, 2005 1 commit
    • cp-tree.def (UNARY_PLUS_EXPR): New C++ unary tree code. · 392e3d51
      	* cp-tree.def (UNARY_PLUS_EXPR): New C++ unary tree code.
      	* parser.c (cp_parser_unary_expression): Use UNARY_PLUS_EXPR instead
      	of CONVERT_EXPR.
      	(cp_parser_unary_expression): Likewise.
      	* typeck.c (build_unary_op): Likewise.
      	* call.c (add_builtin_candidate, build_new_op): Likewise.
      	* error.c (dump_expr): Likewise.
      	* pt.c (tsubst_copy, tsubst_copy_and_build): Likewise.
      	* decl.c (ambi_op_p, grok_op_properties): Likewise.
      	* dump.c (dump_op): Likewise.
      	* lex.c (init_operators): Likewise.
      	* operators.def ("+"): Likewise.
      	* cp-gimplify.c (cp_gimplify_expr): Handle UNARY_PLUS_EXPR like a
      	conversion, if the result and argument types differ.
      	* tree.c (fold_if_not_in_template): Fold UNARY_PLUS_EXPR much
      	like a NOP_EXPR when !processing_template_decl.
      
      	* cxx-pretty-print.c (pp_cxx_cast_expression): Prototype.
      	(pp_cxx_unary_expression): Handle new UNARY_PLUS_EXPR tree code.
      
      Co-Authored-By: Giovanni Bajo <giovannibajo@gcc.gnu.org>
      
      From-SVN: r100285
      Roger Sayle committed
  15. 17 May, 2005 1 commit
    • Yet more Objective-C++... · e58a9aa1
              * cp-objcp-common.h (cxx_get_alias_set): Move from
              here...
              (cxx_warn_unused_global_decl): Likewise.
              (cp_expr_size): Likewise.
              (cp_tree_size): Likewise.
              (cp_var_mod_type_p): Likewise.
              (cxx_initialize_diagnostics): Likewise.
              (cxx_types_compatible_p): Likewise.
              * cp-tree.h: to here.
              (do_poplevel): Add.
              * lex.c (D_OBJC): Add.
              (init_reswords): Add.
              * Make-lang.in (cp/pt.o): Add cp/cp-objcp-common.h.
              * parser.c: Add c-common.h include.
              * pt.c: Add c-common.h and cp-objcp-common.h includes.
              (template_args_equal): Use objc_comptypes as well.
              (tsubst_copy_and_build): Use objcp_tsubst_copy_and_build as well.
              * semantics.c (do_poplevel): Remove static.
      
              * decl.c (objc_mark_locals_volatile): Don't change decls that are
              already ok.
              * decl2.c (generate_ctor_or_dtor_function): Add code to initialize
              Objective C++ early enough.
              * lex.c (struct resword reswords): Add Objective-C++ support.
              * parser.c (cp_lexer_get_preprocessor_token): Add Objective-C++.
              (cp_parser_objc_message_receiver): Add.
              (cp_parser_objc_message_args): Likewise.
              (cp_parser_objc_message_expression): Likewise.
              (cp_parser_objc_encode_expression): Likewise.
              (cp_parser_objc_defs_expression): Likewise.
              (cp_parser_objc_protocol_expression): Likewise.
              (cp_parser_objc_selector_expression): Likewise.
              (cp_parser_objc_expression): Likewise.
              (cp_parser_objc_visibility_spec): Likewise.
              (cp_parser_objc_method_type): Likewise.
              (cp_parser_objc_protocol_qualifiers): Likewise.
              (cp_parser_objc_typename): Likewise.
              (cp_parser_objc_selector_p): Likewise.
              (cp_parser_objc_selector): Likewise.
              (cp_parser_objc_method_keyword_params): Likewise.
              (cp_parser_objc_method_tail_params_opt): Likewise.
              (cp_parser_objc_interstitial_code): Likewise.
              (cp_parser_objc_method_signature): Likewise.
              (cp_parser_objc_method_prototype_list): Likewise.
              (cp_parser_objc_method_definition_list): Likewise.
              (cp_parser_objc_class_ivars): Likewise.
              (cp_parser_objc_identifier_list): Likewise.
              (cp_parser_objc_alias_declaration): Likewise.
              (cp_parser_objc_class_declaration): Likewise.
              (cp_parser_objc_protocol_declaration): Likewise.
              (cp_parser_objc_protocol_refs_opt): Likewise.
              (cp_parser_objc_superclass_or_category): Likewise.
              (cp_parser_objc_class_interface): Likewise.
              (cp_parser_objc_class_implementation): Likewise.
              (cp_parser_objc_end_implementation): Likewise.
              (cp_parser_objc_declaration): Likewise.
              (cp_parser_objc_try_catch_finally_statement): Likewise.
              (cp_parser_objc_synchronized_statement): Likewise.
              (cp_parser_objc_throw_statement): Likewise.
              (cp_parser_objc_statement): Likewise.
              (cp_parser_primary_expression): Add Objective-C++.
              (cp_parser_statement): Likewise.
              (cp_parser_declaration): Likewise.
              (cp_parser_simple_type_specifier): Likewise.
              (cp_parser_type_name): Likewise.
              (cp_parser_parameter_declaration_list): Likewise.
              (cp_parser_member_declaration) Likewise.
              * tree.c: Include debug.h.
              * typeck.c (composite_pointer_type): Add Objective-C++ support.
              (finish_class_member_access_expr): Likewise.
              (build_function_call): Allow objc to rewrite FUNCTION_DECLs.
              (build_modify_expr): Allow objc to generate write barriers.
      
              * Make-lang.in (cp/tree.o): Add debug.h.
              * tree.c (lvalue_p_1, case CONST_DECL): Add.
      
      From-SVN: r99855
      Ziemowit Laski committed
  16. 12 May, 2005 1 commit
    • c-common.h (statement_code_p): Don't declare. · feea5b18
      ./:	* c-common.h (statement_code_p): Don't declare.
      	(STATEMENT_CODE_P): Don't define.
      	(INIT_STATEMENT_CODES): Don't define.
      	* c-common.c (statement_code_p): Don't define.
      cp/:
      	* cp-tree.h (cp_stmt_codes): Don't define.
      	(statement_code_p): Declare.
      	(STATEMENT_CODE_P): Define.
      	* lex.c (statement_code_p): Define.
      	(cxx_init): Use actual codes in stmt_codes initializer, not
      	cp_stmt_codes macro.  Initialize statement_code_p directly, rather
      	than using INIT_STATEMENT_CODES.
      
      From-SVN: r99615
      Ian Lance Taylor committed
  17. 03 May, 2005 1 commit
  18. 02 May, 2005 1 commit
    • re PR c++/19542 (attribute(sentinel) has problems with C++ __null) · b2f97e4a
              PR c++/19542
              * c-common.c (c_common_nodes_and_builtins): Create global null_node.
              (warn_strict_null_sentinel): Define.
              (check_function_sentinel): Check for null_node as valid sentinel too.
              * c-common.h (c_tree_index): Added CTI_NULL.
              (null_node) Define global_tree[CTI_NULL].
              (warn_strict_null_sentinel): Declare.
              * c-opts.c: (c_common_handle_option): Handle -Wstrict-null-sentinel.
              * c.opt: (Wstrict-null-sentinel): New C++ option.
              * doc/invoke.texi (C++ Options): Document -Wstrict-null-sentinel.
      
              * cp-tree.h (cp_tree_index): Remove CPTI_NULL, to be defined in C
              common frontend.
              (null_node): Remove.
              * lex.c (cxx_init): Move null_node initialisation to C common frontend.
      
              * g++.dg/warn/sentinel.C: New testcase for __null sentinels added.
      
      From-SVN: r99091
      Michael Matz committed
  19. 25 Apr, 2005 1 commit
    • c-common.def (EXPR_STMT): Remove, moved to C++ frontend. · 934790cc
      ./	* c-common.def (EXPR_STMT): Remove, moved to C++ frontend.
      	* c-common.h (EXPR_STMT_EXPR): Don't define.
      	(c_common_stmt_codes): Don't define.
      	* c-dump.c (c_dump_tree): Remove EXPR_STMT case.
      	* c-gimplify.c (gimplify_expr_stmt): Remove.
      	(c_gimplify_expr): Remove EXPR_STMT case.
      	* c-objc-common.c (c_objc_common_init): Remove stmt_codes and call
      	to INIT_STATEMENT_CODES.
      	* c-pretty-print.c (pp_c_statement): Just call dump_generic_node.
      cp/
      	* cp-tree.def: Add EXPR_STMT.
      	* cp-tree.h (cp_stmt_codes): Add EXPR_STMT.
      	(EXPR_STMT_EXPR): Define.
      	* cp-gimplify.c: Include "flags.h".
      	(gimplify_expr_stmt): New static function.
      	(cp_gimplify_expr): Handle EXPR_STMT.
      	* cxx-pretty-print.c (pp_cxx_statement): Use pp_cxx_expression
      	rather than pp_expression.
      	(pp_cxx_statement): Handle EXPR_STMT.
      	* dump.c (cp_dump_tree): Handle EXPR_STMT.
      	* lex.c (cxx_init): Don't use c_common_stmt_codes in stmt_codes
      	initializer.
      
      From-SVN: r98731
      Ian Lance Taylor committed
  20. 23 Apr, 2005 1 commit
    • diagnostic.c (warning): Accept parameter to classify warning option. · d4ee4d25
      * diagnostic.c (warning): Accept parameter to classify warning option.
      (warning0): New, for when a pointer to an error() like function is needed.
      * errors.c (warning): Likewise.
      * errors.h (warning, warning0): Adjust prototypes.
      * toplev.h (warning, warning0): Likewise.
      
      * attribs.c, builtins.c, c-common.c, c-decl.c, c-format.c,
      c-gimplify.c, c-lex.c, c-objc-common.c, c-opts.c, c-parser.c,
      c-pragma.c, c-typeck.c, calls.c, cgraph.c, coverage.c, emit-rtl.c,
      fold-const.c, fortran/trans-decl.c, function.c, gcse.c,
      genautomata.c, haifa-sched.c, opts.c, passes.c, regclass.c,
      reload1.c, stmt.c, stor-layout.c, toplev.c, tree-cfg.c,
      tree-dump.c, tree-inline.c, tree-mudflap.c, tree-optimize.c,
      tree-ssa.c, tree.c, varasm.c: Adjust warning() callers.
      
      * config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c,
      config/avr/avr.c, config/bfin/bfin.c, config/c4x/c4x-c.c,
      config/c4x/c4x.c, config/cris/cris.c, config/darwin-c.c,
      config/darwin.c, config/darwin.h, config/h8300/h8300.c,
      config/i386/cygming.h, config/i386/djgpp.h, config/i386/i386.c,
      config/i386/winnt.c, config/ia64/ia64-c.c, config/ia64/ia64.c,
      config/ip2k/ip2k.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c,
      config/m68k/m68k.c, config/mcore/mcore.c, config/mips/mips.c,
      config/mmix/mmix.c, config/ns32k/ns32k.c, config/pa/pa-hpux11.h,
      config/pa/pa.c, config/rs6000/aix43.h, config/rs6000/aix51.h,
      config/rs6000/aix52.h, config/rs6000/darwin.h,
      config/rs6000/rs6000-c.c, config/rs6000/rs6000.c,
      config/s390/s390.c, config/sh/sh.c, config/sh/sh.h,
      config/sh/symbian.c, config/sol2-c.c, config/sol2.c,
      config/stormy16/stormy16.c, config/v850/v850-c.c,
      config/v850/v850.c, config/xtensa/xtensa.c: Adjust warning()
      callers.
      
      * ada/misc.c: Adjust warning() callers.
      
      * cp/call.c, cp/class.c, cp/cvt.c, cp/decl.c, cp/decl2.c,
      cp/except.c, cp/friend.c, cp/init.c, cp/lex.c, cp/mangle.c,
      cp/method.c, cp/name-lookup.c, cp/parser.c, cp/repo.c, cp/rtti.c,
      cp/tree.c, cp/typeck.c, cp/typeck2.c: Adjust warning() callers.
      
      * fortran/trans-decl.c: Adjust warning() callers.
      
      * java/class.c, java/decl.c, java/expr.c, java/jcf-io.c,
      java/jcf-parse.c, java/jv-scan.c, java/parse.y: Adjust warning()
      callers.
      
      * objc/objc-act.c: Adjust warning() callers.
      
      * treelang/parse.y: Adjust warning() callers.
      
      From-SVN: r98633
      DJ Delorie committed
  21. 25 Nov, 2004 1 commit
  22. 24 Nov, 2004 1 commit
    • cp-tree.h (context_as_string): Remove extern. · af746697
      	* 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.
      
      From-SVN: r91134
      Ben Elliston committed
  23. 08 Nov, 2004 1 commit
  24. 05 Oct, 2004 1 commit
    • Convert diagnostics to use quoting flag q 4/n · 2a13a625
              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
      Gabriel Dos Reis committed
  25. 22 Sep, 2004 1 commit
    • cp-tree.h (struct lang_type_class): Remove marked flags, add diamond_shaped and… · 3543e114
      cp-tree.h (struct lang_type_class): Remove marked flags, add diamond_shaped and repeated_base flags.
      
      	* 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.
      
      From-SVN: r87853
      Nathan Sidwell committed
  26. 21 Sep, 2004 1 commit
    • c-common.c (fix_string_type): Build the unqualified array type unconditionally... · c162c75e
      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
      Matt Austern committed
  27. 20 Sep, 2004 1 commit
  28. 18 Sep, 2004 1 commit
    • re PR pch/13361 (const wchar_t * strings not stored in pch) · a396f8ae
      	* tree-inline.c (copy_tree_r): Don't duplicate constants, they're
      	shared anyway.
      
      	PR pch/13361
      	* c-typeck.c (constructor_asmspec): Delete.
      	(struct initializer_stack): Delete field 'asmspec'.
      	(start_init): Delete saving of asmspec.
      	(finish_init): Don't update constructor_asmspec.
      	* dwarf2out.c (rtl_for_decl_location): Duplicate string from tree.
      	* stmt.c (expand_asm): Duplicate strings from tree.
      	(expand_asm_operands): Likewise.
      	* tree.c (tree_size): Update computation of size of STRING_CST.
      	(make_node): Don't make STRING_CST nodes.
      	(build_string): Allocate string with tree node.
      	(tree_code_size): Clean up assertions, don't allow requests
      	for "the size of a STRING_CST".
      	* tree.def (STRING_CST): Update comment.
      	* tree.h (TREE_STRING_POINTER): Adjust for change to STRING_CST.
      	(tree_string): Place contents of string in tree node.
      	* config/sh/sh.c (sh_handle_sp_switch_attribute): Duplicate string
      	from tree.
      
      From-SVN: r87695
      Geoffrey Keating committed
  29. 17 Sep, 2004 1 commit
    • re PR c++/16002 (Strange error message with new parser) · 996c2b52
      	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++/16002
      	* g++.dg/template/error18.C: New test.
      
      	PR c++/16029
      	* g++.dg/warn/Wunused-8.C: New test.
      
      From-SVN: r87633
      Mark Mitchell committed
  30. 10 Sep, 2004 1 commit
    • c-common.h (struct c_fileinfo): Comment moved here from cp-tree.h. · 5d709b00
      	* c-common.h (struct c_fileinfo): Comment moved here from cp-tree.h.
      	(extract_interface_info): Delete prototype.
      	* c-decl.c (extract_interface_info): Delete stub.
      	* c-lex.c (get_fileinfo): Initialize file_info_tree here, if
      	it's not already been done ...
      	(init_c_lex): ... not here.
      	(fe_file_change): Don't call extract_interface_info.
      cp:
      	* 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.
      
      From-SVN: r87329
      Zack Weinberg committed
  31. 09 Sep, 2004 1 commit
    • defaults.h (MULTIPLE_SYMBOL_SPACES): Provide default. · 15072eb1
      	* defaults.h (MULTIPLE_SYMBOL_SPACES): Provide default.
      	* config/arm/pecoff.h, config/i386/beos-elf.h
      	* config/i386/cygming.h, config/i386/i386-interix.h:
      	Define MULTIPLE_SYMBOL_SPACES to 1, not nothing.  Remove
      	comment cloned from manual.
      	* doc/tm.texi: Update description of MULTIPLE_SYMBOL_SPACES.
      cp:
      	* decl2.c (import_export_class)
      	* lex.c (handle_pragma_interface):
      	Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
      
      From-SVN: r87243
      Zack Weinberg committed
  32. 30 Aug, 2004 1 commit
    • call.c (check_dtor_name): Replace abort with gcc_assert or gcc_unreachable. · 8dc2b103
      	* 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
      Nathan Sidwell committed
  33. 25 Aug, 2004 1 commit
  34. 19 Aug, 2004 1 commit
    • tree.h (TYPE_CACHED_VALUES_P): New. · 89b0433e
      	* tree.h (TYPE_CACHED_VALUES_P): New.
      	(TYPE_CACHED_VALUES): New.
      	(TYPE_ORIG_SIZE_TYPE): Adjust.
      	* tree.def (INTEGER_CST): Update documentation.
      	* tree.c: Inlcude params.h.
      	(build_int_cst): Cache small values.
      	(build_type_copy): Do not copy the value cache.
      	* c-common.c (c_common_nodes_and_builtins): Add comment, remove
      	unneeded zeroing.
      	* c-typeck.c (build_c_cast): Add comment about OVERFLOW setting.
      	* expmed.c (const_mult_add_overflow_p): Clear type copy's value
      	cache.
      	* fold-const.c (force_fit_type): Copy value when setting
      	overflows.
      	(int_const_binop): Likewise.
      	* stor-layout.c: Include params.h
      	(set_sizetype): Create values cache.
      	(fixup_unsigned_type): Set UNSIGNED_P before caching any values.
      	* params.def (PARAM_INTEGER_SHARE_LIMIT): New.
      	* params.h (INTEGER_SHARE_LIMIT): New.
      	* Makefile.in (tree.o, stor-layout.o): Depend on PARAMS_H.
      
      	* cp/decl.c (finish_enum): Do not copy value node early, copy
      	later.
      	* cp/lex.c (cxx_init): Force null_node to be unique.
      
      	* java/parse.h (JAVA_RADIX10_FLAG): Rename to ...
      	(JAVA_NOT_RADIX10_FLAG): ... here.  Invert meaning.
      	* java/lex.c (do_java_lex): Adjust.
      	(error_if_numeric_overflow): Likewise.
      
      From-SVN: r86247
      Nathan Sidwell committed
  35. 15 Aug, 2004 1 commit
    • tree.h (build_int_cst): New. · 4a90aeeb
      .:	* 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
      Nathan Sidwell committed
  36. 29 Jul, 2004 1 commit
    • c-common.h (lang_post_pch_load): New variable. · 4684cd27
      	* 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
      Mark Mitchell committed
  37. 25 Jul, 2004 1 commit
    • cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW. · 99dd239f
              * 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.
      
      From-SVN: r85150
      Gabriel Dos Reis committed
  38. 15 Jul, 2004 1 commit
  39. 12 Jul, 2004 1 commit
    • call.c (build_user_type_conversion_1, [...]): Pass type directly to… · cad7e87b
      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
      Nathan Sidwell committed
  40. 07 Jul, 2004 1 commit
    • expr.c (expand_expr_real_1): Fix formating. · 3a18db48
      	* expr.c (expand_expr_real_1): Fix formating.
      	BUFFER_REF and IN_EXPR are dead.
      	* fold-const.c (non_lvalue): BUFFER_REF is dead.
      	* tree-inline.c (estimate_num_insns_1): Likewise.
      	* tree-pretty-print.c (dump_generic_node): BUFFER_REF,
      	IN_EXPR, SET_LE_EXPR, and CARD_EXPR are dead.
      	* tree.def (BUFFER_REF, IN_EXPR, SET_LE_EXPR, CARD_EXPR): Kill.
      cp/ChangeLog:
      	* class.c (instantiate_type): BUFFER_REF is dead.
      	* lex.c (init_operators): IN_EXPR is dead.
      
      From-SVN: r84230
      Andrew Pinski committed