* cp-demangle.c: s/new_abi/v3/.
* cplus-dem.c: Likewise.
(current_demangling_style): Now auto_demangling.
(cplus_demangle): Try v3 demangling if AUTO_DEMANGLING.
(main): Use standard symbol chars for auto_demangling.
From-SVN: r38002
gcc:
* Makefile.in, config.gcc, configure.in: Expunge remaining
traces of facility for running MD files through C preprocessor.
libiberty:
* aclocal.m4 (LIB_AC_PROG_CC): Moved here from configure.in.
(AC_DEFINE_NOAUTOHEADER): New - work around bug in autoheader.
* configure.in: Call AC_C_INLINE and AC_C_CONST. Use three
argument form of AC_DEFINE in dummy definitions block. Use
AC_DEFINE_NOAUTOHEADER for real definitions of things defined
in dummy block. Preload cache variables instead of bypassing
tests, where possible.
* acconfig.h: Removed.
* xmalloc.c (xmalloc_failed): New function, does error
reporting on failed allocation.
(xmalloc, xcalloc, xrealloc): Use it.
* libiberty.h: Move #includes to top. Prototype xmalloc_failed.
From-SVN: r37650
* hashtab.c (htab_expand): Change to return int. Use calloc or
xcalloc depending on htab->return_allocation_failure. Return zero
if calloc fails.
(htab_create): Update comment to cover memory allocation.
(htab_try_create): New.
(htab_find_slot_with_hash): Return NULL if htab_expand fails.
Update comment to cover this.
From-SVN: r37247
* splay-tree.c (splay_tree_predecessor): Fix typo in comment.
Convert the C front-end to use function-at-a-time mode.
* c-common.h: Include splay-tree.h.
(C_DECLARED_LABEL_FLAG): New macro.
(struct language_function): Add x_scope_stmt_stack and
x_function_name_declared_p.
(RECHAIN_STMTS): Move definition.
(lang_statment_code_p): Likewise.
(lang_expand_stmt): Likewise.
(lang_expand_decl_stmt): New variable.
(lang_expand_function_end): Likewise.
(current_scope_stmt_stack): New function.
(add_decl_stmt): Likewise.
(add_scope_stmt): Likewise.
(mark_stmt_tree): Likewise.
(struct c_lang_decl): New structure.
(DECL_SAVED_TREE): Define.
(c_mark_lang_decl): New function.
(c_expand_start_cond): Change prototype.
(c_finish_then): New function.
(c_finish_else): Likewise.
(current_function_name_declared): Remove.
(set_current_function_name_declared): Likewise.
(mark_c_language_function): Declare.
(case_compare): Likewise.
(c_add_case_label): Likewise.
(c_expand_expr): Likewise.
(c_safe_from_p): Likewise.
* c-common.c (lang_expand_function_end): New variable.
(struct if_elt): Add if_stmt.
(c_expand_start_cond): Add the if-statement to the statement-tree,
rather than generating RTL.
(c_finish_then): New function.
(c_expand_start_else): Don't generate RTL.
(c_finish_else): New function.
(c_expand_expr_stmt): Don't generate RTL.
(statement_code_p): Add SCOPE_STMT.
(case_compare): New function.
(c_add_case_label): Likewise.
(mark_stmt_tree): Likewise.
(c_mark_lang_decl): Likewise.
(mark_c_language_function): Likewise.
(c_expand_expr): Likewise.
(c_safe_from_p): Likewise.
* c-decl.c (c_stmt_tree): New variable
(c_scope_stmt_stack): Likewise.
(c_function_name_declared_p): Likewise.
(lang_expand_expr_stmt): Remove.
(poplevel): Don't call output_inline_function for nested
functions.
(pushdecl): Don't set DECL_CONTEXT for a local declaration of an
`extern' function.
(redeclaration_error_message): Change means of computing whether
or not a function is nested.
(lookup_label): Don't call label_rtx.
(init_decl_processing): Add more GC roots.
(start_decl): Add DECL_STMTs to the statement-tree, rather than
calling rest_of_decl_compilation.
(finish_decl): Don't call expand_decl.
(store_parm_decls): Begin the statement-tree, but don't generate
RTL.
(finish_function): Tie off the statement-tree. Call c_expand_body
if appropriate.
(c_expand_body): New function.
(push_c_function_context): Save more information.
(pop_c_function_contxt): Likewise.
(copy_lang_decl): Now that we use DECL_LANG_SPECIFIC, copy it.
(lang_mark_tree): Mark it.
(current_stmt_tree): Adjust.
(current_scope_stmt_stack): New function.
(do_case): Remove.
(set_current_name_declared): Likewise.
(c_begin_compound_stmt): Define.
(c_expand_decl_stmt): Likewise.
* c-lang.c: Include rtl.h and expr.h.
(lang_init): Set more language-specific hooks.
* c-lex.c: Include expr.h.
* c-parse.in: Changes throughout to add statements to the
statement-tree, rather than generating RTL after every statement.
* c-semantics.c (lang_expand_decl_stmt): Define.
(add_decl_stmt): New function.
(add_scope_stmt): Likewise.
(finish_stmt_tree): Tweak.
(genrtl_expr_stmt): Likewise.
(genrtl_decl_stmt): Handle local labels, and call
lang_expand_decl_stmt if required.
(genrtl_for_stmt): Fix line-number handling.
(genrtl_case_label): Handle cleanups.
(genrtl_asm_stmt): Don't call combine_strings.
(genrtl_compound_stmt): Simplify.
(expand_stmt): Handle SCOPE_STMTs.
* c-tree.h (struct lang_decl): New structure.
(C_DECLARED_LABEL_FLAG): Remove.
(c_begin_compound_stmt): Declare.
(c_expand_decl_stmt): Likewise.
(c_expand_start_case): Rename to c_start_case.
(c_finish_case): New function.
* c-typeck.c (start_init): Tweak setting of
constructor_incremental.
(c_expand_asm_operands): Tweak error-handling. Add to the
statement-tree.
(c_expand_return): Add to the statement-tree.
(c_expand_start_case): Rename to ...
(c_start_case): ... this.
(struct c_switch): New type.
(switch_stack): New variable.
(do_case): Simplify.
(c_finish_case): New function.
* dependence.c: Include expr.h.
(enum dependence_type): Change spelling of enumerals.
(check_node_dependence): Adjust.
* expr.h (lang_safe_from_p): Declare.
(safe_from_p): Likewise.
* expr.c (lang_safe_from_p): New variable.
(safe_from_p): Give it external linkage. Use lang_safe_from_p.
* stmt.c (expand_expr_stmt): Avoid clobberring of last_expr_type.
* toplev.c (rest_of_decl_compilation): Robustify.
* tree.c (contains_placeholder_p): Likewise.
* Makefile.in: Update dependencies.
* objc/objc-act.h: Adjust calculation of value for dummy_tree_code.
* objc/objc-act.c: Include rtl.h, expr.h, and c-common.h.
(objc_expand_function_end): New function.
(finish_method_def): Use it.
(init_objc): Initialize more language-specific hooks.
* objc/Make-lang.in: Update dependencies.
* cp-tree.h (struct cp_language_function): Remove
x_scope_stmt_stack and name_declared.
(current_scope_stmt_stack): Remove.
(function_name_declared_p): New macro.
(struct lang_decl_flags): Use c_lang_decl as a base class.
(context): Remove.
(struct lang_decl): Replace saved_tree with context.
(DECL_FRIEND_CONTEXT): Adjust accordingly.
(SET_DECL_FRIEND_CONTEXT): Likewise.
(DECL_VIRTUAL_CONTEXT): Likewise.
(DECL_SAVED_TREE): Remove.
(C_DECLARED_LABEL_FLAG): Likewise.
(cplus_expand_expr_stmt): Don't declare.
(add_decl_stmt): Likewise.
(add_scope_stmt): Likewise.
* decl.c (mark_stmt_tree): Remove.
(case_compare): Likewise.
(finish_case_label): Use c_add_case_label.
(init_decl_processing): Set more language-specific hooks.
(build_enumerator): Fix typo in comment.
(cplus_expand_expr_stmt): Remove.
(mark_lang_function): Use mark_c_language_function.
(lang_mark_tree): Use c_mark_lang_decl.
* decl2.c: Change order of inclusion.
* except.c: Likewise.
* expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
back on c_expand_expr.
* friend.c: Include expr.h.
* init.c: Change order of inclusion.
* Makefile.in: Update dependencies.
* lex.h (free_lang_decl_chain): Remove.
* optimize.c (maybe_clone_body): Use function_name_declared_p.
* pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
it doesn't exist.
(instantiate_decl): Use function_name_declared_p.
* semantics.c (lang_expand_expr_stmt): Remove.
(set_current_function_name_declared): Likewise.
(current_function_name_declared): Likewise.
(begin_compound_stmt): Use function_name_declared_p.
(add_decl_stmt): Remove.
(setup_vtbl_ptr): Use function_name_declared_p.
(add_scope_stmt): Remove.
(current_scope_stmt_stack): New function.
(cp_expand_stmt): Don't handle SCOPE_STMTs.
(expand_body): Use function_name_declared_p.
* tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
* typeck.c: Change order of includes.
(convert_sequence): Remove.
From-SVN: r36464
* testsuite/demangle-expected: Add four tests for type_info
mangling.
* cplus-dem.c (gnu_special): Use do_type, not demangle_fund_type,
for a non-template non-qualified type_info function or node.
From-SVN: r36301
* cp-demangle.c (status_allocation_failed): Rearrange whitespace.
(demangle_type): Handle substitution candidates correctly in the
face of special substitutions.
From-SVN: r36228
* cp-demangle.c (demangle_nv_offset): New function.
(demangle_v_offset): Likewise.
(demangle_call_offset): Likewise.
(demangle_special_name): Update thunk demangling to comply with
ABI changes.
From-SVN: r36150
2000-08-28 Daniel Berlin <dberlin@redhat.com>
* dwarf2out.c (DIE_LABEL_PREFIX): Remove leading "__".
(print_die): If we don't know the offset of the
target die, try the symbol. Add a trailing newline.
(reverse_all_dies): New fn.
(dwarf2out_finish): Call it.
(break_out_includes): Reorganize for clarity.
(add_sibling_attributes): Don't call reverse_die_lists.
(output_comp_unit): Rename from output_comdat_comp_unit. Use for
primary CU, too.
* flags.h: Add flag_eliminate_dwarf2_dups.
* toplev.c (f_options): Support -feliminate-dwarf2-dups.
2000-08-28 Jason Merrill <jason@redhat.com>
* dwarf2.h (DW_TAG_GNU_BINCL, DW_TAG_GNU_EINCL): New tags.
* dwarf2out.c: #include "md5.h".
(DIE_LABEL_PREFIX): New macro.
(dw_val_struct): Add 'external' flag to val_die_ref.
(add_AT_die_ref, AT_ref): Adjust.
(AT_ref_external, set_AT_ref_external): New fns.
(build_abbrev_table): Call set_AT_ref_external.
(value_format): Call AT_ref_external.
(die_struct): Add die_symbol field.
(new_die): Clear it.
(dwarf_tag_name): Handle BINCL/EINCL.
(dwarf2out_start_source_file): Add BINCL DIE.
(dwarf2out_end_source_file): Add EINCL DIE.
(push_new_compile_unit, pop_compile_unit, clear_die_sizes): New fns.
(loc_checksum, attr_checksum, die_checksum): New fns.
(is_type_die, is_comdat_die, is_symbol_die): New fns.
(compute_section_prefix, assign_symbol_names): New fns.
(gen_internal_sym, output_die_symbol, output_symbolic_ref): New fns.
(output_die): Call output_die_symbol and AT_ref_external.
(output_comdat_comp_unit): New fn, split out from...
(dwarf2out_finish): ...here. Also call add_sibling_attributes for
secondary CUs.
(output_pubnames, output_aranges): Abort if we see entries from
secondary CUs.
* toplev.h: Declare file_name_nondirectory.
* toplev.c (file_name_nondirectory): New fn, moved from C++ frontend.
(rest_of_type_compilation): Call dwarf2out_decl if at toplevel.
(debug_start_source_file): Call dwarf2out_start_source_file
regardless of debug verbosity.
(debug_end_source_file): Similarly.
* tree.h: Declare clean_symbol_name.
* tree.c (clean_symbol_name): Split out from...
(get_file_function_name_long): ...here.
* dwarf2out.c (new_loc_descr): Use calloc.
(splice_child_die): Remove the die from the right parent.
(gen_struct_or_union_die): Don't add AT_name to a specification DIE.
gcc/cp:
2000-08-28 Jason Merrill <jason@redhat.com>
* lex.c (file_name_nondirectory): Move to toplev.c.
libiberty:
2000-08-28 Jason Merrill <jason@redhat.com>
* Makefile.in (REQUIRED_OFILES): Add md5.o.
(CFILES): Add md5.c.
* md5.c: New file.
include:
2000-08-28 Jason Merrill <jason@redhat.com>
* md5.h: New file.
gcc/cp:
2000-08-28 Jason Merrill <jason@redhat.com>
* cp-tree.h (LOCAL_CLASS_P): New macro.
* class.c (finish_struct_1): Use it.
From-SVN: r36022
* cp-demangle.c (demangle_name): Initialize template_p in local
name case. Don't re-add substitutions as candidates.
(demangle_nested_name): Use <unqualified-name>.
(demangle_prefix): Likewise. Don't add template names as
substitution candidates twice, or re-add a substitution or the
last prefix component.
(demangle_local_name): Adjust output format.
From-SVN: r36014
* cp-demangle.c (result_close_template_list): Remove function.
(result_add_separated_char): New function.
(result_open_template_list): New macro.
(result_close_template_list): Likewise.
(demangle_prefix): Don't set template_p if the
prefix ends with a ctor name.
(demangle_type_ptr): Remove duplicate RETURN_IF_ERROR.
(demangle_type): Check for template args after substitution.
(demangle_template_args): Use result_open_template_list.
From-SVN: r35915
* pexecute.c (pexecute) [__MSDOS__]: Change __GO32__ to
__DJGPP__. Use P_WAIT instead of constant in the spawnv* call.
Cast program to 'char *' in errmsg_arg assignment.
(PWAIT_ERROR): Define.
(pwait): Use PWAIT_ERROR. Adjust DJGPP's status code to conform
to DJGPP's WIF* macros.
From-SVN: r35281
* Makefile.in (rename.o, waitpid.o): Depend on config.h
* rename.c: include config.h, unistd.h
* waitpid.c: include config.h, sys/wait.h
Co-Authored-By: Jeffrey A Law <law@cygnus.com>
From-SVN: r35272
* cp-demangle.c (demangle_encoding): Accept no substitutions.
(demangle_name): Handle <substitution> followed by
<unqualified-template-name>.
(demangle_type): Follow special substitutions with
<class-enum-type>
(demangle_subtitution): Set template_p for special substitutions.
(main): Fix typos.
in gcc/cp/ChangeLog:
* mangle.c (find_substitution): Use same_type_p.
(write_encoding): Don't check for substitutions.
in libio/ChangeLog:
* libioP.h (VTABLE_LABEL): Update for new vtable mangling.
* stdstrbufs.cc (filebuf_vtable): Likewise.
(stdiobuf_vtable): Likewise.
From-SVN: r34811
* dyn-string.h (dyn_string_init, dyn_string_new,
dyn_string_delete, dyn_string_release, dyn_string_resize,
dyn_string_clear, dyn_string_copy, dyn_string_copy_cstr,
dyn_string_prepend, dyn_string_prepend_cstr, dyn_string_insert,
dyn_string_insert_cstr, dyn_string_append, dyn_string_append_cstr,
dyn_string_append_char, dyn_string_substring_dyn_string_eq):
Define as same name with __cxa_ prepended, if IN_LIBGCC2.
(dyn_string_init, dyn_string_copy, dyn_string_copy_cstr,
dyn_string_prepend, dyn_string_prepend_cstr, dyn_string_insert,
dyn_string_insert_cstr, dyn_string_append, dyn_string_append_cstr,
dyn_string_append_char, dyn_string_substring): Change return type
to int.
in libiberty/ChangeLog:
* cp-demangle.c: Don't include ctype.h.
(IS_DIGIT): New macro.
(IS_ALPHA): Likewise. Use IS_DIGIT and IS_ALPHA throughout
instead of isdigit and isalpanum.
(demangling_def): Make name and next const pointers.
(STATUS_ALLOCATION_FAILED): New status code.
(dyn_string_append_space): Handle failure in
dyn_string_append_char.
(int_to_dyn_string): Likewise. Change return value to status_t.
(string_list_new): Handle failure of dyn_string_init.
(result_close_template_list): Change return type to status_t.
Handle failure in dyn_string_append.
(result_push): Change return value to status_t. Handle failure in
string_list_new. Handle failure of result_push throughout.
(substitution_add): Change return value to status_t. Handle
dyn_string failures. Handle failure of substitution_add
throughout.
(template_arg_list_new): Return NULL on allocation failure.
(result_append_string): Return STATUS_ALLOCATION_FAILED on error.
Handle error result throughout.
(result_append): Likewise.
(result_append_char): Likewise.
(result_append_space): Likewise.
(demangling_new): Make argument a const pointer. Handle
allocation failures.
(demangle_template_args): Handle failure in template_arg_list_new
and result_close_template_list.
(demangle_discriminator): Return if int_to_dyn_string fails.
(cp_demangle): Likewise.
(cp_demangle_type): New function.
(cplus_demangle_new_abi): Don't call dyn_string_delete. Abort on
memory allocation failure.
(main): Likewise.
* dyn-string.c (RETURN_ON_ALLOCATION_FAILURE): Define if
IN_LIBGCC2.
(dyn_string_init): Change return value to int. Handle
RETURN_ON_ALLOCATION_FAILURE case.
(dyn_string_new): Handle RETURN_ON_ALLOCATION_FAILURE case.
(dyn_string_release): Delete the dyn_string.
(dyn_string_resize): Handle RETURN_ON_ALLOCATION_FAILURE case.
(dyn_string_copy): Change return type to int.
(dyn_string_copy_cstr): Likewise.
(dyn_string_prepend): Likewise.
(dyn_string_prepend_cstr): Likewise.
(dyn_string_insert): Likewise.
(dyn_string_insert_cstr): Likewise.
(dyn_string_append): Likewise.
(dyn_string_append_cstr): Likewise.
(dyn_string_append_char): Likewise.
(dyn_string_substring): Likewise.
in gcc/cp/ChangeLog:
* Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
(CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
(cp-demangle.o): New rule.
(dyn-string.o): Likewise.
* inc/cxxabi.h (__cxa_demangle): New declaration.
From-SVN: r34657
* cp-demangle.c (stdio.h): File included unconditionaly.
(template_arg_list_new): Parameter list is PARAMS ((void)), not ().
* dyn-string.c (stdio.h): File included.
* partition.c (partition_print): No `&' needed to take the address of
a function.
From-SVN: r34450
* dyn-string.h: Move here from gcc/dyn-string.h. Add new functions.
* demangle.h (DMGL_GNU_NEW_ABI): New macro.
(DMGL_STYLE_MASK): Or in DMGL_GNU_NEW_ABI.
(current_demangling_style): Add gnu_new_abi_demangling.
(GNU_NEW_ABI_DEMANGLING_STYLE_STRING): New macro.
(GNU_NEW_ABI_DEMANGLING): Likewise.
(cplus_demangle_new_abi): New declaration.
In libiberty,
* Makefile.in (CFILES): Add cp-demangle.c and dyn-string.c.
(REQUIRED_OFILES): Add cp-demangle.o and dyn-string.o.
(cp-demangle.o): New dependency.
(dyn-string.o): Likewise.
* dyn-string.c: Move here from gcc/dyn-string.c. Add new functions.
* cplus-dem.c (libiberty_demanglers): Add initializer for new-ABI
demangler.
(cplus_demangle): Call cplus_demangle_new_abi if in new-ABI
demangling mode.
(gnu_new_abi_symbol_characters): New function.
(main): Use gnu_new_abi_symbol_characters. * cp-demangle.c: New
file.
* cp-demangle.c: New file.
From-SVN: r34397
* hashtab.c, partition.c, sort.c, xmemdup.c: Include string.h
if HAVE_STRING_H.
* pexecute.c, xexit.c: Include stdlib.h if HAVE_STDLIB_H.
* objalloc.c: Include config.h. Include stdlib.h and don't
declare malloc or free if HAVE_STDLIB_H.
* strerror.c, strsignal.c: Include stdlib.h if HAVE_STDLIB_H,
else declare malloc without prototype. Include string.h if
HAVE_STRING_H, else declare memset without prototype. Don't
include stddef.h.
From-SVN: r34254
* sort.h (sys/types.h): File included unconditionnaly.
(stddef.h): File include only #ifdef __STDC__.
* sort.c (UCHAR_MAX): Provide fallback definition.
From-SVN: r33670
(libiberty_demanglers): new table for demangle styles
(cplus_demangle_set_style): New function for setting style
(cplus_demangle_name_to_style): New function to translate name
* include/demangle.h
(libiberty_demanglers): new table for different styles
(cplus_demangle_set_style): New function for setting style
(cplus_demangle_name_to_style): New function to translate name
Co-Authored-By: Jason Merrill <jason@casey.cygnus.com>
From-SVN: r33525
* aclocal.m4: New file with new test libiberty_AC_FUNC_STRNCMP.
* configure.in (AC_CHECK_HEADERS): Add sys/mman.h fcntl.h.
(libiberty_AC_FUNC_STRNCMP): Invoke.
* strncmp.c: New file.
From-SVN: r33498
* hashtab.h (hashval_t): New type.
(htab_find_with_hash): Use it as an argument.
(htab_find_slot_with_hash): Likewise.
* hashtab.c (find_empty_slot_for_expand): Use hashval_t for hash
codes.
(htab_find_with_hash): Likewise.
(htab_find_slot_with_hash): Likewise.
From-SVN: r32842
* partition.h: New file.
Changes in libiberty:
* Makefile.in (CFILES): Add partition.c.
(REQUIRED_OFILES): Add partition.o.
(partition.o): New rule.
* partition.c: New file.
Changes in gcc:
* Makefile.in (ssa.o): New rule.
(OBJS): Add ssa.o.
(STAGESTUFF): Add *.ssa and *.ussa.
(mostlyclean): Delete *.ssa, *.ussa, */*.ssa, */*.ussa.
* rtl.def (PHI): New RTL expression.
* rtl.h (clear_log_links): New declaration.
(convert_to_ssa): Likewise.
(convert_from_ssa): Likewise.
* flow.c (split_edge): If the entry node falls through to the
split edge's source block, split the entry edge.
(clear_log_links): New function.
* toplev.c (ssa_dump): New variable.
(flag_ssa): Likewise.
(f_options): Add "ssa".
(compile_file): Create SSA dump files.
(rest_of_compilation): Go to and from SSA if enabled.
(decide_d_option): Handle -de for SSA dump files.
* ssa.c: New file.
From-SVN: r32465
* hashtab.c: Remove debugging variables (all_searches,
all_collisions, all_expansions). Delete
all_hash_table_collisions.
(create_hash_table, delete_hash_table, empty_hash_table,
find_hash_table_entry, remove_element_from_hash_table_entry,
clear_hash_table_slot, traverse_hash_table, hash_table_size,
hash_table_elements_number, hash_table_collisions): Rename to:
htab_create, htab_delete, htab_empty, htab_find_slot,
htab_remove_elt, htab_clear_slot, htab_traverse, htab_size,
htab_elements, htab_collisions.
(htab_find): New function, handles common case where you don't
plan to add or delete an entry.
(htab_expand): Don't create a whole new table, just a new
entry vector.
(htab_find_slot): Simplify logic.
* hashtab.h (hash_table_t): Rename to htab_t.
(struct hash_table): Rename to struct htab. Shorten element
names. Reorder elements by size.
(htab_hash, htab_eq, htab_trav): New typedefs for the callback
function pointers.
(hash_table_entry_t): Discard; just use void * for element
type.
From-SVN: r32437
* splay-tree.h (struct splay_tree_node): Rename to ...
(struct splay_tree_node_s): ... this.
(struct splay_tree): Rename to ...
(struct splay_tree_s): ... this.
* splay-tree.c (splay_tree_new): Use struct splay_tree_node_s
rather than struct splay_tree_node.
(splay_tree_insert): Use struct splay_tree_s rather than struct
splay_tree.
From-SVN: r30790
Revert last change. HJ's message meant "code like this already exists
in libiberty/libio", not "code like this needs to be added to libiberty/libio".
What a waste of my time.
From-SVN: r30534
* cplus-dem.c: Move declarations of standard_symbol_characters and
hp_symbol_characters inside #ifdef MAIN to avoid compiler
warnings.
From-SVN: r30175
1999-10-23 08:51 -0700 Zack Weinberg <zack@bitmover.com>
* hashtab.c (find_hash_table_entry): When returning a
DELETED_ENTRY slot, change it to EMPTY_ENTRY first.
(clear_hash_table_slot): New function which deletes an entry
by its position in the table, not its value.
(traverse_hash_table): New function which calls a hook
function for every live entry in the table.
* hashtab.h: Give hash_table_t a struct tag. Add prototypes
for clear_hash_table_slot and traverse_hash_table. Correct
prototype of all_hash_table_collisions.
From-SVN: r30138
* cplus-dem.c (INTBUF_SIZE): New macro.
(string_append_template_idx): New function.
(demangle_expression): Likewise.
(demangle_integral_value): Use it.
(demangle_real_value): New function, split out from ...
(demangle_template_value_parm): ... here. Use
string_append_template_idx. Use demangle_real_value.
(demangle_template): Use string_append_template_idx.
(demangle_qualified): Use consume_count_with_underscores.
(get_count): Tweak formatting.
(do_type): Use string_append_template_idx.
From-SVN: r30091
* alloca-conf.h (alloca) [C_ALLOCA]: Don't use Gcc builtin
or <alloca.h>.
* clock.c (GNU_HZ): New definition.
(clock): Use it.
* getruntime.c: Likewise.
* config.table: Use mh-beos.
* config/mh-beos: New file.
From-SVN: r29680
* Makefile.in (CFILES): Add calloc.c and getpwd.c.
(REQUIRED_OFILES): Add getpwd.o.
(getpwd.o): Add target.
* configure.in (AC_PREREQ): Bump to 2.13.
(AC_CHECK_HEADERS): Add check for <sys/stat.h>.
* getpwd.c: New file, moved here from gcc.
From-SVN: r28996
* cplus-dem.c (gnu_special): Cast a `size_t' to `long' when
comparing against a signed quantity.
(arm_special): Likewise.
(demangle_fund_type): Likewise.
(do_hpacc_template_const_value): Mark parameter `work' with
ATTRIBUTE_UNUSED.
(main): Constify variable `valid_symbols'.
From-SVN: r28859
* Makefile.in (FLAGS_TO_PASS): Include prefix, exec_prefix,
libdir, libsubdir and tooldir.
Applied in libchill, libf2c, libiberty and libobjc
From-SVN: r28569
* setenv.c (sys/types.h, stdio.h): Files included.
* xstrdup.c (sys/types.h): File included.
For the gcc-2.95 branch only. Not to be migrated into the mainline tree
because it is incomplete.
From-SVN: r27736
* cplus-dem.c (demangle_fund_type (near 'I' case)): Don't advance
the *mangled pointer beyond the end of the string. Clean up code to
match prevailing coding style.
From-SVN: r26959
* cplus-dem.c (standard_symbol_characters): Renamed from
standard_symbol_alphabet. No longer modify TABLE.
(hp_symbol_characters): Renamed from hp_symbol_alphabet. No longer
modify TABLE.
(main): Corresponding changes. Use strchr to determine if a
character is valid.
From-SVN: r26912
* cplus-dem.c (main): Use table lookup to distinguish identifier
characters from non-identifier characters.
(standard_symbol_alphabet, hp_symbol_alphabet): New functions.
From-SVN: r26887
Fred Fish <fnf@be.com>
* configure.in (sys/resource.h): Add to AC_CHECK_HEADERS list.
* getruntime.c: Only attempt to include sys/resource.h and
use getrusage if both HAVE_GETRUSAGE and HAVE_SYS_RESOURCE_H
are defined.
From-SVN: r26808
* cplus-dem.c (mop_up): Set typevec_size to zero, so it'll be
reallocated properly if we use it again.
* cplus-dem.c (demangle_fund_type): Check for buffer overrun. Be
stricter about syntax. Always null-terminate string.
From-SVN: r26562
* configure.in (checkfuncs): Check for sbrk.
* config.in: Rebuilt.
* configure: Likewise.
* xmalloc.c: Use HAVE_SBRK instead of the host specific definitions.
From-SVN: r26480
1999-04-01 Jim Blandy <jimb@zwingli.cygnus.com>
* cplus-dem.c: Attempt to handle overflows in counts with some
semblance of grace.
(consume_count): Detect overflows. Return -1 to indicate errors,
instead of zero.
(demangle_template_value_parm, demangle_template): Handle change
to consume_count's return convention.
From-SVN: r26309
* alias.c (alias_set_compare): Remove.
(record_alias_subset): Use splay_tree_compare_ints instaed of
alias_set_compare.
(init_alias_once): Likewise.
* cse.c: Include splay-tree.h.
(reg_qty): Remove.
(reg_tick): Likewise.
(reg_table): Likewise.
(cse_reg_info): New structure.
(cse_reg_info_free_list): New variable.
(cse_reg_info_tree): Likewise.
(cached_regno): Likewise.
(cached_cse_reg_info): Likewise.
(all_minus_one): Remove.
(consec_ints): Likewise.
(GET_CSE_REG_INFO): New macro.
(REG_TICK): Likewise. Use throughout instead of reg_tick.
(REG_IN_TABLE): Likewise. Use throughout instead of reg_in_table.
(REG_QTY): Likewise. Use throughout instead of reg_qty.
(get_cse_reg_info): New function.
(free_cse_reg_info): Likewise.
(new_basic_block): Reinitialize cse_reg_info_tree instead of
reg_tick, all_minus_one, and consec_ints.
* Makefile.in (cse.o): Depend on splay-tree.h
* splay-tree.h (splay_tree_compare_ints): Declare.
* splay-tree.c (splay_tree_compare_ints): Define.
From-SVN: r26069
* cplus-dem.c (consume_count): If `count' wraps, return 0 and
don't advance input pointer.
(demangle_class_name): If consume_count didn't find a count, do
nothing. Don't bother with `strlen' sanity check; consume_count
does it for us.
From-SVN: r26068
* Makefile.in (REQUIRED_OFILES): remove mkstemp.o
* configure.in (funcs): Check for and conditionally add mkstemps to
the list of functions libiberty will provide.
* configure: Rebuilt.
From-SVN: r25106
* argv.c (buildargv): Cast the result of alloca in assignment.
* choose-temp.c: Include stdlib.h.
* cplus-dem.c (demangle_arm_pt): Remove unused prototype.
(snarf_numeric_literal): Constify first parameter.
(code_for_qualifier): Avoid a gcc extension, make the parameter an
int, not a char.
(demangle_qualifier): Likewise.
(demangle_signature): Cast the argument of a ctype function to
unsigned char.
(arm_pt): Add parens around assignment used as truth value.
(demangle_arm_hp_template): Constify variable `args'.
(do_hpacc_template_const_value): Cast the argument of a ctype
function to unsigned char.
(do_hpacc_template_literal): Remove unused variable `i'.
(snarf_numeric_literal): Constify parameter `args'.
Cast the argument of a ctype function to unsigned char.
* floatformat.c (floatformat_to_double): Add explicit braces to
avoid ambiguous `else'.
* fnmatch.c (fnmatch): Change type of variables `c', `c1',
`cstart' and `cend' to unsigned char. Cast the argument of macro
`FOLD', which uses ctype functions, to unsigned char.
* objalloc.c (free): Add prototype.
From-SVN: r24392
Fri Dec 18 16:11:43 EST 1998 Andrew MacLeod <amacleod@cygnus.com>
* cplus-dem.c (demangle_fund_type): Process CV and u codes before
bumping the pointer we read from. Also prepend these codes,
as we do in other places.
From-SVN: r24374
* cplus-dem.c
(main): Remove default to HP style demangling, set to EDG
demangling correctly when -edg specified; set the demangling style
when user specifies 'edg'. Set strip_underscore to
prepends_underscore, if not HPUXHPPA. Set
current_demangling_style to hp_demangling if HPUXHPPA. Set
current demangling style correctly if the switch is hp. Read
label correctly also in the HP style case.
(work_stuff): add temp_start field; add field for volatile member
function.
(arm_pt): handle ARM_DEMANGLING and EDG_DEMANGLING styles; HP
style for this case is the same as ARM.
(demangle_args): handle EDG_DEMANGLING style; support HP style.
(demangle_arm_hp_template): new function. (It was
demangle_arm_pt.); check and set value of temp_start field in
multiple places. Also, when ceching for end of template args,
check to see if at end of static member of template class.
(demangle_class): new local variable : save_class_name_end Don't
include template args in string defining class.
(demangle_class_name): use demangel_arm_hp_template.
(demangle_function_name): handle case where demangling style is
HP_DEMANGLING and currently point at an 'X' in the mangled name.
Handle EDG_DEMANGLING style. Handle constructor and destructor
ops for HP style.
(demangle_prefix): handle EDG_DEMANGLING and ARM_DEMANGLING
styles. global destructor and constructor for HP style are same
as for ARM style. Same for local variables.
(demangle_qualified): handle EDG_DEMANGLING style.
(demangle_signature): add case for volatile member function. For
cases '1' - '9' : initialize the temp_start field to -1 and handle
the EDG_DEMANGLING style. for case 'F' : handle EDG_DEMANGLING
and AUTO_DEMANGLING styles. If expecting a function and managed
to demangle the funct args, then handle the LUCID_DEMANGLING,
ARM_DEMANGLING, and EDG_DEMANGLING styles. Add case for local
class name after "Lnnn_ in HP style case. HP style too needs to
forget types. _nnn is OK for HP style, so don't report failure.
(do_hpacc_template_const_value): new function. Handle template's
value param for HP/aCC.
(do_hpacc_template_literal): new function. Handle a template's
literal parameter for HP aCC.
(recursively_demangle): new function
(snarf_numeric_literal): new function.
(usage): add 'edg' to the list of demangling styles; add hp switch
to message.
Co-Authored-By: Andrew MacLeod <amacleod@cygnus.com>
Co-Authored-By: Edith Epstein <eepstein@cygnus.com>
Co-Authored-By: Elena Zannoni <ezannoni@cygnus.com>
Co-Authored-By: Satish Pai <pai@apollo.hp.com>
Co-Authored-By: Stan Shebs <shebs@cygnus.com>
From-SVN: r24170