summaryrefslogtreecommitdiff
path: root/libiberty
Commit message (Collapse)AuthorAgeFilesLines
* * libiberty/lbasename.c: New file.neil2001-03-103-6/+104
| | | | | | | | * libiberty/Makefile.in: Update for lbasename. * include/libiberty.h: Add lbasename. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40363 138bc75d-0d04-0410-961f-82ee72b054a4
* oops, edited changelogs in wrong treezack2001-03-061-1/+20
| | | | | | | this is the log for the big alloca configuration patch git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40260 138bc75d-0d04-0410-961f-82ee72b054a4
* libiberty:zack2001-03-0610-347/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * aclocal.m4 (libiberty_AC_FUNC_C_ALLOCA): New. * configure.in: Replace all alloca logic with a simple use of the above new macro. * config.table: Kill *-*-beos* entry. * config/mh-beos: Delete. * configure, config.in: Regenerate. * Makefile.in (ALLOCA, HFILES): Kill. (REQUIRED_OFILES): Add alloca.o. (alloca.o): Depend on libiberty.h. (argv.o): Don't depend on alloca-conf.h. * alloca-conf.h: Delete. * alloca.c: Include libiberty.h. Kill all #ifdef emacs blocks. Provide the C alloca unconditionally. Use PTR where appropriate. Make i00afunc static. * argv.c: Don't include alloca-conf.h. include: * libiberty.h: Prototype C_alloca; define alloca to either __builtin_alloca or C_alloca as appropriate. gcc: * aclocal.m4 (AM_GNU_GETTEXT): Don't AC_REQUIRE AC_FUNC_ALLOCA. * configure, config.in: Regenerate. * config.gcc: Remove references to deleted files. * genattr.c, genattrtab.c, genextract.c, genoutput.c, genrecog.c, rtl.c: Do not use alloca anywhere. * Makefile.in, build-make, system.h, config/x-interix, config/x-svr4, config/xm-interix.h, config/xm-openbsd.h, config/alpha/xm-alpha.h, config/alpha/xm-vms.h, config/arc/xm-arc.h, config/arm/xm-arm.h, config/d30v/xm-d30v.h, config/dsp16xx/xm-dsp16xx.h, config/h8300/xm-h8300.h, config/i370/x-oe, config/i370/xm-linux.h, config/i386/x-aix, config/i386/x-beos, config/i386/x-ncr3000, config/i386/x-sco5, config/i386/xm-dgux.h, config/i860/x-sysv4, config/i960/xm-i960.h, config/m32r/xm-m32r.h, config/m68k/x-crds, config/m68k/x-dpx2, config/m68k/x-hp320, config/m68k/x-hp320g, config/m69k/x-mot3300, config/m68k/x-mot3300-gas, config/m68k/xm-amix.h, config/m68k/xm-hp320.h, config/m68k/xm-m68kv.h, config/m68k/xm-mot3300.h, config/m88k/x-dolph, config/m88k/x-sysv4, config/m88k/x-tekXD88, config/m88k/xm-m88k.h, config/mcore/xm-mcore.h, config/mips/x-iris, config/mips/x-iris3, config/mips/x-sni-svr4, config/mips/x-sysv, config/mips/xm-iris6.h, config/mips/xm-mips.h, config/mips/xm-nws3250v4.h, config/pa/x-hpux, config/pa/x-pa-mpeix, config/pa/xm-pa.h, config/pa/xm-pa64hpux.h, config/pa/xm-pahpux.h, config/pa/xm-papro.h, config/romp/xm-romp.h, config/rs6000/x-aix31, config/rs6000/x-aix41, config/rs6000/x-beos, config/rs6000/x-lynx, config/rs6000/x-mach, config/rs6000/x-rs6000, config/rs6000/x-sysv4, config/rs6000/xm-rs6000.h, config/rs6000/xm-sysv4.h, config/sh/xm-sh.h, config/sparc/x-sysv4, config/sparc/xm-linux.h, config/sparc/xm-pbd.h, config/sparc/xm-sparc.h, config/vax/xm-vms.h: Eradicate all references to alloca and related stuff. * config/xm-alloca.h, config/clipper/x-clix, config/i386/xm-sysv4.h, config/i860/x-fx2800, config/i860/x-sysv3, config/m88k/x-sysv3, config/sparc/xm-sol2.h, config/we32k/x-we32k: Delete (contained only alloca related hacks). * config/i386/xm-beos.h, config/rs6000/xm-beos.h: Just define USE_C_ALLOCA. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40259 138bc75d-0d04-0410-961f-82ee72b054a4
* * cplus-dem.c (main): Cast enum style to int.danglin2001-03-052-1/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40242 138bc75d-0d04-0410-961f-82ee72b054a4
* 2001-02-16 Loren J. Rittle <ljrittle@acm.org>bryce2001-02-162-1/+5
| | | | | | | * cplus-dem.c (main): Initialize style. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39782 138bc75d-0d04-0410-961f-82ee72b054a4
* 2001-02-02 Phil Edwards <pme@sources.redhat.com>pme2001-02-022-99/+121
| | | | | | | * COPYING.LIB: Update to LGPL 2.1 from the FSF. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39413 138bc75d-0d04-0410-961f-82ee72b054a4
* Add support for Java demangling under the v3 ABI:bryce2001-02-024-24/+221
| | | | | | | | | | | | | | | | | | | | | | | | * cp-demangle.c (NAMESPACE_SEPARATOR): New define. (struct demangling_def): Add `style' field. (demangling_new): New parameter `style'. Set it in demangling_t. (demangle_prefix): Use NAMESPACE_SEPARATOR. (demangle_type_ptr): Don't emit pointer symbol if doing Java output. (cp_demangle): New parameter `style'. Pass it to demangling_new(). (main): Call cp_demangle with extra parameter. (java_demangle_v3): New function. (java_builtin_type_names): New. Table of primitive type names used for Java demangling. (demangle_builtin_type): Look up in java_builtin_type_names if doing Java output. * cplus-dem.c (cplus_demangle): Use java_demangle_v3 to do Java demangling. (long_options): Remove obsolete `java' option. (main): Remove explicit handling of `java' option. Instead, pass style parameter in cplus_demangle flags as gdb does. * testsuite/demangle.expected: Add some Java test cases. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39399 138bc75d-0d04-0410-961f-82ee72b054a4
* 2001-01-29 Phil Edwards <pme@sources.redhat.com>pme2001-01-291-0/+4
| | | | | | | * COPYING.LIB: Update to LGPL 2.1 from the FSF. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39330 138bc75d-0d04-0410-961f-82ee72b054a4
* * fnmatch.c: Make the note about the origins of this file moredj2000-12-296-10/+20
| | | | | | | | | | | accurate, at least until we can sync with glibc. * getopt.c: Ditto. * getopt1.c: Ditto. * md5.c: Ditto. * obstack.c: Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38550 138bc75d-0d04-0410-961f-82ee72b054a4
* * bsearch.c: New file.dj2000-12-265-105/+189
| | | | | | | | | * configure.in (funcs): Add bsearch. (AC_CHECK_FUNCS): Likewise. * configure, config.in: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38492 138bc75d-0d04-0410-961f-82ee72b054a4
* * safe-ctype.c: #include "ansidecl.h".dj2000-12-133-0/+7
| | | | | | | * strtod.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38224 138bc75d-0d04-0410-961f-82ee72b054a4
* * strtoul.c: Include safe-ctype.h, not ctype.h.dj2000-12-132-1/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38221 138bc75d-0d04-0410-961f-82ee72b054a4
* Add - before rms to be more portable.mrs2000-12-081-7/+7
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38142 138bc75d-0d04-0410-961f-82ee72b054a4
* include:zack2000-12-0811-78/+244
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * safe-ctype.h: New file. libiberty: * safe-ctype.c: New file. * Makefile.in (CFILES): Add safe-ctype.c. (REQUIRED_OFILES): Add safe-ctype.o. * argv.c: Define ISBLANK and use it, not isspace. * basename.c, cplus-dem.c, fnmatch.c, pexecute.c, strtod.c, strtol.c, strtoul.c: Include safe-ctype.h, not ctype.h. Use uppercase ctype macros. Don't test ISUPPER(c)/ISLOWER(c) before calling TOLOWER(c)/TOUPPER(c). gcc: * Makefile.in (HOST_RTL): Add safe-ctype.o. (safe-ctype.o): New rule. * system.h: Include safe-ctype.h, not ctype.h. No need to wrap ctype macros. * cpphash.h: Zap IStable and related macros. Define is_* in terms of safe-ctype.h macros. * cppinit.c: Delete the IStable and all related code. * tradcpp.c: Delete is_idchar, is_idstart, is_hor_space, and is_space arrays. Delete initialize_char_syntax. Change all references to the above arrays to use macros instead. * tradcpp.h: Define is_idchar, is_idstart, is_space, and is_nvspace in terms of safe_ctype.h's macros. * tradcif.y: is_idchar, is_idstart are macros not arrays. * config/i370/i370.c, config/winnt/dirent.c, config/winnt/fixinc-nt.c, config/winnt/ld.c: Use uppercase ctype macros. If we included ctype.h, include safe-ctype.h instead. * fixinc/fixfixes.c: Use uppercase ctype macros. Don't test ISLOWER(c) before calling TOUPPER(c). * fixinc/fixincl.c (extract_quoted_files): Simplify out some gunk. * fixinc/gnu-regex.c: Include safe-ctype.h, not ctype.h. No need to wrap ctype macros. Don't test ISUPPER(x) before calling TOLOWER(x). gcc/ch: * lex.c: Don't bother checking whether ISUPPER(c) before calling TOLOWER(c). Don't bother checking whether isascii(c) before testing ISSPACE(c); ISSPACE(c) includes '\n'. gcc/f: * Make-lang.in: Link f/fini with safe-ctype.o. * bad.c: Don't test ISUPPER(c) || ISLOWER(c) before calling TOUPPER(c). * com.c: Use TOUPPER, not ffesrc_toupper. * fini.c: Don't test ISALPHA(c) before calling TOUPPER(c)/TOLOWER(c). * intrin.c: Don't test IN_CTYPE_DOMAIN(c). * src.c: Delete ffesrc_toupper_ and ffesrc_tolower_ and their initializing code; use TOUPPER and TOLOWER instead of ffesrc_toupper and ffesrc_tolower. * src.h: Don't declare ffesrc_toupper_ or ffesrc_tolower_. Don't define ffesrc_toupper or ffesrc_tolower. gcc/java: * jvgenmain.c: Use ISPRINT not isascii. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38124 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix typo.mrs2000-12-071-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38118 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (distclean): When cleaning, remove testsuite.mrs2000-12-072-0/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38116 138bc75d-0d04-0410-961f-82ee72b054a4
* * cp-demangle.c (cplus_demangle_v3): Check that it's a v3 mangledjason2000-12-052-2/+15
| | | | | | | name before allocating the dyn_string. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38043 138bc75d-0d04-0410-961f-82ee72b054a4
* * cp-demangle.c: s/new_abi/v3/.jason2000-12-043-16/+29
| | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38002 138bc75d-0d04-0410-961f-82ee72b054a4
* * hashtab.c (higher_prime_number): Use a table, rather than ammitchel2000-11-272-22/+61
| | | | | | | seive, to find the next prime. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37775 138bc75d-0d04-0410-961f-82ee72b054a4
* * cplus-dem.c (main): Handle gnat_demangling.hp2000-11-222-0/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37679 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc:zack2000-11-227-319/+401
| | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37650 138bc75d-0d04-0410-961f-82ee72b054a4
* * cplus-dem.c (cplus_demangle): Fix formatting.hp2000-11-212-31/+45
| | | | | | | | | | | | (grow_vect): Ditto. (ada_demangle): Ditto. (internal_cplus_demangle): Ditto. (mop_up): Ditto. * cplus-dem.c (main): Handle java_demangling. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37612 138bc75d-0d04-0410-961f-82ee72b054a4
* * cplus-dem.c (grow_vect): Prototype.ghazi2000-11-192-4/+13
| | | | | | | (ada_demangle): Cast the arg of ctype macros to unsigned char. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37563 138bc75d-0d04-0410-961f-82ee72b054a4
* * cplus-dem.c (ada_demangle): Add back ATTRIBUTE_UNUSED forhp2000-11-162-3/+8
| | | | | | | | parameter `option'. Do s/cplus_dem.c/cplus-dem.c/g on ChangeLog. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37494 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix ChangeLog entry: cplus-dem.c instead of cplus_dem.cgerald2000-11-151-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37489 138bc75d-0d04-0410-961f-82ee72b054a4
* * cplus_dem.c: Eliminate use of DEFUN, it is obsolete and cannotgerald2000-11-152-8/+13
| | | | | | | be used in GCC. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37483 138bc75d-0d04-0410-961f-82ee72b054a4
* Correct style of last entryhp2000-11-151-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37477 138bc75d-0d04-0410-961f-82ee72b054a4
* * cplus_dem.c: Add gnat demangler. Add java to demangle stylehp2000-11-152-0/+153
| | | | | | | list. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37475 138bc75d-0d04-0410-961f-82ee72b054a4
* * hashtab.c (htab_expand): Change to return int. Use calloc orhp2000-11-042-8/+68
| | | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37247 138bc75d-0d04-0410-961f-82ee72b054a4
* (htab_create, htab_expand): Correct formatting of comment beforehp2000-11-032-36/+42
| | | | | | | function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37231 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix incorrect date in ChangeLog entry.samuel2000-10-231-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37017 138bc75d-0d04-0410-961f-82ee72b054a4
* * cp-demangle.c (string_list_def): Add caret_position and comments.samuel2000-10-222-173/+304
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (result_caret_pos): New macro. (result_append_string): Rename to... (result_add_string): ... this, and insert at caret position. Rename throughout. (result_append): Rename to... (result_add): ... this, and insert at caret position. Rename throughout. (result_append_char): Rename to... (result_add_char): ... this, and insert at caret position. Rename throughout. (result_append_space): Remove. (string_list_new): Initialize caret position. (result_add_separated_char): Use caret position. (result_get_caret): New funtion. (result_set_caret): Likewise. (result_shift_caret): Likewise. (result_previous_char_is_space): Likewise. (substitution_start): Use caret position. (substitution_add): Likewise. (demangling_new): Initialize caret position. (demangle_encoding): Use caret position. (demanglin_nested_name): Put CV qualifiers after name. (demangle_type_ptr): Use switch statement. Handle pointers to arrays. Don't use result_append_space. Use caret position. (demangle_type): Emit CV qualifiers after underlying type. Adjust call to demangle_array_type. (demangle_array_type): Add parameter to handle pointers to arrays. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37011 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-decl.c (c_expand_body): Don't generate RTL if flag_syntax_only.mmitchel2000-10-012-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (lang_mark_false_label_stack): Remove. * c-lex.c (init_c_lex): Add file_info_tree as GC root. Allocate <top level> string in GC area. (mark_splay_tree_node): New function. (mark_splay_tree): Likewise. * except.c (mark_eh_status): Only call lang_mark_false_label_stack if it exists. * ggc-callbacks.c (lang_mark_false_label_stack): Remove. * ggc-common.c (lang_mark_false_label_stack): Change type. * ggc.h (ggc_alloc_string): Add comment. (ggc_strdup): New function. * decl.c (lang_mark_false_label_stack): Remove. * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared. * com.c (lang_mark_false_label_stack): Remove. Convert to GC. * Make-lang.in (s-java): Don't depend on ggc-callbacks.o. * Makefile.in (BACKEND): Don't include ggc-callbacks.o. (typeck.o): Depend on ggc.h. * class.c (add_method_1): Use GC functions for allocation. (init_class_processing): Register roots. * decl.c (ggc_p): Set to 1. (pending_local_decls): Make it static. (push_jvm_slot): Use GC functions for allocation. (init_decl_processing): Register roots. (give_name_to_locals): Use GC functions for allocation. (lang_mark_tree): New function. * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC functions for allocation. * jcf-parse.c (jcf_parse_source): Use ggc_strdup. * lex.c (java_lex): Use build_string, rather than replicating it inline. * parse.y (goal): Add more roots. (mark_parser_ctxt): New function. * typeck.c: Include ggc.h. * splay-tree.c (splay_tree_insert): Fix formatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36687 138bc75d-0d04-0410-961f-82ee72b054a4
* * splay-tree.c (splay_tree_predecessor): Fix typo in comment.mmitchel2000-09-172-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36464 138bc75d-0d04-0410-961f-82ee72b054a4
* * splay-tree.c: #include <stdio.h>.dj2000-09-152-0/+6
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36432 138bc75d-0d04-0410-961f-82ee72b054a4
* * testsuite/demangle-expected: Add two tests for anonymoushp2000-09-133-1/+33
| | | | | | | | namespaces. * cplus-dem.c (gnu_special): Handle anonymous namespaces. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36398 138bc75d-0d04-0410-961f-82ee72b054a4
* * splay-tree.h (splay_tree_predecessor): Declare.mmitchel2000-09-102-1/+72
| | | | | | | | * splay-tree.c (splay_tree_predecessor): New function. (splay_tree_successor): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36304 138bc75d-0d04-0410-961f-82ee72b054a4
* * testsuite/demangle-expected: Add four tests for type_infohp2000-09-103-1/+25
| | | | | | | | | | mangling. * cplus-dem.c (gnu_special): Use do_type, not demangle_fund_type, for a non-template non-qualified type_info function or node. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36301 138bc75d-0d04-0410-961f-82ee72b054a4
* * cp-demangle.c: Fix copyright banner.samuel2000-09-082-1/+7
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36271 138bc75d-0d04-0410-961f-82ee72b054a4
* * md5.c: #include "ansidecl.h".dj2000-09-072-0/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36244 138bc75d-0d04-0410-961f-82ee72b054a4
* * cp-demangle.c (status_allocation_failed): Rearrange whitespace.samuel2000-09-072-5/+32
| | | | | | | | (demangle_type): Handle substitution candidates correctly in the face of special substitutions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36228 138bc75d-0d04-0410-961f-82ee72b054a4
* * cp-demangle.c (demangle_encoding): Rename variable.samuel2000-09-052-73/+113
| | | | | | | | | | | | | | | | | | (demangle_name): Rename parameter. Handle return type suppression. (demangle_nested_name): Rename parameter. (demangle_prefix): Likewise. Change return type suppression. (demangle_unqualified_name): Add parameter. Flag constructors and conversion operators. (demangle_special_name): Fix comment. (demangle_type): Rename variable. (demangle_bare_function_type): Check for missing return type and parameter. (demangle_class_enum_type): Rename parameter. (demangle_discriminator): Fix misspelling in comment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36168 138bc75d-0d04-0410-961f-82ee72b054a4
* * configure.in (Cygwin): special case cygwin only when we'redj2000-09-053-8/+23
| | | | | | | building cygwin, not when we're hosting cygwin. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36164 138bc75d-0d04-0410-961f-82ee72b054a4
* * cp-demangle.c (demangle_template_arg): Eat an `E' after ansamuel2000-09-052-0/+6
| | | | | | | <expression>. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36153 138bc75d-0d04-0410-961f-82ee72b054a4
* * cp-demangle.c (demangle_type_ptr): Increment position pastsamuel2000-09-052-0/+11
| | | | | | | pointer and reference characters. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36151 138bc75d-0d04-0410-961f-82ee72b054a4
* * cp-demangle.c (demangle_nv_offset): New function.samuel2000-09-052-51/+169
| | | | | | | | | | (demangle_v_offset): Likewise. (demangle_call_offset): Likewise. (demangle_special_name): Update thunk demangling to comply with ABI changes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36150 138bc75d-0d04-0410-961f-82ee72b054a4
* In include:samuel2000-09-054-144/+277
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dyn-string.h: Adjust formatting. (dyn_string_insert_char): New macro. New declaration. In libiberty: * cp-demangle.c (ANONYMOUS_NAMESPACE_PREFIX): New macro. (substitution_def): Remove template_parm_number. (NOT_TEMPLATE_PARM): Remove. (result_insert_string): New macro. (result_insert): Likewise. (result_insert_char): Likewise. (substitution_add): Remove last parameter. Don't store template parm number. (BFT_NO_RETURN_TYPE): Define as NULL. (demangle_encoding): Adjust call to demangle_bare_function_type. (demangle_name): Adjust substitution. Adjust call to substitution_add. (demangle_prefix): Adjust call to substitution_add. (demangle_identifier): Handle anonymous namespaces. (demangle_operator_name): Change demangling of vendor-extended operator to match ABI changes. (demangle_type_ptr): Change parameters. Make recursive. Handle substitutions here. (demangle_type): Adjust calls to demangle_template_param, substitution_add, and demangle_type_ptr. Fix substitution of templated types. (demangle_function_type): Change parameter to a pointer. (demangle_bare_function_type): Likewise. Adjust insertion point. (demangle_template_param): Remove last parameter. (demangle_expr_primary): Remove unused variable. Adjust call to demangle_template_param. (is_mangled_char): Accept `$' and `.'. * cplus-dem.c (gnu_new_abi_symbol_characters): Add '$' and '.'. * dyn-string.c (dyn_string_insert_char): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36148 138bc75d-0d04-0410-961f-82ee72b054a4
* Add testcases and missing changelogs:hp2000-08-312-0/+76
| | | | | | | | | | | | | | | | | | | | | | | | | 2000-08-31 Hans-Peter Nilsson <hp@axis.com> * testsuite/demangle-expected: Add nine tests for underscore-after-number followed by five tests for name-signature delimiter. 2000-07-24 Hans-Peter Nilsson <hp@axis.com> * cplus-dem.c (work_stuff_copy_to_from): New. (delete_non_B_K_work_stuff): New. (delete_work_stuff): New. (mop_up): Break out work_stuff destruction to delete_work_stuff. (iterate_demangle_function): New. (demangle_prefix): Call iterate_demangle_function instead of demangle_function_name. Leave handling of name-signature __-delimiters to iterate_demangle_function. * cplus-dem.c (demangle_integral_value): Strip an optional following underscore cautiously. Handle negative numbers. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36086 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (md5.o): Depend on config.h.rth2000-08-292-0/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36029 138bc75d-0d04-0410-961f-82ee72b054a4
* 2000-08-28 Daniel Berlin <dberlin@redhat.com>jason2000-08-293-2/+427
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36022 138bc75d-0d04-0410-961f-82ee72b054a4