2010-04-23 Pedro Alves <pedro@codesourcery.com>
include/
* filenames.h (IS_DIR_SEPARATOR_1): Rename from IS_DIR_SEPARATOR,
always define it independently of host, add `dos_based' parameter,
and handle it.
(HAS_DRIVE_SPEC_1): Rename from HAS_DRIVE_SPEC, always define it
independently of host, add `dos_based' parameter, and handle it.
(IS_ABSOLUTE_PATH_1): Rename from IS_ABSOLUTE_PATH, always define
it independently of host, add `dos_based' parameter, and handle
it.
(IS_DOS_DIR_SEPARATOR, IS_DOS_ABSOLUTE_PATH)
(IS_UNIX_DIR_SEPARATOR, IS_UNIX_ABSOLUTE_PATH)
(HAS_DOS_DRIVE_SPEC): New.
(HAS_DRIVE_SPEC): Reimplement on top of HAS_DRIVE_SPEC_1.
(IS_DIR_SEPARATOR): Reimplement on top of IS_DIR_SEPARATOR_1.
(IS_ABSOLUTE_PATH): Reimplement on top of IS_ABSOLUTE_PATH_1.
* libiberty.h (dos_lbasename, unix_lbasename): Declare.
libiberty/
* lbasename.c (lbasename): Split into ...
(unix_lbasename, dos_basename): ... these.
(lbasename): ... and reimplement on top of them.
* Makefile.in (lbasename.o): Add dependency on
$(INCDIR)/filenames.h.
From-SVN: r158681
2009-10-23 Kai Tietz <kai.tietz@onevision.com>
* splay-tree.h (libi_uhostptr_t): Add gcc specific
__extension__ for long long type case to silent cX9.
(libi_shostptr_t): Likewise.
From-SVN: r153499
* dwarf2out.c (dwarf_tag_name): Handle DW_TAG_rvalue_reference_type
and DW_TAG_template_alias.
(dwarf_attr_name): Handle DW_AT_main_subprogram,
DW_AT_data_bit_offset, DW_AT_const_expr, DW_AT_enum_class,
DW_AT_linkage_name, DW_AT_GNU_guarded_by, DW_AT_GNU_pt_guarded_by,
DW_AT_GNU_guarded, DW_AT_GNU_pt_guarded, DW_AT_GNU_locks_excluded,
DW_AT_GNU_exclusive_locks_required, DW_AT_GNU_shared_locks_required
and DW_AT_GNU_odr_signature.
(dwarf_form_name): Handle DW_FORM_sec_offset, DW_FORM_exprloc,
DW_FORM_flag_present and DW_FORM_ref_sig8.
(output_signature): Only print name on the first byte.
(output_die): Likewise for dw_val_class_data8.
* include/dwarf2.h (DW_LANG_Python): Add comment that it is
a DWARF 4 addition.
From-SVN: r152853
include/ChangeLog:
* dwarf2.h (enum dwarf_tag): Rename DW_TAG_template_parameter_pack and
DW_TAG_formal_parameter_pack into DW_TAG_GNU_template_parameter_pack
and DW_TAG_formal_parameter_pack until DWARF 5 is out.
gcc/ChangeLog:
* dwarf2out.c (dwarf_tag_name, gen_generic_params_dies,
generic_parameter_die, template_parameter_pack_die,
gen_formal_parameter_die, gen_subprogram_die): Adjust after renaming
DW_TAG_formal_parameter_pack and DW_TAG_template_parameter_pack into
DW_TAG_GNU_formal_parameter_pack and DW_TAG_GNU_template_parameter_pack.
gcc/testsuite/ChangeLog:
* g++.dg/debug/dwarf2/template-func-params-4.C: Adjust after renaming
DW_TAG_template_parameter_pack and DW_TAG_formal_parameter_pack
into DW_TAG_GNU_template_parameter_pack and
DW_TAG_GNU_formal_parameter_pack.
* g++.dg/debug/dwarf2/template-params-4.C: Likewise.
* g++.dg/debug/dwarf2/template-func-params-7.C: Likewise.
From-SVN: r152188
include/
Add rest of new values from DWARF Version 4.
* dwarf2.h (DW_TAG_rvalue_reference_type, DW_TAG_template_alias):
New tags.
(DW_FORM_ref_sig8): New name for DW_FORM_sig8.
(DW_AT_main_subprogram, DW_AT_data_bit_offset, DW_AT_const_expr,
DW_AT_enum_class, DW_AT_linkage_name, DW_AT_GNU_guarded_by,
DW_AT_GNU_pt_guarded_by, DW_AT_GNU_guarded, DW_AT_GNU_pt_guarded,
DW_AT_GNU_locks_excluded, DW_AT_GNU_exclusive_locks_required,
DW_AT_GNU_shared_locks_required, DW_AT_GNU_odr_signature): New
attributes.
(DW_LANG_Python): New language.
From-SVN: r152181
Fix for PR debug/41266
ChangeLog:
* include/dwarf2.h (enum dwarf_tag): Add
DW_TAG_template_parameter_pack and DW_TAG_formal_parameter_pack.
gcc/ChangeLog:
* dwarf2out.c (template_parameter_pack_die,
gen_formal_parameter_pack_die ): New functions.
(make_ith_pack_parameter_name): Remove this function.
(dwarf_tag_name): Support printing DW_TAG_template_parameter_pack and
DW_TAG_formal_parameter_pack.
(gen_generic_params_dies): Represent each template parameter pack
by a DW_TAG_template_parameter_pack DIE. Argument pack elements are
represented by usual DW_TAG_template_*_parameter DIEs that are
children of the DW_TAG_template_parameter_pack element DIE.
(generic_parameter_die): This doesn't deal with parameter pack
names anymore. Don't generate DW_AT_name for some DIEs, e.g. children of
parameter pack DIEs.
(gen_formal_parameter_die): Add a flag to not emit DW_AT_name
in certain cases, e.g. for pack elements.
(gen_formal_types_die, gen_decl_die): Adjust usage of
gen_formal_parameter_die.
(gen_subprogram_die): Represent each function parameter pack by a
DW_TAG_formal_parameter_pack DIE. Arguments of of the pack are
represented by usual DW_TAG_formal_parameter DIEs that are children
of the DW_TAG_formal_parameter_pack DIE. Remove references to
____builtin_va_alist decls as no part of the compiler uses those
anymore.
* langhooks.h (struct lang_hooks_for_decls): Add
function_parm_expanded_from_pack_p, get_generic_function_decl
and function_parameter_pack_p hooks. Fix comment for
get_innermost_generic_parms hook.
* langhooks-def.h (LANG_HOOKS_FUNCTION_PARAMETER_PACK_P,
LANG_HOOKS_FUNCTION_PARM_EXPANDED_FROM_PACK_P ): Declare new hook
macros and use them to initialize lang_hook.
gcc/cp/ChangeLog:
* cp-lang.c (LANG_HOOKS_FUNCTION_PARAMETER_PACK_P,
LANG_HOOKS_FUNCTION_PARM_EXPANDED_FROM_PACK_P,
LANG_HOOKS_GET_GENERIC_FUNCTION_DECL): Initialize these
hooks for the c++ FE.
* cp-tree.h (function_parameter_pack_p, get_function_template_decl,
function_parameter_expanded_from_pack_p): Declare ...
* pt.c (function_parameter_pack_p, get_function_template_decl,
function_parameter_expanded_from_pack_p): ... new hooks.
(get_template_info): Make this more robust.
(template_args_variadic_p, make_ith_pack_parameter_name): Add a new
line between comment and function.
(get_template_argument_pack_elems): Fix comment.
(tsubst_decl): Arguments of function parameter packs are not
parameter packs themselves.
gcc/testsuite/ChangeLog:
* g++.dg/debug/dwarf2/template-func-params-4.C: Adjust.
* g++.dg/debug/dwarf2/template-func-params-7.C: Likewise.
* g++.dg/debug/dwarf2/template-params-4.C: Likewise.
From-SVN: r152043
include
2009-07-17 Jan Kratochvil <jan.kratochvil@redhat.com>
* demangle.h
(enum demangle_component_type <DEMANGLE_COMPONENT_GLOBAL_CONSTRUCTORS>)
(enum demangle_component_type <DEMANGLE_COMPONENT_GLOBAL_DESTRUCTORS>):
New.
libiberty
2009-07-17 Jan Kratochvil <jan.kratochvil@redhat.com>
* cp-demangle.c (d_print_comp <DEMANGLE_COMPONENT_GLOBAL_CONSTRUCTORS>)
(d_print_comp <DEMANGLE_COMPONENT_GLOBAL_DESTRUCTORS): New.
(d_make_comp <DEMANGLE_COMPONENT_GLOBAL_CONSTRUCTORS>)
(d_make_comp <DEMANGLE_COMPONENT_GLOBAL_DESTRUCTORS): New.
(d_demangle_callback): The variable type is now declared as enum.
Replace parser of _GLOBAL_ symbols by a d_make_comp call.
From-SVN: r149756
gcc
* dwarf2.h: Remove.
* Makefile.in (DWARF2_H): New variable.
(except.o): Use it.
(dwarf2out.o): Likewise.
(dwarf2asm.o): Likewise.
* config/i386/t-i386: Use DWARF2_H.
* except.c: Include elf/dwarf2.h.
* unwind-dw2.c: Include elf/dwarf2.h.
* dwarf2out.c: Include elf/dwarf2.h.
(dw_loc_descr_struct) <dw_loc_opc>: Now a bitfield.
<dtprel>: New field.
(dwarf_stack_op_name): Don't handle INTERNAL_DW_OP_tls_addr.
(size_of_loc_descr): Likewise.
(output_loc_operands_raw): Likewise.
(output_loc_operands): Handle new dtprel field.
(loc_checksum): Update.
(loc_descriptor_from_tree_1) <VAR_DDECL>: Set dtprel field.
* unwind-dw2-fde-glibc.c: Include elf/dwarf2.h.
* unwind-dw2-fde.c: Include elf/dwarf2.h.
* dwarf2asm.c: Include elf/dwarf2.h.
* unwind-dw2-fde-darwin.c: Include elf/dwarf2.h.
* config/mmix/mmix.c: Include elf/dwarf2.h.
* config/rs6000/darwin-fallback.c: Include elf/dwarf2.h.
* config/xtensa/unwind-dw2-xtensa.c: Include elf/dwarf2.h.
* config/sh/sh.c: Include elf/dwarf2.h.
* config/i386/i386.c: Include elf/dwarf2.h.
gcc/ada
* raise-gcc.c: Include elf/dwarf2.h.
include
* elf/dwarf2.h: New file. Merged with gdb.
From-SVN: r149070
* ansidecl.h: Add extern "C" when compiling with C++. Treat C++
the way we treat an ISO C compiler. Don't define inline as a
macdro when compiling with C++.
* dyn-string.h: Add header guard DYN_STRING_H. Add extern "C"
when compiling with C++.
* fibheap.h: Add extern "C" when compiling with C++.
From-SVN: r148032
cp/:
* decl.c (grokfndecl): Set DECL_CONTEXT on parms.
(duplicate_decls): Adjust DECL_CONTEXT of newdecl's parms.
* pt.c (check_explicit_specialization): Likewise.
(tsubst_copy) [PARM_DECL]: Return a dummy parm if we don't have a
local specialization.
* tree.c (cp_tree_equal) [PARM_DECL]: Check type and index, not name.
* decl2.c (parm_index): New fn.
* semantics.c (finish_decltype_type): Don't use describable_type.
* mangle.c (write_expression): Likewise. Mangle ALIGNOF_EXPR.
Give a sorry for unsupported codes rather than crash. Mangle
conversions with other than 1 operand. New mangling for PARM_DECL.
* operators.def (ALIGNOF_EXPR): Mangle as az.
* include/demangle.h (enum demangle_component_type): Add
DEMANGLE_COMPONENT_FUNCTION_PARAM.
* libiberty/cp-demangle.c (d_make_function_param): new fn.
(cplus_demangle_mangled_name): Work around abi v2 bug.
(d_expr_primary): Likewise.
(cplus_demangle_operators): Add alignof ops.
(d_expression): Handle function parameters and conversions
with other than 1 operand.
(d_print_comp): Handle function parameters. Fix bug with
function used in type of function.
From-SVN: r144924
* safe-ctype.h: Remove #error when detecting that ctype.h has been
included. Redefine the various macros provided by ctype.h as
undefined variables.
From-SVN: r137480
include/
2008-01-26 David Daney <ddaney@avtrex.com>
* demangle.h (demangle_component_type): Add
DEMANGLE_COMPONENT_JAVA_RESOURCE,
DEMANGLE_COMPONENT_COMPOUND_NAME, and
DEMANGLE_COMPONENT_CHARACTER as new enum values.
(demangle_component): Add struct s_character to union u.
libiberty/
2008-01-26 David Daney <ddaney@avtrex.com>
* cp-demangle.c (d_dump): Handle DEMANGLE_COMPONENT_JAVA_RESOURCE,
DEMANGLE_COMPONENT_COMPOUND_NAME, and
DEMANGLE_COMPONENT_CHARACTER cases.
(d_make_comp): Handle DEMANGLE_COMPONENT_COMPOUND_NAME and
DEMANGLE_COMPONENT_JAVA_RESOURCE cases.
(d_make_character): New function.
(d_java_resource): Same.
(d_special_name): Handle "Gr" case.
(d_print_comp): Handle DEMANGLE_COMPONENT_JAVA_RESOURCE,
DEMANGLE_COMPONENT_COMPOUND_NAME, and
DEMANGLE_COMPONENT_CHARACTER cases.
* testsuite/demangle-expected: Add test for java resource name
mangling.
From-SVN: r131883
2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
* mangle.c (write_type): Change mangling of rvalue reference from
`RR' to `O'.
2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
* demangle.h (enum demangle_component_type): Add
DEMANGLE_COMPONENT_RVALUE_REFERENCE.
2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
* cp-demangle.c (d_dump): Handle
DEMANGLE_COMPONENT_RVALUE_REFERENCE.
(d_make_comp): Ditto.
(cplus_demangle_type): Ditto.
(d_print_comp): Ditto.
(d_print_mod): Ditto.
(d_print_function_type): Ditto.
2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
* testsuite/abi/demangle/cxx0x/rref.cc: New.
From-SVN: r127999
* COPYING_v3: New file. Contains version 3 of the GNU General Public License.
* COPYING.LIB_v3: New file. Contains version 3 of the GNU Lesser General Public License.
* gpl_v3.texi: New file. Contains a texinfo formated copy of the GNU General Public License, version 3.
From-SVN: r126701
* splay-tree.h (libi_uhostptr_t, libi_shostptr_t): New types,
needed for WIN64 when a long is not wide enough for a pointer.
(splay_tree_key, splay_tree_value): Use the new types.
From-SVN: r126573
include/
2007-05-07 Nathan Froyd <froydnj@codesourcery.com>
* libiberty.h (writeargv): Declare.
libiberty/
2007-05-07 Nathan Froyd <froydnj@codesourcery.com>
* argv.c (writeargv): New function.
gcc/
2007-05-07 Nathan Froyd <froydnj@codesourcery.com>
* gcc.c (at_file_supplied): New variable.
(main): Set it if we expanded argv.
(do_spec_1): Pass an @-file to the linker if we were called with
an @-file argument and HAVE_GNU_LD.
* collect2.c (at_file_supplied): New variable.
(response_file): New variable.
(collect_exit): Unlink response_file if necessary.
(handler): Likewise.
(do_wait): Likewise.
(main): Set at_file_supplied if we expanded argv.
(collect_execute): Pass an @-file to subprocesses if we were called
with an @-file argument.
* configure.ac: Add define for HAVE_GNU_LD.
* configure: Regenerate.
* config.in: Regenerate.
From-SVN: r124532
include/:
* demangle.h: New cplus_demangle_print_callback,
cplus_demangle_v3_callback, and java_demangle_v3_callback function
prototypes, and demangle_callbackref type definition.
libiberty/:
* cp-demangle.h (cplus_demangle_operators): External definition
suppressed if not building for libstdc++.
* cp-demangle.c (__gcclibcxx_demangle_callback): Augmented interface
to demangling, provides a malloc-less version of __cxa_demangle.
(cplus_demangle_print_callback): Public callback version of
cplus_demangle_print.
(struct d_growable_string): New growable string structure.
(d_growable_string_init): New function, provides support for
growable strings separate from print info.
(d_growable_string_resize): Likewise.
(d_growable_string_append_buffer): Likewise.
(d_growable_string_callback_adapter):): Likewise.
(d_print_init): New print info initialization function.
(d_print_error): Macro replace by inline function.
(d_print_saw_error): Likewise.
(d_append_char): Likewise.
(d_append_buffer): Likewise.
(d_append_string): New inline function, replaces the
d_append_string_constant macro.
(d_flush_buffer): New function, flushes buffer to callback.
(d_demangle_callback, is_ctor_or_dtor): Malloc-based fallback
for unsupported dynamic arrays replaced by alloca().
(d_demangle): Return string length estimating removed.
(d_dump): Moved error case handling from call site into function.
(d_print_resize): Function removed.
(d_print_append_char): Likewise.
(d_print_append_buffer): Likewise.
(d_print_error): Likewise.
(d_print_comp): Added special case handling for Java arrays.
(java_demangle_v3): Removed string post-processing for Java arrays,
now replaced by special case handling in d_print_comp.
(cplus_demangle_v3_callback): Augmented interface to demangling,
provides a malloc-less version of cplus_demangle_v3.
(java_demangle_v3_callback): Augmented interface to demangling,
provides a malloc-less version of java_demangle_v3.
From-SVN: r121305
include:
2006-05-03 Andrew Stubbs <andrew.stubbs@st.com>
J"orn Rennecke <joern.rennecke@st.com>
PR driver/29931
* libiberty.h (make_relative_prefix_ignore_links): Declare.
libiberty:
2006-05-03 Andrew Stubbs <andrew.stubbs@st.com>
J"orn Rennecke <joern.rennecke@st.com>
PR driver/29931
* make-relative-prefix.c (make_relative_prefix_1): New function,
broken out of make_relative_prefix. Make link resolution dependent
on new parameter.
(make_relative_prefix): Use make_relative_prefix_1.
(make_relative_prefix_ignore_links): New function.
Co-Authored-By: J"orn Rennecke <joern.rennecke@st.com>
From-SVN: r119366
src/libiberty/ChangeLog:
2006-03-29 Jim Blandy <jimb@codesourcery.com>
* pex-common.c (pex_input_file, pex_input_pipe): New functions.
(pex_init_common): Initialize obj->input_file.
(pex_run): Close any file opened by pex_input_file.
* pexecute.txh (pex_input_file, pex_input_pipe): New docs.
* pex-common.h (struct pex_obj): New field input_file.
(struct pex_funcs): New function ptr fdopenw.
* pex-unix.c (pex_unix_fdopenw): New function.
(funcs): List it as our fdopenw function.
* pex-win32.c (pex_win32_fdopenw): New function.
(funcs): List it as our fdopenw function.
* pex-djgpp.c (funcs): Leave fdopenw null.
* pex-msdos (funcs): Same.
* functions.texi: Regenerated.
src/include/ChangeLog:
2006-04-10 Jim Blandy <jimb@codesourcery.com>
* libiberty.h (pex_input_file, pex_input_pipe): New declarations.
From-SVN: r112883
* libiberty.h (expandargv): New function.
* argv.c (safe-ctype.h): Include it.
(ISBLANK): Remove.
(stdio.h): Include.
(buildargv): Use ISSPACE instead of ISBLANK.
(expandargv): New function.
From-SVN: r104664
[libiberty]
* floatformat.c (floatformat_always_valid): Change type of last
argument to `void *'.
(floatformat_i387_ext_is_valid): Likewise.
(floatformat_to_double): Change type of second argument to `const
void *'.
(floatformat_from_double): Change type of last argument to `void
*'.
(floatformat_is_valid): Change type of last argument to `const
void *'.
(ieee_test): Remove redundant casts.
[include]
* floatformat.h (struct floatformat): Change type of large
argument for is_valid member to `const void *'.
(floatformat_to_double): Change type of second argument to `const
void *'.
(floatformat_from_double): Change type of last argument to `void
*'.
(floatformat_is_valid): Change type of last argument to `const
void *'.
From-SVN: r103218
2005-06-29 Daniel Berlin <dberlin@dberlin.org>
* tree-complex.c (complex_variable_components): Now a hashtable.
(cvc_lookup): Ditto.
(cvc_insert): Ditto.
(create_components): Use referenced var iterator.
Initialize hashtable. Use cvc_insert/lookup.
(extract_components): Use cvc_insert/lookup.
(update_complex_components): Ditto.
(update_complex_components_on_edge): Ditto.
* tree-dfa.c (referenced_vars): Now a hashtable.
(dump_referenced_vars): Use iterator.
(referenced_var_lookup): New function.
(referenced_var_insert): Ditto.
(add_referenced_var): Use referenced_var_insert.
(mark_new_vars_to_rename): Use DECL_UID.
* tree-flow-inline.h (first_htab_element): New function.
(end_htab_p): Ditto.
(next_htab_element): Ditto.
(first_referenced_var): Ditto.
(end_referenced_vars_p): Ditto.
(next_referenced_var): Ditto.
(is_call_clobbered): Use DECL_UID.
(mark_call_clobbered): Ditto.
(clear_call_clobbered): Ditto.
(mark_non_addressable): Ditto.
* tree-flow.h (htab_iterator): New struct.
(FOR_EACH_HTAB_ELEMENT): New macro.
(struct int_tree_map): New struct.
(int_tree_map_hash): Prototype.
(int_tree_map_eq): Ditto.
(referenced_var_iterator): Ditto.
(FOR_EACH_REFERENCED_VAR): New macro.
(referenced_vars): Now a hashtable.
* tree-into-ssa.c (symbol_marked_for_renaming): Use DECL_UID.
(add_new_name_mapping): Ditto.
(mark_def_sites): Ditto.
(insert_phi_nodes): Use referenced_var iterator.
(mark_def_site_blocks): Ditto.
(mark_sym_for_renaming): Use DECL_UID.
* tree-sra.c (is_sra_candidate_decl): Use DECL_UID.
(lookup_element): Ditto.
(find_candidates_for_sra): Use referenced_vars iterator.
Use DECL_UID.
* tree-ssa-alias.c (NUM_REFERENCES): New macro.
(NUM_REFERENCES_CLEAR): Ditto.
(NUM_REFERENCES_INC): Ditto.
(NUM_REFERENCES_SET): Ditto.
(alias_obstack): New bitmap obstack.
(struct alias_map_d): Use bitmap, not sbitmap.
(struct alias_info): Remove num_references.
(init_alias_info): Use referenced_var iterator.
Initialize bitmap obstack.
(delete_alias_info): Use referenced_var iterator.
Free bitmap obstack.
(compute_points_to_and_addr_escape): Use DECL_UID.
Use new NUM_REFERENCES macros.
(compute_flow_sensitive_aliasing): may_aliases is now a bitmap.
Use new NUM_REFERENCES macros.
(group_aliases_into): Update prototype to use bitmap.
(setup_pointers_and_addressables): Use referenced_vars iterator.
Use DECL_UID. Use new NUM_REFERENCES macros.
(add_pointed_to_var): Use DECL_UID.
(dump_alias_info): Use referenced_var iterator.
(add_type_alias): Ditto.
(used_portions): Now a hashtable.
(used_part_map_eq): New function.
(used_part_map_hash): Ditto.
(free_used_part_map): Ditto.
(up_lookup): Ditto.
(up_insert): Ditto.
(get_or_create_used_part_for): Use up_lookup.
(create_overlap_variables_for): Ditto.
(find_used_portions): Use up_insert.
Use DECL_UID.
(create_structure_vars): Init used_portions hashtable, use
referenced_vars iterator.
* tree-ssa-live.c (create_ssa_var_map): sbitmaps became bitmaps.
Use DECL_UID.
* tree-ssa-loop-im.c (gather_mem_refs_stmt): Use DECL_UID.
* tree-ssa-operands.c (get_asm_expr_operands): Ditto.
(note_addressable): Ditto.
* tree-ssa-structalias.c (set_uids_in_ptset): Ditto.
* tree-ssa.c (verify_flow_insensitive_alias_info): Use
referenced_var iterator.
Use DECL_UID.
(delete_tree_ssa): Ditto.
(int_tree_map_eq): New function.
(int_tree_map_hash): Ditto.
* tree-stdarg.c (find_va_list_reference): Use DECL_UID.
(va_list_ptr_read): Ditto.
(va_list_counter_struct_op): Ditto.
(va_list_ptr_write): Ditto.
(check_va_list_escapes): Ditto.
(check_all_va_list_escapes): Ditto.
(execute_optimize_stdarg): Ditto.
* tree-tailcall.c (suitable_for_tail_opt_p): Used referenced_var
iterator.
2005-06-30 Daniel Berlin <dberlin@dberlin.org>
* hashtab.h (HTAB_DELETED_ENTRY): New macro.
(HTAB_EMPTY_ENTRY): New macro.
2005-06-30 Daniel Berlin <dberlin@dberlin.org>
* hashtab.c (EMPTY_ENTRY): Moved and renamed.
(DELETED_ENTRY): Ditto.
From-SVN: r101480
include/
2005-05-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
* libiberty.h (ACONCAT): Properly cast value of alloca().
* ansidecl.h (ATTRIBUTE_UNUSED_LABEL): Don't define if
__cplusplus.
libiberty/
2005-05-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
* configure.ac: Check declarations for calloc(), getenv(),
malloc(), realloc() and sbrk().
* config.in: Regenerate.
* configure: Likewise.
* alloca.c (C_alloca): Change "new" to "new_storage". Use XNEWVEC
instead of xmalloc.
* choose-temp.c (choose_temp_base): Use XNEWVEC instea od xmalloc.
* concat.c (liiberty_concat_ptr): Surround definition with an
extern "C" block, if __cplusplus.
(concat): Use XNEWVEC instead of xmalloc.
(reconcat): Likewise.
* cp-demangle.c (struct d_print_template): Rename member
"template" to "template_decl". Adjust use throughout the file.
(d_print_resize): Properly cast return value of realloc().
(cplus_demangle_print): Same for malloc().
(d_demangle): Likewise.
* cp-demint.c (cplus_demangle_fill_builtin_type): Rename parameter
"typename" to "type_name".
* cplus-dem.c (grow_vect): Use XRESIZEVEC instead of xrealloc().
(work_stuff_copy_to_from): Use XNEWVEC insteand of xmalloc().
(demangle_template_value_parm): Likewise.
(demangle_template): Likewise.
(recursively_demangle): Likewise.
(do_hpacc_template_literal): Likewise.
(do_arg): Likewise.
(remember_type): Likewise.
(remember_Ktype): Likewise.
(register_Btype): Likewise.
(string_need): Use XRESIZEVEC instead of xrealloc().
* dyn-string.c (dyn_string_init): Use XNEWVEC.
(dyn_string_new): Use XNEW.
(dyn_string_resize): Use XRESIZEVEC.
* fnmatch.c (fnmatch): Rename local variable "not" to "negate".
* getopt.c (getenv): Declare only if !__cplusplus and !getenv.
Otherwise include <stdlib.h>.
(exchange): Cast return value of malloc().
* hashtab.c (htab_size): Define as both macro and non-inline
function.
(htab_elements): Likewise.
* getpwd.c (getpwd): Use XNEWVEC.
(htab_create_alloc_ex): Use C90 prototype-style.
* lrealpath.c (lrealpath): Appropriately cast return value of
malloc().
* make-relative-prefix.c (save_string): Likewise.
* make-temp-file.c (try_dir): Rename from "try". Adjust use in
the file.
(choose_tmpdir): Use XNEWVEC.
* mkstemps.c (mkstemps): Rename parameter "template" to "pattern".
* pex-common.c (pex_init_common): Use XNEW.
(pex_add_remove): Use XRESIZEVEC.
(pex_run): Likewise.
(pex_get_status_and_time): Likewise.
* pex-djgpp.c (pex_djgpp_exec_child): Likewise.
* pex-msdos.c (pex_init): Use XNEW.
(pex_msdos_exec_child): Likewise.
(pex_msdos_exec_child): Use XRESIZEVEC.
* pex-unix.c (pex_wait): Use XNEW.
* pex-win32.c (fix_argv): Use XNEWVEC.
* pexecute.c (pwait): Likewise.
* setenv.c (setenv): Properly cast return value of malloc().
* sigsetmask.c (sigsetmask): Rename local variables "old" and
"new" to "old_sig" and "new_sig".
* sort.c (main): Use XNEWVEC.
* spaces.c (spaces): Cast return value of malloc().
* strndup.c (strndup): Likewise.
* ternary.c (ternary_insert): Use XNEW.
* xmalloc.c (malloc, realloc, calloc, sbrk): Surround declaration
with an extern "C" block if __cplusplus.
* xstrdup.c (xstrdup): Cast return value of memcpy().
* xstrerror.c (strerror): Enclose declaration in an extern "C"
block if __cplusplus.
* xstrndup.c (xstrndup): Use XNEW. Cast return value of memcpy().
From-SVN: r100115
[include]
* fibheap.h (struct fibnode): Only use unsigned long bitfields
when __GNUC__ is defined and ints are less than 32-bits wide.
[libiberty]
* configure.ac: Invoke AC_CHECK_SIZEOF for sizeof (int).
* configure: Regenerate.
* config.in: Likewise.
From-SVN: r92009
include/
* libiberty.h (XDELETE, XDELETEVEC, XRESIZEVEC): Remove any
const-qualification before disposal.
gcc/
* vec.h (DEF_VEC_P): Add proper cast to uses of vec_o_reserve and
vec_p_reserve.
* langhooks.h (lang_hooks::builtin_function): Rename parameter
from "class" to "bt_class".
From-SVN: r85441
* hashtab.c (htab_remove_elt_with_hash): New function.
(htab_remove_elt): Implement in terms of htab_remove_elt_with_hash.
* hashtab.h (htab_remove_elt_with_hash): Prototype new function.
From-SVN: r80641
* demangle.h (enum demangle_component_type): Define.
(struct demangle_operator_info): Declare.
(struct demangle_builtin_type_info): Declare.
(struct demangle_component): Define.
(cplus_demangle_fill_component): Declare.
(cplus_demangle_fill_name): Declare.
(cplus_demangle_fill_builtin_type): Declare.
(cplus_demangle_fill_operator): Declare.
(cplus_demangle_fill_extended_operator): Declare.
(cplus_demangle_fill_ctor, cplus_demangle_fill_dtor): Declare.
(cplus_demangle_v3_components): Declare.
(cplus_demangle_print): Declare.
* cp-demangle.c: Include "cp-demangle.h". If IN_GLIBCPP_V3 is
defined, rename some functions which are to become static via
#define.
(CP_STATIC_IF_GLIBCPP_V3): Define.
(struct d_operator_info): Move definition to cp-demangle.h, and
rename to demangle_operator_info. Change all uses.
(enum d_builtin_type_print): Move definition to cp-demangle.h.
(struct d_builtin_type_info): Move definition to cp-demangle.h,
and rename to demangle_builtin_type_info. Change all uses.
(enum d_comp_type): Move definition to include/demangle.h, and
rename to demangle_component_type, and change all enums to start
with DEMANGLE_COMPONENT_ instead of D_. Change all uses.
(struct d_comp): Move definition to include/demangle.h, and rename
to demangle_component. Change all uses.
(struct d_info): Move definition to cp-demangle.h.
(cplus_demangle_fill_name): New function.
(cplus_demangle_fill_extended_operator): New function.
(cplus_demangle_fill_ctor): New function.
(cplus_demangle_fill_dtor): New function.
(d_make_empty): Remove type parameter. Change all callers.
(d_make_name): Use cplus_demangle_fill_name.
(d_make_extended_operator): Use
cplus_demangle_fill_extended_operator.
(d_make_ctor): Use cplus_demangle_fill_ctor.
(d_make_dtor): Use cplus_demangle_fill_dtor.
(cplus_demangle_mangled_name): Rename from d_mangled_name. Make
non-static by default. Change all callers.
(cplus_demangle_operators): Rename from d_operators. Change all
uses. Make non-static by default. Add sentinel at end of array.
(d_operator_name): Adjust initialization of high for new sentinel
in cplus_demangle_operators.
(cplus_demangle_builtin_types): Rename from d_builtin_types.
Change all uses. Make non-static by default. Change initializer
to use D_BUILTIN_TYPE_COUNT instead of magic number 26.
(cplus_demangle_type): Rename from d_type. Make non-static by
default. Change all callers.
(cplus_demangle_init_info): Rename from d_init_info. Make
non-static by default. Change all callers.
* cp-demangle.h: New file.
* cp-demint.c: New file.
* Makefile.in: Rebuild dependencies.
(CFILES): Add cp-demint.c.
(REQUIRED_OFILES): Add cp-demint.o.
From-SVN: r75748
include:
* obstack.h: Merge the following change from gnulib:
2003-10-21 Paul Eggert <eggert@twinsun.com>
* obstack.h (obstack_1grow_fast): Properly parenthesize arg.
(obstack_ptr_grow_fast, obstack_int_grow_fast):
Don't use lvalue casts, as GCC plans to remove support for them
in GCC 3.5. Reported by Joseph S. Myers. This bug
was also present in the non-GCC version, indicating that this
code had always been buggy and had never been widely used.
(obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
Use the fast variant of each macro, rather than copying the
definiens of the fast variant; that way, we'll be more likely to
catch future bugs in the fast variants.
gcc:
* c-typeck.c (pedantic_lvalue_warning): Unconditionally warn of
deprecation of casts as lvalues.
* fixinc/inclhack.def (obstack_lvalue_cast): New fix.
* fixinc/fixincl.x: Regenerate.
* fixinc/tests/base/obstack.h: New test.
gcc/testsuite:
* gcc.dg/cast-lvalue-1.c: New test.
From-SVN: r72826
include:
* safe-ctype.h (HC_UNKNOWN, HC_ASCII, HC_EBCDIC): Rename to
HOST_CHARSET_UNKNOWN, HOST_CHARSET_ASCII, HOST_CHARSET_EBCDIC
respectively.
libiberty:
* safe-ctype.c: Use HOST_CHARSET_ASCII and HOST_CHARSET_EBCDIC,
not HC_ASCII and HC_EBCDIC.
Add documentation in form expected by gather-docs.
* hex.c: Use HOST_CHARSET, not hand-coded check of character set.
* Makefile.in, functions.texi: Regenerate.
gcc:
* config/i370/i370.c, config/i370/i370.h: Use HOST_CHARSET_ASCII
and HOST_CHARSET_EBCDIC, not HC_ASCII and HC_EBCDIC.
From-SVN: r68335
libiberty/ChangeLog:
2003-05-14 Jim Blandy <jimb@redhat.com>
* hex.c (_hex_value): Make this unsigned.
(hex_value): Update documentation for new return type. hex_value
now expands to an unsigned int expression, to avoid unexpected
sign extension when we store it in a bfd_vma, which is larger than
int on some platforms.
* functions.texi: Regenerated.
include/ChangeLog:
2003-05-14 Jim Blandy <jimb@redhat.com>
* libiberty.h (hex_value): Make the value an unsigned int, to
avoid unexpected sign-extension when cast to unsigned types larger
than int --- like bfd_vma, on some platforms.
(_hex_value): Update declaration.
From-SVN: r66840