1. 03 Jan, 2018 1 commit
  2. 01 Jan, 2017 1 commit
  3. 04 Jan, 2016 1 commit
  4. 05 Jan, 2015 1 commit
  5. 22 Oct, 2014 1 commit
    • gengtype.h (obstack_chunk_alloc, [...]): Remove cast. · 19a9ba64
      gcc/
      	* gengtype.h (obstack_chunk_alloc, obstack_chunk_free): Remove cast.
      	* coretypes.h (obstack_chunk_alloc, obstack_chunk_free): Likewise.
      	(gcc_obstack_init): Use obstack_specify_allocation in place of
      	_obstack_begin.
      	* genautomata.c (next_sep_el): Cast result of obstack_base to (char *).
      	(regexp_representation): Likewise.
      	* godump.c (go_output_type): Likewise.
      gcc/java/
      	* mangle.c (finish_mangling): Cast result of obstack_base to (char *).
      	* typeck.c (build_java_argument_signature): Likewise.
      	(build_java_signature): Likewise.
      gcc/objc/
      	* objc-encoding.c (encode_array): Cast result of obstack_base.
      	(encode_type): Likewise.
      libcpp/
      	* symtab.c (ht_create): Use obstack_specify_allocation in place of
      	_obstack_begin.
      	* files.c (_cpp_init_files): Likewise.
      	* init.c (cpp_create_reader): Likewise.
      	* identifiers.c (_cpp_init_hashtable): Likewise.
      
      From-SVN: r216539
      Alan Modra committed
  6. 02 Jan, 2014 1 commit
  7. 14 Jan, 2013 1 commit
  8. 15 Aug, 2012 1 commit
    • backport: As described in http://gcc.gnu.org/ml/gcc/2012-08/msg00015.html... · 0823efed
      Merge from cxx-conversion branch (http://gcc.gnu.org/wiki/cxx-conversion).
      
      As described in http://gcc.gnu.org/ml/gcc/2012-08/msg00015.html, this patch
      changes the default bootstrap process so that stage 1 always builds with a C++
      compiler.
      
      Other than the bootstrap change, the patch makes no functional changes to the
      compiler.  Everything should build as it does now in trunk.  The main
      changes in this patch are:
      
      1- Configuration changes.
      2- Re-write of VEC.
      3- Re-write of gengtype to support C++ templates and
         user-provided marking functions.
      4- New hash table class.
      5- Re-write double_int.
      6- Implement tree macros as inline functions so they can be
         called from gdb.
      
      As discussed before, several of these changes do not fully change
      the call sites to use the new APIs.
      
      The bootstrap changes have already been tested on a wide range of
      targets (http://gcc.gnu.org/wiki/CppBuildStatus).  Additionally,
      I have tested the merged trunk on: x86_64-unknown-linux-gnu,
      mips64el-unknown-linux-gnu, powerpc64-unknown-linux-gnu,
      i686-pc-linux-gnu, and ia64-unknown-linux-gnu.
      
      ChangeLog
      2012-08-14   Diego Novillo  <dnovillo@google.com>
      
      	Merge from cxx-conversion branch.
      
      	* Makefile.tpl (STAGE[+id+]_CXXFLAGS): Remove
      	POSTSTAGE1_CONFIGURE_FLAGS.
      	* Makefile.in: Regenerate.
      	* configure.ac (ENABLE_BUILD_WITH_CXX): Remove.  Update all users.
      	Force C++ when bootstrapping.
      	* configure: Regenerate.
      
      
      libcpp/ChangeLog
      2012-08-14   Diego Novillo  <dnovillo@google.com>
      
      	Merge from cxx-conversion branch.  Configury.
      
      	* Makefile.in: Remove all handlers of ENABLE_BUILD_WITH_CXX.
      	* configure.ac: Likewise.
      	* configure: Regenerate.
      
      2012-08-14   Lawrence Crowl  <crowl@google.com>
      
      	Merge from cxx-conversion branch.  New C++ hash table.
      
      	* include/symtab.h (typedef struct ht hash_table): Change the typedef
      	name to cpp_hash_table.  Update all users of the typedef.
      
      gcc/ChangeLog
      2012-08-14   Diego Novillo  <dnovillo@google.com>
      
      	Merge from cxx-conversion branch.  Configury.
      
      	* configure.ac (CXX_FOR_BUILD): Define and substitute.
      	(BUILD_CXXFLAGS): Define.
      	Remove all handlers of ENABLE_BUILD_WITH_CXX.
      	Force all build to be with C++.
      	* Makefile.in (BUILD_CXXFLAGS): Use it.
      	Remove all handlers of ENABLE_BUILD_WITH_CXX.
      	* configure: Regenerate.
      	* config.in: Regenerate.
      	* doc/install.texi: Remove documentation for --enable-build-with-cxx
      	and --enable-build-poststage1-with-cxx.
      
      2012-08-14   Diego Novillo  <dnovillo@google.com>
      
      	Merge from cxx-conversion branch.  Re-implement VEC in C++.
      
      	* vec.c (vec_heap_free): Convert into a template function.
      	(vec_gc_o_reserve_1): Make extern.
      	(vec_gc_p_reserve): Remove.
      	(vec_gc_p_reserve_exact): Remove.
      	(vec_gc_o_reserve): Remove.
      	(vec_gc_o_reserve_exact): Remove.
      	(vec_heap_o_reserve_1): Make extern.
      	(vec_heap_p_reserve): Remove.
      	(vec_heap_p_reserve_exact): Remove.
      	(vec_heap_o_reserve): Remove.
      	(vec_heap_o_reserve_exact): Remove.
      	(vec_stack_p_reserve): Remove.
      	(vec_stack_p_reserve_exact): Remove.
      	* vec.h (VEC_CHECK_INFO, VEC_CHECK_DECL, VEC_CHECK_PASS,
      	VEC_ASSERT, VEC_ASSERT_FAIL, vec_assert_fail): Move earlier
      	in the file.
      	(VEC): Define to vec_t<T>.
      	(vec_allocation_t): Define.
      	(struct vec_prefix): Move earlier in the file.
      	(vec_t<T>): New template.
      	(DEF_VEC_I, DEF_VECL_ALLOC_I, DEF_VEC_P, DEF_VEC_ALLOC_P,
      	DEF_VEC_O, DEF_VEC_ALLOC_P, DEF_VEC_O, DEF_VEC_ALLOC_O,
      	DEF_VEC_ALLOC_P_STACK, DEF_VEC_ALLOC_O_STACK,
      	DEF_VEC_ALLOC_I_STACK): Expand to 'struct vec_swallow_trailing_semi'.
      	(DEF_VEC_A): Provide template instantiations for
      	GC/PCH markers that do not traverse the vector.
      	(vec_stack_p_reserve): Remove.
      	(vec_stack_p_reserve_exact): Remove.
      	(vec_stack_p_reserve_exact_1): Remove.
      	(vec_stack_o_reserve): Remove.
      	(vec_stack_o_reserve_exact): Remove.
      	(vec_stack_free): Re-write as a template function.
      	(vec_reserve): New template function.
      	(vec_reserve_exact): New template function.
      	(vec_heap_free): New template function if GATHER_STATISTICS is
      	defined.  Otherwise, macro that expands to free().
      	(VEC_length_1): New template function.
      	(VEC_length): Call it.
      	(VEC_empty_1): New template function.
      	(VEC_empty): Call it.
      	(VEC_address_1): New template function.
      	(VEC_address): Call it.
      	(VEC_last_1): New template function.
      	(VEC_last): Call it.  Change return type to T&.
      	Change all users that used VEC_Os.
      	(VEC_index_1): New template function.
      	(VEC_index): Call it.  Return a T& instead of a T*.
      	Update all callers that were using VEC_O before.
      	(VEC_iterate_1): New template function.
      	(VEC_iterate): Call it.
      	(VEC_embedded_size_1): New template function.
      	(VEC_embedded_size): Call it.
      	(VEC_embedded_init_1): New template function.
      	(VEC_embedded_init): Call it.
      	(VEC_alloc_1): New template function.
      	(VEC_alloc): Call it.  If A is 'stack', call XALLOCAVAR to
      	do the allocation.
      	(VEC_free_1): New template function.
      	(VEC_free): Call it.
      	(VEC_copy_1): New template function.
      	(VEC_copy): Call it.
      	(VEC_space_1): New template function
      	(VEC_space): Call it.
      	(VEC_reserve_1): New template function.
      	(VEC_reserve): Call it.
      	(VEC_reserve_exact_1): New template function.
      	(VEC_reserve_exact): Call it.
      	(VEC_splice_1): New template function.
      	(VEC_splice): Call it.
      	(VEC_safe_splice_1): New template function.
      	(VEC_safe_splice): Call it.
      	(VEC_quick_push_1): New template function.  Create two overloads, one
      	accepting T, the other accepting T *.  Update all callers
      	where T and T * are ambiguous.
      	(VEC_quick_push): Call it.
      	(VEC_safe_push_1): New template function. Create two overloads, one
      	accepting T, the other accepting T *.  Update all callers
      	where T and T * are ambiguous.
      	(VEC_safe_push): Call it.
      	(VEC_pop_1): New template function.
      	(VEC_pop): Call it.
      	(VEC_truncate_1): New template function.
      	(VEC_truncate): Call it.
      	(VEC_safe_grow_1): New template function.
      	(VEC_safe_grow): Call it.
      	(VEC_safe_grow_cleared_1): New template function.
      	(VEC_safe_grow_cleared): Call it.
      	(VEC_replace_1): New template function.
      	(VEC_replace): Call it.  Always accept T instead of T*.
      	Update all callers that used VEC_Os.
      	(VEC_quick_insert_1): New template function.
      	(VEC_quick_insert): Call it.
      	(VEC_safe_insert_1): New template function.
      	(VEC_safe_insert): Call it.
      	(VEC_ordered_remove_1): New template function.
      	(VEC_ordered_remove): Call it.
      	(VEC_unordered_remove_1): New template function.
      	(VEC_unordered_remove): Call it.
      	(VEC_block_remove_1): New template function.
      	(VEC_block_remove): Call it.
      	(VEC_lower_bound_1): New template function.
      	(VEC_lower_bound): Call it.
      	(VEC_OP): Remove.
      	(DEF_VEC_FUNC_P): Remove.
      	(DEF_VEC_ALLOC_FUNC_P): Remove.
      	(DEF_VEC_NONALLOC_FUNCS_P): Remove.
      	(DEF_VEC_FUNC_O): Remove.
      	(DEF_VEC_ALLOC_FUNC_O): Remove.
      	(DEF_VEC_NONALLOC_FUNCS_O): Remove.
      	(DEF_VEC_ALLOC_FUNC_I): Remove.
      	(DEF_VEC_NONALLOC_FUNCS_I): Remove.
      	(DEF_VEC_ALLOC_FUNC_P_STACK): Remove.
      	(DEF_VEC_ALLOC_FUNC_O_STACK): Remove.
      	(DEF_VEC_ALLOC_FUNC_I_STACK): Remove.
      	(vec_reserve_exact): New template function.
      
      	* gengtype-lex.l (DEF_VEC_ALLOC_[IOP]/{EOID}): Remove.
      	* gengtype-parse.c (token_names): Remove DEF_VEC_ALLOC_[IOP].
      	(typedef_name): Emit vec_t<C1> instead of VEC_C1_C2.
      	(def_vec_alloc): Remove.  Update all callers.
      	* gengtype.c (filter_type_name): New.
      	(output_mangled_typename): Call it.
      	(write_func_for_structure): Likewise.
      	(write_types): Likewise.
      	(write_root): Likewise.
      	(write_typed_alloc_def): Likewise.
      	(note_def_vec): Emit vec_t<TYPE_NAME> instead of VEC_TYPE_NAME_base.
      	(note_def_vec_alloc): Remove.
      	* gengtype.h (note_def_vec_alloc): Remove.
      	(DEFVEC_ALLOC): Remove token code.
      
      	* df-scan.c (df_bb_verify): Remove call to df_free_collection_rec
      	inside the insn traversal loop.
      	* gimplify.c (gimplify_compound_lval): Rename STACK to EXPR_STACK.
      	* ipa-inline.c (inline_small_functions): Rename HEAP to EDGE_HEAP.
      	* reg-stack.c (stack): Rename to STACK_PTR.  Update all users.
      	* tree-vrp.c (stack): Rename to EQUIV_STACK.  Update all users.
      
      	* config/bfin/bfin.c (hwloop_optimize): Update some calls to
      	VEC_* for vectors of non-pointers.
      	* config/c6x/c6x.c (try_rename_operands): Likewise.
      	(reshuffle_units): Likewise.
      	* config/mips/mips.c (mips_multi_start): Likewise.
      	(mips_multi_add): Likewise.
      	(mips_multi_copy_insn): Likewise.
      	(mips_multi_set_operand): Likewise.
      	* hw-doloop.c (discover_loop): Likewise.
      	(discover_loops): Likewise.
      	(reorg_loops): Likewise.
      
      2012-08-14   Diego Novillo  <dnovillo@google.com>
      
      	Merge from cxx-conversion branch.  C++ support in gengtype.
      
      	* coretypes.h (gt_pointer_operator): Move from ...
      	* ggc.h: ... here.
      	* doc/gty.texi: Document support for C++ templates and
      	user-provided markers.
      	* gcc/gengtype-lex.l: Update copyright year.
      	Remove support for recognizing DEF_VEC_O, DEF_VEC_P and
      	DEFVEC_I.
      	* gengtype-parse.c: Update copyright year.
      	(token_names): Remove DEF_VEC_O, DEF_VEC_P and DEF_VEC_I.
      	(require_template_declaration): New.
      	(typedef_name): Call it.
      	(type): Replace IS_UNION with KIND. Replace all users.
      	(def_vec): Remove.  Update all users.
      	* gengtype-state.c (type_lineloc): Handle TYPE_USER_STRUCT.
      	(write_state_user_struct_type): New.
      	(write_state_type): Call it.
      	(read_state_user_struct_type): New.
      	(read_state_type): Call it.
      	* gengtype.c: Update copyright year.
      	(dump_pair): Move declaration to the top.
      	(dump_type): Likewise.
      	(dump_type_list): Likewise.
      	(dbgprint_count_type_at): Handle TYPE_USER_STRUCT.
      	(create_user_defined_type): New.
      	(resolve_typedef): Call it.
      	(new_structure): Replace argument ISUNION with KIND.
      	Change users to refer to KIND directly.
      	Update all callers.
      	(find_structure): Likewise.
      	(set_gc_used_type): Handle TYPE_USER_STRUCT.
      	(create_file): Update HDR to include new copyright year.
      	(struct walk_type_data): Add field IN_PTR_FIELD.
      	(output_mangled_typename): Handle TYPE_USER_STRUCT.
      	(walk_type): Set D->IN_PTR_FIELD when walking a TYPE_POINTER.
      	Clear it afterwards.
      	Handle TYPE_USER_STRUCT.
      	(write_types_process_field): Handle TYPE_USER_STRUCT.
      	(get_type_specifier): Move earlier in the file.
      	(write_type_decl): New.
      	(write_marker_function_name): New.
      	(write_user_func_for_structure_ptr): New.
      	(write_user_func_for_structure_body): New.
      	(write_user_marking_functions): New.
      	(write_func_for_structure): Call write_marker_function_name
      	and write_type_decl.
      	Do not call walk_type for TYPE_USER_STRUCT. Emit a call to the user
      	function directly.
      	Call write_user_marking_functions on TYPE_USER_STRUCTs.
      	(write_types_local_user_process_field): New.
      	(write_pch_user_walking_for_structure_body): New.
      	(write_pch_user_walking_functions): New.
      	(write_types_local_process_field): Handle TYPE_USER_STRUCT.
      	(write_local_func_for_structure): Do not call walk_type for
      	TYPE_USER_STRUCT. Instead, emit the call to gt_pch_nx directly.
      	Call write_pch_user_walking_functions for TYPE_USER_STRUCTs.
      	(write_root): Handle TYPE_USER_STRUCT.
      	(vec_prefix_type): Remove.  Update all users.
      	(note_def_vec): Remove.  Update all users.
      	(dump_typekind): Handle TYPE_USER_STRUCT.
      	(dump_type): Initialize SEEN_TYPES, if needed.
      	Handle TYPE_USER_STRUCT.
      	(dump_everything): Do not initialize SEEN_TYPES.
      	* gengtype.h: Update copyright year.
      	(enum typekind): Add TYPE_USER_STRUCT.
      	(union_or_struct_p): Rename from UNION_OR_STRUCT_P.
      	Convert into function.
      	Add an overload taking const_type_p.
      	Update all callers.
      	(new_structure): Change second field to type enum typekind.
      	Update all users.
      	(find_structure): Likewise.
      	(note_def_vec): Remove.
      	(DEFVEC_OP): Remove.
      	(DEFVEC_I): Remove.
      	* ggc-page.c (gt_ggc_mx): Add entry points for marking
      	'const char *&', 'unsigned char *&' and 'unsigned char&'.
      	* ggc-zone.c (gt_ggc_mx): Add entry points for marking
      	'const char *&' and 'unsigned char *&'.
      	* stringpool.c (gt_pch_nx): Add entry points for marking
      	'const char *&', 'unsigned char *&' and 'unsigned char&'.
      	Add an entry point for the overload taking arguments 'unsigned char
      	*', 'gt_pointer_operator' and 'void *'.
      	* vec.h (struct vec_prefix): Remove GTY marker.
      	(struct vec_t): Remove GTY((length)) attribute from field 'vec'.
      	(gt_ggc_mx (vec_t<T> *)): New template function.
      	(gt_pch_nx (vec_t<T> *)): New template function.
      	(gt_pch_nx (vec_t<T *> *, gt_pointer_operator, void *)): New template
      	function.
      	(gt_pch_nx (vec_t<T> *, gt_pointer_operator, void *)): New template
      	function.
      
      	* basic-block.h (struct edge_def): Mark GTY((user)).
      	Remove all GTY markers from fields.
      	(gt_ggc_mx): Declare.
      	(gt_pch_nx): Declare.
      	* tree-cfg.c (gt_ggc_mx): New.
      	(gt_pch_nx): New.
      
      	* gengtype-lex.l (USER_GTY): Add pattern for "user".
      	* gengtype-parse.c (option): Handle USER_GTY.
      	(opts_have): New.
      	(type): Call it.
      	If the keyword 'user' is used, do not walk the fields
      	of the structure.
      	* gengtype.h (USER_GTY): Add.
      	* doc/gty.texi: Update.
      
      2012-08-14   Lawrence Crowl  <crowl@google.com>
      
      	Merge cxx-conversion branch.  Implement C++ hash table.
      
      	* hash-table.h: New. Implementation borrowed from libiberty/hashtab.c.
      	* hash-table.c: Likewise.
      	* tree-ssa-tail-merge.c: Include hash-table.h instead of hashtab.h.
      	(static htab_t same_succ_htab): Change type to hash_table;
      	move specification of helper functions from create call to declaration.
      	Change users to invoke member functions.
      	(same_succ_print_traverse): Make extern ssa_.... Change callers.
      	Remove void* casting.
      	(same_succ_hash): Likewise.
      	(same_succ_equal): Likewise.
      	(same_succ_delete): Likewise.
      	* tree-ssa-threadupdate.c: Include hash-table.h.
      	(struct local_info): Rename to ssa_local_info_t to avoid overloading
      	the type name local_info with the variable name local_info.
      	(static htab_t redirection_data): Change type to hash_table.
      	Move specification of helper functions from create call to declaration.
      	Change users to invoke member functions.
      	(redirection_data_hash): Make extern ssa_.... Change callers.
      	Remove void* casting.
      	(redirection_data_eq): Likewise.
      	(fix_duplicate_block_edges): Likewise.
      	(create_duplicates): Likewise.
      	(fixup_template_block): Likewise.
      	(redirect_edges): Likewise.
      	(lookup_redirection_data): Change types associated with the hash table
      	from void* to their actual type. Remove unnecessary casts.
      	* tree-ssa-ccp.c: Include hash-table.h.
      	(typedef gimple_htab): New.  Uses hash_table.  Replace specific uses
      	of htab_t with gimple_htab.  Change users to invoke member functions.
      	Move specification of helper functions from create call to declaration.
      	* tree-ssa-coalesce.c: Include hash-table.h instead of hashtab.h.
      	(hash_ssa_name_by_var): Make extern. Remove void* casting.
      	(eq_ssa_name_by_var): Likewise.
      	(coalesce_ssa_name): Change type of local static htab_t ssa_name_hash
      	to hash_table. Change users to invoke member functions.
      	Move specification of helper functions from create call to declaration.
      	* coverage.c: Include hash-table.h instead of hashtab.h.
      	(static htab_t counts_hash): Change type to hash_table;
      	move specification of helper functions from create call to declaration.
      	Change users to invoke member functions.
      	(htab_counts_entry_hash): Make extern. Rename with coverage_... instead
      	of htab_... Remove void* casting.
      	(htab_counts_entry_eq): Likewise.
      	(htab_counts_entry_del): Likewise.
      	* tree-ssa-pre.c: Include hash-table.h instead of hashtab.h.
      	(static htab_t expression_to_id): Change type to hash_table.
      	Move specification of helper functions from create call to declaration.
      	Change users to invoke member functions.
      	(static htab_t phi_translate_table): Likewise.
      	(pre_expr_eq): Make extern ssa_.... Change callers.
      	Remove void* casting.
      	(pre_expr_hash): Likewise.
      	(expr_pred_trans_hash): Likewise.
      	(expr_pred_trans_eq): Likewise.
      	(alloc_expression_id): Change types associated with the hash table
      	from void* to their actual type. Remove unnecessary casts.
      	(lookup_expression_id): Likewise.
      	(phi_trans_lookup): Likewise.
      	(phi_trans_add): Likewise.
      	* stringpool.c: Rename uses of libcpp typedef hash_table to
      	cpp_hash_table.
      	* Makefile.in: Add hash-table.o to OBJS-libcommon-target.
      	Add $(HASH_TABLE_H). Add new dependences on $(HASH_TABLE_H).
      
      2012-08-14   Lawrence Crowl  <crowl@google.com>
      
      	Merge from cxx-conversion branch.  Re-write double_int in C++.
      
      	* hash-table.h
      	(typedef double_int): Change to struct (POD).
      	(double_int::make): New overloads for int to double-int conversion.
      	(double_int::mask): New.
      	(double_int::max_value): New.
      	(double_int::min_value): New.
      	(double_int::operator ++): New.
      	(double_int::operator --): New.
      	(double_int::operator *=): New.
      	(double_int::operator +=): New.
      	(double_int::operator -=): New.
      	(double_int::to_signed): New.
      	(double_int::to_unsigned): New.
      	(double_int::fits_unsigned): New.
      	(double_int::fits_signed): New.
      	(double_int::fits): New.
      	(double_int::trailing_zeros): New.
      	(double_int::popcount): New.
      	(double_int::multiple_of): New.
      	(double_int::set_bit): New.
      	(double_int::mul_with_sign): New.
      	(double_int::operator * (binary)): New.
      	(double_int::operator + (binary)): New.
      	(double_int::operator - (binary)): New.
      	(double_int::operator - (unary)): New.
      	(double_int::operator ~ (unary)): New.
      	(double_int::operator & (binary)): New.
      	(double_int::operator | (binary)): New.
      	(double_int::operator ^ (binary)): New.
      	(double_int::and_not): New.
      	(double_int::lshift): New.
      	(double_int::rshift): New.
      	(double_int::alshift): New.
      	(double_int::arshift): New.
      	(double_int::llshift): New.
      	(double_int::lrshift): New.
      	(double_int::lrotate): New.
      	(double_int::rrotate): New.
      	(double_int::div): New.
      	(double_int::sdiv): New.
      	(double_int::udiv): New.
      	(double_int::mod): New.
      	(double_int::smod): New.
      	(double_int::umod): New.
      	(double_int::divmod): New.
      	(double_int::sdivmod): New.
      	(double_int::udivmod): New.
      	(double_int::ext): New.
      	(double_int::zext): New.
      	(double_int::sext): New.
      	(double_int::is_zero): New.
      	(double_int::is_one): New.
      	(double_int::is_minus_one): New.
      	(double_int::is_negative): New.
      	(double_int::cmp): New.
      	(double_int::ucmp): New.
      	(double_int::scmp): New.
      	(double_int::ult): New.
      	(double_int::ugt): New.
      	(double_int::slt): New.
      	(double_int::sgt): New.
      	(double_int::max): New.
      	(double_int::smax): New.
      	(double_int::umax): New.
      	(double_int::min): New.
      	(double_int::smin): New.
      	(double_int::umin): New.
      	(double_int::operator ==): New.
      	(double_int::operator !=): New.
      	(shwi_to_double_int): Change implementation to use member function.
      	(double_int_minus_one): Likewise.
      	(double_int_zero): Likewise.
      	(double_int_one): Likewise.
      	(double_int_two): Likewise.
      	(double_int_ten): Likewise.
      	(uhwi_to_double_int): Likewise.
      	(double_int_to_shwi): Likewise.
      	(double_int_to_uhwi): Likewise.
      	(double_int_fits_in_uhwi_p): Likewise.
      	(double_int_fits_in_shwi_p): Likewise.
      	(double_int_fits_in_hwi_p): Likewise.
      	(double_int_mul): Likewise.
      	(double_int_mul_with_sign): Likewise.
      	(double_int_add): Likewise.
      	(double_int_sub): Likewise.
      	(double_int_neg): Likewise.
      	(double_int_div): Likewise.
      	(double_int_sdiv): Likewise.
      	(double_int_udiv): Likewise.
      	(double_int_mod): Likewise.
      	(double_int_smod): Likewise.
      	(double_int_umod): Likewise.
      	(double_int_divmod): Likewise.
      	(double_int_sdivmod): Likewise.
      	(double_int_udivmod): Likewise.
      	(double_int_multiple_of): Likewise.
      	(double_int_setbit): Likewise.
      	(double_int_ctz): Likewise.
      	(double_int_not): Likewise.
      	(double_int_ior): Likewise.
      	(double_int_and): Likewise.
      	(double_int_and_not): Likewise.
      	(double_int_xor): Likewise.
      	(double_int_lshift): Likewise.
      	(double_int_rshift): Likewise.
      	(double_int_lrotate): Likewise.
      	(double_int_rrotate): Likewise.
      	(double_int_cmp): Likewise.
      	(double_int_scmp): Likewise.
      	(double_int_ucmp): Likewise.
      	(double_int_max): Likewise.
      	(double_int_smax): Likewise.
      	(double_int_umax): Likewise.
      	(double_int_min): Likewise.
      	(double_int_smin): Likewise.
      	(double_int_umin): Likewise.
      	(double_int_ext): Likewise.
      	(double_int_sext): Likewise.
      	(double_int_zext): Likewise.
      	(double_int_mask): Likewise.
      	(double_int_max_value): Likewise.
      	(double_int_min_value): Likewise.
      	(double_int_zero_p): Likewise.
      	(double_int_one_p): Likewise.
      	(double_int_minus_one_p): Likewise.
      	(double_int_equal_p): Likewise.
      	(double_int_popcount): Likewise.
      	* hash-table.c
      	(double_int_mask): Reuse implementation for double_int::mask.
      	(double_int_max_value): Likewise.
      	(double_int_min_value): Likewise.
      	(double_int_ext): Likewise.
      	(double_int_zext): Likewise.
      	(double_int_sext): Likewise.
      	(double_int_mul_with_sign): Likewise.
      	(double_int_divmod): Likewise.
      	(double_int_sdivmod): Likewise.
      	(double_int_udivmod): Likewise.
      	(double_int_div): Likewise.
      	(double_int_sdiv): Likewise.
      	(double_int_udiv): Likewise.
      	(double_int_mod): Likewise.
      	(double_int_smod): Likewise.
      	(double_int_umod): Likewise.
      	(double_int_multiple_of): Likewise.
      	(double_int_lshift): Likewise.
      	(double_int_rshift): Likewise.
      	(double_int_lrotate): Likewise.
      	(double_int_rrotate): Likewise.
      	(double_int_cmp): Likewise.
      	(double_int_ucmp): Likewise.
      	(double_int_scmp): Likewise.
      	(double_int_max): Likewise.
      	(double_int_smax): Likewise.
      	(double_int_umax): Likewise.
      	(double_int_min): Likewise.
      	(double_int_smin): Likewise.
      	(double_int_umin): Likewise.
      	(double_int_min): Likewise.
      	(double_int_min): Likewise.
      	(double_int_min): Likewise.
      	(double_int_min): Likewise.
      	(double_int_min): Likewise.
      	(double_int_min): Likewise.
      	(double_int::alshift): New.
      	(double_int::arshift): New.
      	(double_int::llshift): New.
      	(double_int::lrshift): New.
      	(double_int::ult): New.
      	(double_int::ugt): New.
      	(double_int::slt): New.
      	(double_int::sgt): New.
      	(double_int_setbit): Reuse implementation for double_int::set_bit,
      	which avoids a name conflict with a macro.
      	(double_int_double_int_ctz): Reuse implementation for
      	double_int::trailing_zeros.
      	(double_int_fits_in_shwi_p): Reuse implementation for
      	double_int::fits_signed.
      	(double_int_fits_in_hwi_p): Reuse implementation for double_int::fits.
      	(double_int_mul): Reuse implementation for binary
      	double_int::operator *.
      	(double_int_add): Likewise.
      	(double_int_sub): Likewise.
      	(double_int_neg): Reuse implementation for unary
      	double_int::operator -.
      	(double_int_max_value): Likewise.
      	* fixed-value.c: Change to use member functions introduced above.
      
      2012-08-14   Lawrence Crowl  <crowl@google.com>
      
      	Merge cxx-conversion branch.  Support tree macro calling
      	from gdb.
      
      	* tree.h (tree_check): New.
      	(TREE_CHECK): Use inline function above instead of __extension__.
      	(tree_not_check): New.
      	(TREE_NOT_CHECK): Use inline function above instead of __extension__.
      	(tree_check2): New.
      	(TREE_CHECK2): Use inline function above instead of __extension__.
      	(tree_not_check2): New.
      	(TREE_NOT_CHECK2): Use inline function above instead of __extension__.
      	(tree_check3): New.
      	(TREE_CHECK3): Use inline function above instead of __extension__.
      	(tree_not_check3): New.
      	(TREE_NOT_CHECK3): Use inline function above instead of __extension__.
      	(tree_check4): New.
      	(TREE_CHECK4): Use inline function above instead of __extension__.
      	(tree_not_check4): New.
      	(TREE_NOT_CHECK4): Use inline function above instead of __extension__.
      	(tree_check5): New.
      	(TREE_CHECK5): Use inline function above instead of __extension__.
      	(tree_not_check5): New.
      	(TREE_NOT_CHECK5): Use inline function above instead of __extension__.
      	(contains_struct_check): New.
      	(CONTAINS_STRUCT_CHECK): Use inline function above instead of
      	__extension__.
      	(tree_class_check): New.
      	(TREE_CLASS_CHECK): Use inline function above instead of __extension__.
      	(tree_range_check): New.
      	(TREE_RANGE_CHECK): Use inline function above instead of __extension__.
      	(omp_clause_subcode_check): New.
      	(OMP_CLAUSE_SUBCODE_CHECK): Use inline function above instead of
      	__extension__.
      	(omp_clause_range_check): New.
      	(OMP_CLAUSE_RANGE_CHECK): Use inline function above instead of
      	__extension__.
      	(expr_check): New.
      	(EXPR_CHECK): Use inline function above instead of __extension__.
      	(non_type_check): New.
      	(NON_TYPE_CHECK): Use inline function above instead of __extension__.
      	(tree_vec_elt_check): New.
      	(TREE_VEC_ELT_CHECK): Use inline function above instead of
      	__extension__.
      	(omp_clause_elt_check): New.
      	(OMP_CLAUSE_ELT_CHECK): Use inline function above instead of
      	__extension__.
      	(tree_operand_check): New.
      	(TREE_OPERAND_CHECK): Use inline function above instead of
      	__extension__.
      	(tree_operand_check_code): New.
      	(TREE_OPERAND_CHECK_CODE): Use inline function above instead of
      	__extension__.
      	(TREE_CHAIN): Simplify implementation.
      	(TREE_TYPE): Simplify implementation.
      	(tree_operand_length): Move for compilation dependences.
      	* gdbinit.in: (macro define __FILE__): New.
      	(macro define __LINE__): New.
      	(skip "tree.h"): New.
      
      gcc/cp/ChangeLog
      2012-08-14   Diego Novillo  <dnovillo@google.com>
      
      	Merge from cxx-conversion branch.  Re-write VEC in C++.
      
      	* call.c (add_function_candidate): Remove const qualifier
      	from call to VEC_index.
      
      2012-08-14   Diego Novillo  <dnovillo@google.com>
      
      	Merge from cxx-conversion branch.  Configury.
      
      	* go-c.h: Remove all handlers of ENABLE_BUILD_WITH_CXX.
      	* go-gcc.cc: Likewise.
      	* go-system.h: Likewise.
      
      From-SVN: r190402
      Diego Novillo committed
  9. 18 Jul, 2009 1 commit
    • directives.c (do_linemarker, do_line): Use CPP_STRING for ignored enum value. · f1bf410c
      2009-07-17  Jerry Quinn  <jlquinn@optonline.net>
      
      	* directives.c (do_linemarker, do_line): Use CPP_STRING for
      	ignored enum value.
      	* files.c (find_file_in_dir): Add cast from void* to char*.
      	* symtab.c (ht_lookup_with_hash): Add cast from void* to char*.
      	* Makefile.in: (WARN_CFLAGS): Use general and C-specific
      	warnings.
      	(CXX, CXXFLAGS, WARN_CXXFLAGS, ALL_CXXFLAGS,
      	ENABLE_BUILD_WITH_CXX, CCDEPMODE, CXXDEPMODE, COMPILER,
      	COMPILER_FLAGS): New.
      	(DEPMODE): Set from CCDEPMODE or CXXDEPMODE.
      	(COMPILE.base): Use COMPILER instead of CC.  Use COMPILER_FLAGS
      	instead of ALL_CFLAGS.
      	* configure.ac: Invoke AC_PROG_CXX.  Separate C-specific warnings
      	from other warnings.  Add -Wc++-compat to C-specific warnings.
      	Check for --enable-build-with-cxx.  Set and substitute
      	ENABLE_BUILD_WITH_CXX.  Invoke ZW_PROG_COMPILER_DEPENDENCIES
      	according to ENABLE_BUILD_WITH_CXX.  Invoke AC_LANG before
      	AC_CHECK_HEADERS.
      	* configure: Rebuild.
      	* include/cpp-id-data.h: Remove extern "C".
      	* include/line-map.h: Likewise.
      	* include/mkdeps.h: Likewise.
      	* include/symtab.h: Likewise.
      	* internal.h: Likewise.
      
      From-SVN: r149763
      Jerry Quinn committed
  10. 09 Apr, 2009 1 commit
  11. 21 May, 2008 1 commit
    • symtab.h (HT_ALLOCED): Remove. · dae4174e
      libcpp
      	* include/symtab.h (HT_ALLOCED): Remove.
      	(ht_purge): Declare.
      	* symtab.c (DELETED): New define.
      	(ht_lookup): Update comment.
      	(ht_lookup_with_hash): Handle deleted entries.  Remove HT_ALLOCED
      	code.  Use subobject allocator for strings, if it exists.
      	(ht_expand): Handle deleted entries.
      	(ht_forall): Likewise.
      	(ht_purge): New function.
      	(ht_dump_statistics): Print deletion statistics.
      gcc
      	* ggc-zone.c (lookup_page_table_if_allocated): New function.
      	(zone_find_object_offset): Likewise.
      	(gt_ggc_m_S): Likewise.
      	(highest_bit): Likewise.
      	* ggc-page.c (gt_ggc_m_S): New function.
      	* stringpool.c (string_stack): Remove.
      	(init_stringpool): Update.
      	(ggc_alloc_string): Use ggc_alloc.
      	(maybe_delete_ident): New function.
      	(ggc_purge_stringpool): Likewise.
      	(gt_ggc_m_S): Remove.
      	* ggc-common.c (ggc_protect_identifiers): New global.
      	(ggc_mark_roots): Call ggc_purge_stringpool.  Use
      	ggc_protect_identifiers.
      	* ggc.h (ggc_protect_identifiers): Declare.
      	(gt_ggc_m_S): Update.
      	(ggc_purge_stringpool): Declare.
      	* toplev.c (compile_file): Set and reset ggc_protect_identifiers.
      	* gengtype.c (write_types_process_field) <TYPE_STRING>: Remove
      	special case.
      	(write_root): Cast gt_ggc_m_S to gt_pointer_walker.
      gcc/cp
      	* mangle.c (save_partially_mangled_name): Remove.
      	(restore_partially_mangled_name): Likewise.
      	(write_encoding): Update.
      	(write_unqualified_name): Likewise.
      	(start_mangling): Always use name_obstack.  Remove 'ident_p'
      	argument.
      	(get_identifier_nocopy): Remove.
      	(finish_mangling_internal): Rename from finish_mangling.
      	(finish_mangling): New function.
      	(finish_mangling_get_identifier): Likewise.
      	(partially_mangled_name, partially_mangled_name_len): Remove.
      	(mangle_decl_string): Change return type.  Update.
      	(mangle_decl, mangle_type_string, mangle_special_for_type,
      	mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable,
      	mangle_ref_init_variable): Update.
      
      From-SVN: r135720
      Tom Tromey committed
  12. 29 Jun, 2005 1 commit
  13. 28 May, 2005 1 commit
    • configure.ac: Check declarations for asprintf and vasprintf. · c3f829c1
      	* configure.ac: Check declarations for asprintf and vasprintf.
      	* config.in: Regenerate.
      	* configure: Likewise.
      
      	* charset.c (conversion_loop): Use XRESIZEVEC.
      	(convert_no_conversion): Likewise.
      	(convert_using_iconv): Likewise.
      	(init_iconv_desc): Cast return value of alloca.
      	(cpp_host_to_exec_charset): Use XNEWVEC.
      	(emit_numeric_escape): Use XRESIZEVEC.
      	(cpp_interpret_string): Use XNEWVEC.
      	(cpp_interpret_string): Use XRESIZEVEC.
      	(_cpp_interpret_identifier): Cast return value of alloca.
      	(_cpp_convert_input): Use XNEWVEC and XRESIZEVEC.
      	* directives.c (glue_header_name): Use XNEWVEC and XRESIZEVEC.
      	(parse_include): Use XNEWVEC.
      	(insert_pragma_entry): Rename local variable "new" to
      	"new_entry".
      	(save_registered_pragmas): Cast return value of xmemdup.
      	(destringize_and_run): Same for alloca.
      	(parse_assertion): Likewise.
      	(do_assert): Cast allocated storage to proper type.
      	(cpp_define): Likewise.
      	(_cpp_define_builtin): Likewise.
      	(cpp_undef): Likewise.
      	(handle_assertion): Likewise.
      	(cpp_push_buffer): Rename local variable "new" to "new_buffer".
      	* expr.c (CPP_UPLUS): Cast value to type cpp_ttype.
      	(CPP_UMINUS): Likewise.
      	(struct cpp_operator): Rename from struct operator.
      	(_cpp_expand_op_stack): Use XRESIZEVEC.
      	* files.c (pch_open_file): Use XNEWVEC.
      	(pch_open_file): Use XRESIZEVEC.
      	(read_file_guts): Use XNEWVEC and XRESIZEVEC.
      	(dir_name_of_file): Use XNEWVEC.
      	(make_cpp_file): Use XCNEW.
      	(make_cpp_dir): Likewise.
      	(allocate_file_hash_entries): USE XNEWVEC.
      	(cpp_included): Cast return value of htab_find_with_hash.
      	(append_file_to_dir): Use XNEWVEC.
      	(read_filename_string): Likewise. Use XRESIZEVEC too.
      	(read_name_map): Cast return value of alloca.  Use XRESIZEVEC.
      	(remap_filename): Use XNEWVEC.
      	(struct pchf_entry): Move definition out of struct pchf_data.
      	(_cpp_save_file_entries): Use XCNEWVAR.
      	(_cpp_read_file_entries): Use XNEWVAR.
      	* identifiers.c (alloc_node): Use XOBNEW.
      	* init.c (cpp_create_reader): Use XCNEW.
      	(cpp_init_builtins): Cast of b->value to enum builtin_type.
      	(read_original_directory): Cast return value of alloca.
      	* lex.c (add_line_note): Use XRESIZEVEC.
      	(warn_about_normalization): Use XNEWVEC.
      	(_cpp_lex_direct): Cast node->directive_index to (enum cpp_ttype).
      	(new_buff): Use XNEWVEC.
      	* line-map.c (linemap_add): Use XRESIZEVEC.
      	* macro.c (builtin_macro): Cast return value of alloca.
      	(paste_tokens): Likewise.
      	(expand_arg): Use XNEWVEC and XRESIZEVEC.
      	(_cpp_save_parameter): Use XRESIZEVEC.
      	(create_iso_definition): Cast allocated storage to proper type.
      	(_cpp_create_definition): Likewise.
      	(cpp_macro_definition): Use XRESIZEVEC.
      	* makedepend.c (add_clm): Use XNEW.
      	(add_dir): Likewise.
      	* mkdeps.c (munge): Use XNEWVEC.
      	(deps_init): Use XCNEW.
      	(deps_add_target): Use XRESIZEVEC.
      	(deps_add_default_target): Cast return value of alloca.
      	(deps_add_dep): Use XRESIZEVEC.
      	(deps_add_vpath): Likewise.  Use XNEWVEC too.
      	(deps_restore): Likewise.
      	* pch.c (save_idents): Use XNEW and XNEWVEC.
      	(cpp_save_state): Use XNEW.
      	(count_defs): Cast return value of htab_find.
      	(write_defs): Likewise.
      	(cpp_write_pch_deps): Use XNEWVEC.
      	(collect_ht_nodes): Use XRESIZEVEC.
      	(cpp_valid_state): Use XNEWVEC.
      	(save_macros): Use XRESIZEVEC.  Cast return value of xmemdup.
      	* symtab.c (ht_create): Use XCNEW.
      	(ht_lookup_with_hash): Cast return value of obstack_copy0.
      	(ht_expand): Use XCNEWVEC.
      	* system.h (HAVE_DESIGNATED_INITIALIZERS): False if __cplusplus.
      	(bool): Do not define if __cplusplus.
      
      From-SVN: r100295
      Gabriel Dos Reis committed
  14. 06 Sep, 2004 1 commit
  15. 05 Jun, 2004 1 commit
    • Makefile.am: Add makedepend. · c6e83800
      libcpp:
      	* Makefile.am: Add makedepend.
      	* Makefile.in, aclocal.m4: Regenerate.
      	* charset.c: Insert a space to avoid a warning.
      	* directives.c: Include mkdeps.h.
      	(_cpp_handle_directive): Reenable macro expander if appropriate.
      	(undefine_macros): Inline body of _cpp_free_definition for speed.
      	Do not call undef callback or _cpp_warn_if_unused_macro.
      	(cpp_get_deps): New interface.
      	* files.c (search_cache): Add pfile argument.  Check for file
      	that would be found by "" or <> search here...
      	(_cpp_find_file): ...not here.  Correct recorded start_dir of
      	files found by directory-of-current-file search that would be
      	found by "" or <> search.
      	* init.c (cpp_add_dependency_target): Delete.
      	* internal.h (struct lexer_state): Add discarding_output flag.
      	* lex.c (lex_identifier): Compute hash function while scanning.
      	* macro.c (cpp_scan_nooutput): Disable macro expansion outside
      	directives.
      	* makedepend.c: New file.
      	* mkdeps.c (struct deps): Add vpath vector.
      	(apply_vpath, deps_add_vpath): New function.
      	(deps_free): Free vpath vector.
      	(deps_add_dep, deps_add_target): Use apply_vpath.
      	* symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
      	(ht_lookup_with_hash): New function.
      	* cpplib.h, mkdeps.h: Update prototypes.
      	* symtab.h: Update prototypes.
      	(HT_HASHSTEP, HT_FINISH): New macros.
      
      gcc:
      	* Makefile.in (MKDEPS_H): New shorthand.
      	(c-opts.o): Update dependencies.
      	* c-opts.c: Include mkdeps.h.
      	(handle_deferred_opts): Use cpp_get_deps and deps_add_target,
      	not cpp_add_dependency_target.
      
      From-SVN: r82654
      Zack Weinberg committed
  16. 30 May, 2004 1 commit
    • Index: libcpp/ChangeLog · b453c95f
      2004-05-29  Geoffrey Keating  <geoffk@apple.com>
      
      	* symtab.c (ht_create): Set entries_owned.
      	(ht_destroy): Honour entries_owned.
      	(ht_expand): Likewise.
      	(ht_load): New.
      
      Index: libcpp/include/ChangeLog
      2004-05-29  Geoffrey Keating  <geoffk@apple.com>
      
      	* symtab.h (struct ht): New field 'entries_owned'
      	(ht_load): New prototype.
      
      Index: gcc/ChangeLog
      2004-05-29  Geoffrey Keating  <geoffk@apple.com>
      
      	* gengtype-yacc.y: Add NESTED_PTR token.
      	(option): Record `nested_ptr' option.
      	* gengtype-lex.l: Handle `nested_ptr' keyword.
      	* gengtype.c (walk_type): Process `nested_ptr' option.
      	* gengtype.h (struct nested_ptr_data): New.
      	* doc/gty.texi (GTY Options): Document `nested_ptr' option.
      	* stringpool.c (struct string_pool_data): Make 'entries' point to
      	ht_identifier instead of tree.
      	(gt_pch_save_stringpool): Don't adjust pointers.
      	(gt_pch_restore_stringpool): Call ht_load.
      
      From-SVN: r82438
      Geoffrey Keating committed
  17. 24 May, 2004 1 commit
    • Makefile.def (host_modules): add libcpp. · 4f4e53dd
      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
      Paolo Bonzini committed
  18. 22 Aug, 2003 1 commit
  19. 11 Aug, 2003 1 commit
    • avr.c (avr_init_once): Use xcalloc in lieu of xmalloc/memset. · 29da5c92
      	* config/avr/avr.c (avr_init_once): Use xcalloc in lieu of
      	xmalloc/memset.
      	* config/ia64/ia64.c (ia64_reorg): Likewise.
      	* conflict.c (conflict_graph_new): Likewise.
      	* fixinc/fixincl.c (run_compiles): Likewise.
      	* genattrtab.c (optimize_attrs): Likewise.
      	* genrecog.c (new_decision): Likewise.
      	* haifa-sched.c (schedule_block): Likewise.
      	* hashtable.c (ht_create): Likewise.
      
      From-SVN: r70337
      Kaveh R. Ghazi committed
  20. 08 Aug, 2003 1 commit
    • * tree.h (get_identifier) Define a macro form of get_identifier · 7bb3fbbb
      	that calls get_identifier_with_length when the string is constant.
      	(get_identifier_with_length): Change type of second argument to
      	size_t in prototype.
      	* stringpool.c (get_identifier): Undefine the macro before giving
      	the function definition.
      	(get_identifier_with_length): Change  type of second argument to
      	size_t in function definition.
      	* hashtable.c (calc_hash): Change type of second argument to size_t.
        	(ht_lookup): Change type of third argument to size_t.  Reorganize
      	to speed-up the cases where the hash table slot is empty, or the
      	first probe matches (i.e. there isn't a collision).
      	* hashtable.h (ht_lookup): Adjust function prototype.
      
      From-SVN: r70256
      Roger Sayle committed
  21. 22 Jul, 2003 1 commit
    • hashtable.c (approx_sqrt): Make static. · a2f7be91
      	* hashtable.c (approx_sqrt): Make static.
      	* hashtable.h: Don't prototype approx_sqrt.
      	* line-map.c (init_line_maps): Rename linemap_init.
      	(free_line_maps): Rename linemap_free.
      	(add_line_map): Rename linemap_add.
      	(lookup_line): Rename linemap_lookup.
      	(print_containing_files): Rename linemap_print_containing_files.
      	* linemap.h: Update to match.
      
      	* cpperror.c, cppinit.c, cpplib.c, cppmacro.c: Update calls to
      	linemap routines to use new names.
      
      From-SVN: r69672
      Zack Weinberg committed
  22. 19 Jul, 2003 1 commit
    • alias.c [...]: Remove unnecessary casts. · 703ad42b
      	* alias.c alloc-pool.c bitmap.c bitmap.h bt-load.c builtins.c
      	c-common.c c-decl.c c-incpath.c c-lex.c c-opts.c c-parse.in
      	c-pragma.c c-typeck.c calls.c cfg.c cfganal.c cfgloop.c cfgrtl.c
      	collect2.c combine.c conflict.c coverage.c cppexp.c cppfiles.c
      	cpphash.c cppinit.c cpplex.c cpplib.c cppmacro.c cppspec.c
      	cpptrad.c cse.c cselib.c dbxout.c defaults.h df.c dominance.c
      	dwarf2out.c dwarfout.c emit-rtl.c except.c expmed.c expr.c final.c
      	fix-header.c flow.c fold-const.c function.c gcc.c gccspec.c gcov.c
      	gcse.c genattr.c genattrtab.c genautomata.c genconditions.c
      	genemit.c genextract.c genoutput.c genrecog.c gensupport.c
      	ggc-page.c ggc-simple.c global.c graph.c haifa-sched.c hashtable.c
      	integrate.c jump.c langhooks.c lcm.c line-map.c local-alloc.c
      	loop.c mips-tdump.c mips-tfile.c mkdeps.c optabs.c params.c
      	postreload.c prefix.c print-tree.c protoize.c ra-build.c
      	ra-colorize.c ra-rewrite.c ra.c recog.c reg-stack.c regclass.c
      	regmove.c regrename.c reload.c reload1.c reorg.c resource.c
      	sbitmap.c sched-deps.c sched-rgn.c sched-vis.c sdbout.c
      	simplify-rtx.c ssa-ccp.c ssa.c stmt.c stor-layout.c timevar.c
      	tlink.c toplev.c tree-dump.c tree.c unroll.c unwind-dw2-fde.c
      	varasm.c varray.c vmsdbgout.c xcoffout.c: Remove unnecessary
      	casts.
      
      From-SVN: r69587
      Kaveh R. Ghazi committed
  23. 13 Jul, 2003 1 commit
    • Makefile.in (LIBCPP_DEPS): Remove coretypes.h and $(TM_H). · 43839642
      	* Makefile.in (LIBCPP_DEPS): Remove coretypes.h and $(TM_H).
      	(hashtable.o, line-map.o, mkdeps.o): Likewise, from dependency
      	list.  Move these all together down by cpplib.
      
      	* cpplib.h: Don't refer to MAX_WCHAR_TYPE_SIZE when determining
      	definition of CPPCHAR_SIGNED_T.
      
      	* cppcharset.c, cpperror.c, cppexp.c, cppfiles.c, cpphash.c, cppinit.c
      	* cpplex.c, cpplib.c, cppmacro.c, cpppch.c, cpptrad.c, hashtable.c
      	* line-map.c, mkdeps.c: Don't include coretypes.h or tm.h.
      
      	* cpphash.c (_cpp_init_hashtable): Don't use gcc_obstack_init.
      	* cppinit.c (cpp_create_reader): Likewise.
      
      	* cpphash.h (scan_out_logical_line): Rename _cpp_scan_out_logical_line.
      	* cpptrad.c: Likewise.  All callers changed.
      	* cpplib.c: All callers changed.
      	* c-ppoutput.c: Replace 'uchar' with 'unsigned char' throughout.
      	* hashtable.h: Define GTY(x) to nothing here too.
      
      From-SVN: r69298
      Zack Weinberg committed
  24. 06 Jul, 2003 1 commit
    • gcc.c: Convert prototypes to ISO C90. · 1d088dee
      	* gcc.c: Convert prototypes to ISO C90.
      	* gcc.h: Likewise.
      	* gcov-dump.c: Likewise.
      	* gcov-iov.c: Likewise.
      	* gcse.c: Likewise.
      	* genattrtab.h: Likewise.
      	* ggc.h: Likewise.
      	* global.c: Likewise.
      	* graph.c: Likewise.
      	* graph.h: Likewise.
      	* hosthooks.h: Likewise.
      	* hooks.h: Likewise.
      	* hooks.c: Likewise.
      	* hashtable.h: Likewise.
      	* hashtable.c: Likewise.
      	* haifa-sched.c: Likewise.
      	* integrate.h: Likewise.
      	* integrate.c: Likewise.
      	* input.h: Likewise.
      	* ifcvt.c: Likewise.
      
      From-SVN: r68995
      Andreas Jaeger committed
  25. 16 Jun, 2003 1 commit
    • decl.c, [...]: Don't use the PTR macro. · fad205ff
      cp:
      	* cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
      	macro.
      
      gcc:
      	* bitmap.c, builtins.c, c-incpath.c, cgraph.c, config/frv/frv.c,
      	config/mips/mips.c, cppfiles.c, cpphash.c, cppinit.c, cpplib.c,
      	dwarf2out.c, dwarfout.c, except.c, expr.c, expr.h, fold-const.c,
      	function.c, gcc.c, genoutput.c, gensupport.c, global.c,
      	haifa-sched.c, hashtable.c, ifcvt.c, integrate.c, local-alloc.c,
      	loop.c, mips-tdump.c, mips-tfile.c, mkdeps.c, protoize.c,
      	read-rtl.c, recog.h, reload1.c, sbitmap.c, ssa-dce.c,
      	stringpool.c, tlink.c, tree.c, varasm.c, varray.c: Don't use
      	the PTR macro.
      
      From-SVN: r68043
      Kaveh R. Ghazi committed
  26. 18 May, 2003 1 commit
    • hashtable.h (struct ht_identifier): Add data member "hash_value". · 5e0c54e5
      	* hashtable.h (struct ht_identifier): Add data member "hash_value".
      	* hashtable.c (ht_lookup): Use it when searching, remember.
      	(ht_expand): Do not recompute.
      	* tree.h (IDENTIFIER_HASH_VALUE): New macro.
      
      cp/
      	* cp-tree.h (struct lang_type_class): Replace data member tags
      	with hash-table nested_udts.
      	(CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
      	* class.c (unreverse_member_declarations): Don't touch
      	CLASSTYPE_TAGS.
      	(pushclass): Use cxx_remember_type_decls.
      	* decl.c (struct cp_binding_level): Replace data member tags with
      	hash-table type_decls.
      	(pop_binding_level): Handle level->type_decls.
      	(kept_level_p): Adjust.
      	(poplevel): Remove unused local variable.
      	(bt_print_entry): New function.
      	(print_binding_level): Use it.
      	(push_namespace): Build current_binding_level->type_decls.
      	(maybe_process_template_type_declaration): Adjust.
      	(pushtag): Likewise.
      	(clear_anon_tags): Use binding_table_remove_anonymous_types.
      	(gettags): Remove.
      	(cxx_remember_type_decls):  Rename from storetags.  Adjust.
      	(lookup_tag): Use binding_table_find_anon_type.  Tidy.
      	(lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
      	(cxx_init_decl_processing): Build global_binding_level->type_decls.
      	(store_parm_decls): Remove pointless code.
      	* name-lookup.c (free_binding_entry): New variable.
      	(ENTRY_INDEX): New macro.
      	(struct binding_table_s): New datatype.
      	(binding_entry_make): New function.
      	(binding_entry_free): Likewise.
      	(binding_table_construct): Likewise.
      	(binding_table_free): Likewise.
      	(binding_table_new): Likewise.
      	(binding_table_expand): Likewise.
      	(binding_table_insert): Likewise.
      	(binding_table_find): Likewise.
      	(binding_table_find_anon_type): Likewise.
      	(binding_table_reverse_maybe_remap): Likewise.
      	(binding_table_remove_anonymous_types): Likewise.
      	(binding_table_foreach): Likewise.
      	* name-lookup.h (binding_table): New type.
      	(binding_entry): Likewise.
      	(bt_foreach_proc): Likewise.
      	(struct binding_entry_s): New datatype.
      	(SCOPE_DEFAULT_HT_SIZE): New macro.
      	(CLASS_SCOPE_HT_SIZE): Likewise.
      	(NAMESPACE_ORDINARY_HT_SIZE): Likewise.
      	(NAMESPACE_STD_HT_SIZE): Likewise.
      	(GLOBAL_SCOPE_HT_SIZE): Likewise.
      	(binding_table_new): Declare.
      	(binding_table_free): Likewise.
      	(binding_table_insert): Likewise.
      	(binding_table_find_anon_type): Likewise.
      	(binding_table_reverse_maybe_remap): Likewise.
      	(binding_table_remove_anonymous_types): Likewise.
      	(binding_table_foreach): Likewise.
      	(binding_table_find): Likewise.
      	(cxx_remember_type_decls): Likewise.
      	* pt.c (bt_instantiate_type_proc): New function.
      	(do_type_instantiation): Use it.
      	* search.c (lookup_field_r): Use binding_table_find.
      
      From-SVN: r66930
      Gabriel Dos Reis committed
  27. 06 Apr, 2003 1 commit
    • hashtable.c (gcc_obstack_init): Delete this function and everything related to it. · 95ec27aa
      2003-04-06  Steven Bosscher  <steven@gcc.gnu.org>
      
      	* hashtable.c (gcc_obstack_init): Delete this function
      	and everything related to it.
      	* hashtable.h: Remove prototype.
      	* bitmap.c (bitmap_element_allocate): Cleanup redundant
      	defines.  Cleanup some unnecessary whitespace.
      	* defaults.h (obstack_chunk_alloc): Redefine with
      	appropriate casts for libiberty obstacks.
      	(obstack_chunk_free): Ditto.
      	(OBSTACK_CHUNK_SIZE): Define, default to 0.
      	(gcc_obstack_init): Define as a call to _obstack_begin.
      	* tree.c (print_obstack_statistics): Delete this unused
      	function.
      	* tree.h (obstack): Don't forward-declare.
      	(print_obstack_statistics): Delete prototype.
      	(print_obstack_name): Ditto.
      	(gcc_obstack_init): Ditto.
      	* rtl.h (gcc_obstack_init): Ditto.
      	* java/jv-scan.c (gcc_obstack_init): Delete this
      	function, its prototype and related defines.
      	* java/jvgenmain.c (gcc_obstack_init): Delete this
      	function, and related defines.
      	* java/parse-scan.y (obstack_chunk_alloc): Don't define.
      	(obstack_chunk_free): Ditto
      
      From-SVN: r65308
      Steven Bosscher committed
  28. 16 Dec, 2002 1 commit
  29. 14 Sep, 2002 1 commit
    • ChangeLog: Follow spelling conventions. · 4912a07c
      	* ChangeLog: Follow spelling conventions.
      	* ChangeLog.0: Likewise.
      	* ChangeLog.2: Likewise.
      	* ChangeLog.3: Likewise.
      	* ChangeLog.4: Likewise.
      	* ChangeLog.5: Likewise.
      	* ChangeLog.6: Likewise.
      	* cppfiles.c: Likewise.
      	* cppinit.c: Likewise.
      	* cpplib.h: Likewise.
      	* cse.c: Likewise.
      	* debug.h: Likewise.
      	* df.c: Likewise.
      	* dominance.c: Likewise.
      	* hashtable.c: Likewise.
      	* hashtable.h: Likewise.
      	* loop.c: Likewise.
      	* config/arm/README-interworking: Likewise.
      	* config/arm/arm.c: Likewise.
      	* config/arm/arm.h: Likewise.
      	* config/arm/arm.md: Likewise.
      	* config/dsp16xx/dsp16xx.h: Likewise.
      	* config/frv/frv.c: Likewise.
      	* config/frv/frv.h: Likewise.
      	* config/ip2k/ip2k.h: Likewise.
      	* config/rs6000/rs6000.c: Likewise.
      	* config/stormy16/stormy-abi: Likewise.
      	* config/stormy16/stormy16.h: Likewise.
      	* config/v850/v850.c: Likewise.
      
      From-SVN: r57146
      Kazu Hirata committed
  30. 10 Sep, 2001 1 commit
    • cpplex.c (parse_identifier): Fast-path optimize. · 2c3fcba6
      	* cpplex.c (parse_identifier): Fast-path optimize.  Avoid
      	copying identifier when we're just going to throw it away.
      	(parse_identifier_slow): New routine to handle abnormal cases.
      	(_cpp_lex_token): Update call site.
      
      	* hashtable.c (ht_lookup): Don't assume that the string we've
      	been given is NUL-terminated.
      	* system.h: #define __builtin_expect(a, b) to (a) if not
      	GCC >=3.0.
      
      From-SVN: r45529
      Zack Weinberg committed
  31. 11 Aug, 2001 1 commit
    • cpphash.c (_cpp_destroy_hashtable): Use ht_destroy. · bef985f3
      	* cpphash.c (_cpp_destroy_hashtable): Use ht_destroy.
      	* cpphash.h (CPP_IN_SYSTEM_HEADER): Fix.
      	(struct cpp_pool): New member first.
      	* cppinit.c (append_include_chain): Plug memory leaks.
      	* cpplib.c (cpp_register_pragma, cpp_register_pragma_space):
      	Allocate pragma structures from the (aligned) macro pool to
      	avoid leaking memory.
      	* cpplex.c (_cpp_init_pool, _cpp_free_pool): Use pool->first
      	so we don't leak memory.
      	* hashtable.c (ht_destroy): New.
      	* hashtable.h (ht_destroy): New.
      
      From-SVN: r44794
      Neil Booth committed
  32. 20 May, 2001 2 commits
    • hashtable.c (calc_hash): Fix HASHSTEP definition. · a078edf8
      	* hashtable.c (calc_hash): Fix HASHSTEP definition.
      	* stringpool.c (make_identifier): No statistics here anymore.
      	* objc-act.c (steup_string_decl): Remove redundant check.
      
      From-SVN: r42337
      Neil Booth committed
    • Makefile.in (OBJS, [...]): Update. · 2a967f3d
      	* Makefile.in (OBJS, LIBCPP_OBJS, LIBCPP_DEPS,
      	cpplib.o, cpphash.o, fix-header): Update.
      	(hashtable.o): New target.
      	* c-common.h: Include cpplib.h.  Define C_RID_CODE and
      	struct c_common_identifier here.
      	* c-lang.c (c_init_options): Update.  Call set_identifier_size.
      	* c-lex.c (c_lex): Update.
      	* c-pragma.h: Update.
      	* c-tree.h (struct lang_identifier): Contain c_common_identifier.
      	Delete rid_code.
      	(C_RID_CODE): Delete.
      	* cpphash.c: Rewrite to use hashtable.c.
      	* cpphash.h: Update include guards.
      	(struct cpp_reader): Remove hashtab.
      	hash_ob and buffer_ob are no longer pointers.  Add hash_table
      	and our_hashtable.
      	(HASHSTEP, _cpp_init_hashtable,	_cpp_lookup_with_hash): Delete.
      	(_cpp_cleanup_hashtable): Rename _cpp_destroy_hashtable.
      	(_cpp_cleanup_stacks): Rename _cpp_init_directives.
      	* cppinit.c (cpp_create_reader): Update.
      	* cpplex.c (cpp_ideq, parse_identifier, cpp_output_token): Update.
      	(cpp_interpret_charconst): Eliminate warning.
      	* cpplib.c (do_pragma, do_endif, push_conditional,
      	cpp_push_buffer, cpp_pop_buffer): Update.
      	(_cpp_init_stacks): Rename cpp_init_directives.
      	(_cpp_cleanup_stacks): Remove.
      	* cpplib.h: Update include guards.  Include tree-core.h and c-rid.h.
      	(cpp_hashnode, cpp_token, NODE_LEN, NODE_NAME,
      	 cpp_forall_identifiers, cpp_create_reader): Update.
      	(C_RID_CODE, cpp_make_node): New.
      	(c_common_identifier): New identifier node for C front ends.
      	* cppmain.c (main): Update.
      	* fix-header.c (read_scan_file): Update.
      	* flags.h (id_clash_len): Make unsigned.
      	* ggc.h (ggc_mark_nonnull_tree): New.
      	* hashtable.c: New.
      	* hashtable.h: New.
      	* stringpool.c: Update comments and copyright.  Update to use
      	hashtable.c.
      	* toplev.c (approx_sqrt): Move to hashtable.c.
      	(id_clash_len): Make unsigned.
      	* toplev.h (ident_hash): New.
      	* tree.c (gcc_obstack_init): Move to hashtable.c.
      	* tree.h: Include hashtable.h.
      	(IDENTIFIER_POINTER, IDENTIFIER_LENGTH): Update.
      	(GCC_IDENT_TO_HT_IDENT, HT_IDENT_TO_GCC_IDENT): New.
      	(struct tree_identifier): Update.
      	(make_identifier): New.
      cp:
      	* cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
      	(C_RID_CODE): Remove.
      	* lex.c (cxx_init_options): Call set_identifier_size.  Update.
      	(init_parse): Don't do it here.
      objc:
      	* objc-act.c (objc_init_options): Call set_identifier_size. Update.
      
      From-SVN: r42334
      Neil Booth committed