aboutsummaryrefslogtreecommitdiff
path: root/gcc/protoize.c
AgeCommit message (Collapse)AuthorFilesLines
2000-12-17protoize.c (main): Correctly set locale categories.Philipp Thomas1-0/+7
2000-12-14 Philipp Thomas <pthomas@suse.de> * protoize.c (main): Correctly set locale categories. * gcc.c (main): Likewise. * cppmain.c (general_init): Likewise. * toplev.c (main): Likewise. * gcov.c (main): Likewise. * collect2.c (main): Likewise. From-SVN: r38331
2000-11-19Warning fixes:Kaveh R. Ghazi1-1/+1
* builtins.c (c_getstr): Constify variable. * gmon-sol2.c (_mcleanup): Comment out #endif labels. * conflict.c (const_conflict_graph_arc): New typedef. (arc_hash, arc_eq): Avoid needlessly casting away const-ness. * cppmacro.c (builtin_macro): Likewise. * dwarf2out.c (output_comp_unit): Constify variable. * fix-header.c (v_fatal): Add ATTRIBUTE_PRINTF. * protoize.c (IS_SAME_PATH_CHAR): Use TOUPPER, not toupper. * ssa.c (ssa_rename_from_hash_function): Avoid needlessly casting away const-ness. * tradcpp.c (rescan, do_line, macroexpand, macarg): Use ISALNUM/ISDIGIT/ISPRINT, not isalnum/isdigit/isprint. * varasm.c (const_str_htab_hash, const_str_htab_eq, compare_constant_1, record_constant_1): Constify. From-SVN: r37565
2000-08-22* protoize.c (munge_compile_params): Fix typo and formatting buglets.Jeffrey A Law1-2/+3
From-SVN: r35867
2000-08-21gcc.c (do_spec_1): Implement %j spec flag.Jeff Law1-5/+10
* gcc.c (do_spec_1): Implement %j spec flag. Remove dead comment. * gcc.texi (The Configuration File): Document HOST_BIT_BUCKET. * system.h (HOST_BIT_BUCKET): Default to "/dev/null". * config/i386/xm-dos.h (HOST_BIT_BUCKET): Define as "NUL". * config/i386/xm-os2.h, config/winnt/winnt.h: Likewise. * protoize.c (munge_compile_params): Use HOST_BIT_BUCKET (if writable) instead of hardcoded value. * toplev.c (compile_file): Output to a file even if -fsyntax-only. * gcc.c, config/i386/xm-dos.h, config/i386/xm-os2.h: Kill MKTEMP_EACH_FILE. * gcc.c (cc1_options): Do not process -o or run the assembler if -fsyntax-only. From-SVN: r35849
2000-04-18cccp.c, [...]: Removed.Zack Weinberg1-1/+1
* cccp.c, cexp.y, cexp.c, cccp.1: Removed. * configure.in: Delete --disable-cpplib option and all references to cpp_main. * configure: Regenerate. * Makefile.in: Remove all references to CCCP, CCCP_OBJS, @cpp_main@, cccp.c, cexp.c, cexp.y, cexp.output, cexp.o, cccp.o, cccp, or cppmain. Link cppmain.o straight to cpp$(exeext). Add --no-headers to makeinfo command line when generating INSTALL. Install and uninstall cpp.1 manpage, not cccp.1. * install.texi: Delete all references to cexp.y/cexp.c. Delete ancient instructions for compiling GCC on 3b1. * INSTALL: Regenerate. * cppfiles.c, cpplib.h, jump.c, protoize.c, c-lex.c, ch/decl.c, ch/lex.c, cp/lex.c, f/lex.c, mips/t-ecoff, mips/t-elf, mips/t-r3900: Remove references to cccp.c. * convex.h, fx80.h, m68k.h, pdp11.h, contrib/gcc_update, f/g77install.texi: Remove references to cexp.c/cexp.y. * xm-linux.h, xm-os2.h, romp.h: Remove definition of BSTRING, which is no longer tested anywhere. * po/POTFILES.in: Remove cccp.c and cexp.c. Comment out alpha/vms-tramp.asm. From-SVN: r33238
2000-02-26Fix copyrights.Jeff Law1-1/+2
From-SVN: r32179
2000-02-25protoize.c: (AUX_INFO_SUFFIX): New macro.Mumit Khan1-5/+24
* protoize.c: (AUX_INFO_SUFFIX): New macro. (aux_info_suffix): Use. (SAVE_SUFFIX): New macro. (save_suffix): Use. (munge_compile_parms): Fix typo in NUL. DJGPP supports /dev/null. (gen_aux_info_file): Use aux_info_suffix instead of ".X". (edit_file): Handle 8.3 restriction for DOS/DJGPP filenames. * invoke.texi (Running Protoize): Update documentation. From-SVN: r32170
2000-02-15Makefile.in (TREE_H, [...]): Depend on version.h.Kaveh R. Ghazi1-2/+1
* Makefile.in (TREE_H, collect2.o, gcc.h, mips-tfile.o, cccp.o, cpphash.o, cppinit.o, protoize.o, unprotoize.o): Depend on version.h. * cccp.c: Include version.h and/or don't declare `version_string'. * collect2.c: Likewise. * alpha.c: Likewise. * arm/aof.h: Likewise. * arm/coff.h: Likewise. * arm/elf.h: Likewise. * arm/pe.h: Likewise. * arm/tcoff.h: Likewise. * arm/telf.h: Likewise. * arm/tpe.h: Likewise. * arm/vxarm.h: Likewise. * convex/convex.c: Likewise. * i386/dgux.c: Likewise. * i386/sun386.h: Likewise. * m88k/m88k.c: Likewise. * mcore/mcore-pe.h: Likewise. * mips/mips.h: Likewise. * romp/romp.h: Likewise. * sh/sh.c: Likewise. * cpphash.c: Likewise. * cppinit.c: Likewise. * dwarf2out.c: Likewise. * dwarfout.c: Likewise. * gcc.c: Likewise. * gcc.h: Likewise. * mips-tfile.c: Likewise. * protoize.c: Likewise. * toplev.c: Likewise. * tree.h: Likewise. * version.c (version_string): Constify a char*. * version.h: New file. ch: * grant.c: Don't declare `version_string'. f: * g77spec.c: Don't declare `version_string'. java: * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with version.o. (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h. * gjavah.c: Include version.h. * jcf-dump.c: Likewise. * jv-scan.c: Likewise. From-SVN: r31984
2000-01-17Update copyrightsKaveh Ghazi1-1/+1
From-SVN: r31465
2000-01-17machmode.h: PROTO -> PARAMS.Kaveh R. Ghazi1-1/+1
* machmode.h: PROTO -> PARAMS. * mbchar.h: Likewise. * mips-tdump.c: Likewise. * mips-tfile.c: Likewise. * optabs.c: Likewise. * output.h: Likewise. * prefix.c: Likewise. * profile.c: Likewise. * protoize.c: Likewise. * real.h: Likewise. * recog.c: Likewise. * recog.h: Likewise. * regclass.c: Likewise. * regmove.c: Likewise. * regs.h: Likewise. From-SVN: r31459
2000-01-07protoize.c: Conditionally include unistd.h.Mumit Khan1-74/+201
2000-01-06 Mumit Khan <khan@xraylith.wisc.edu> * protoize.c: Conditionally include unistd.h. (IS_SAME_PATH_CHAR): New macro. (IS_SAME_PATH): New macro. (CPLUS_FILE_SUFFIX): New macro. (cplus_suffix): New static variable. (is_abspath): New static function. (in_system_include_dir): Handle DOS style pathnames. (file_could_be_converted): Likewise. (file_normally_convertible): Likewise. (directory_specified_p): Likewise. (file_excluded_p): Likewise. (abspath): Likewise. (shortpath): Likewise. (referenced_file_is_newer): Likewise. (save_def_or_dec): Likewise. (do_processing): Likewise. (main): Likewise. (edit_file): Likewise. Use rename instead of link. (rename_c_file): Likewise. Don't rename syscalls file. (munge_compile_params): Define null device for DOS based systems. (process_aux_info_file): Use binary mode if appliable. (edit_file): Likewise. * invoke.texi (Running Protoize): Document C++ suffixes used. From-SVN: r31265
1999-10-16protoize.c (safe_read, safe_write): Avoid the gcc extension of using ↵Kaveh R. Ghazi1-2/+4
arithmetic on void pointers. * protoize.c (safe_read, safe_write): Avoid the gcc extension of using arithmetic on void pointers. From-SVN: r30043
1999-09-10protoize.c: Remove various __STDC__ and POSIX hacks.Kaveh R. Ghazi1-173/+107
* protoize.c: Remove various __STDC__ and POSIX hacks. Don't include directory headers. Don't define strrchr. Don't provide my_* replacement functions. Prefer PTR over `pointer_type'. Don't prototype system functions. Don't redefine getopt. (shortpath, fancy_abort, notice, savestring, dupnstr, substr, safe_read, safe_write, save_pointers, restore_pointers, is_id_char, in_system_include_dir, directory_specified_p, file_excluded_p, unexpand_if_needed, abspath, check_aux_info, find_corresponding_lparen, referenced_file_is_newer, save_def_or_dec, munge_compile_params, gen_aux_info_file, process_aux_info_file, identify_lineno, check_source, seek_to_line, forward_to_next_token_char, output_bytes, output_string, output_up_to, other_variable_style_function, find_rightmost_formals_list, do_cleaning, careful_find_l_paren, do_processing, is_syscalls_file, rename_c_file, find_extern_def, find_static_definition, connect_defs_and_decs, add_local_decl, add_global_decls, needs_to_be_converted, visit_each_hash_node, add_symbol, lookup, free_def_dec, find_file, reverse_def_dec_list, edit_fn_declaration, edit_formals_lists, edit_fn_definition, scan_for_missed_items, edit_file, string_list_cons): Add static prototypes. (standard_exec_prefix, target_machine, target_version, default_syscalls_dir, string_list, string_list_cons, find_file, do_cleaning): Constify a char*. (safe_read, safe_write): Use PTR, not a char*. (is_id_char): Take an int, not a char. (main): Add prototype. Call return, not exit. From-SVN: r29274
1999-09-07c-aux-info.c (concat): Don't define.Kaveh R. Ghazi1-94/+9
* c-aux-info.c (concat): Don't define. * cccp.c (my_strerror): Likewise. All callers changed to use xstrerror instead. (do_include): Call xstrdup, not xmalloc/strcpy. (grow_outbuf): Don't check if xrealloc returns NULL, it can't. (xmalloc, xrealloc, xcalloc, xstrdup): Don't define. * collect2.c (my_strsignal): Likewise. All callers changed to use strsignal instead. (locatelib): Call xstrdup, not xmalloc/strcpy. * 1750a.h (ASM_OUTPUT_INTERNAL_LABEL): Call xmalloc, not malloc. * dsp16xx.c (override_options): Call xstrdup, not xmalloc/strcpy. * i370.h (ASM_DECLARE_FUNCTION_NAME): Call xmalloc, not malloc. * mips.c (build_mips16_call_stub): Call xstrdup, not xmalloc/strcpy. * cppinit.c (cpp_options_init): Call xcalloc, not xmalloc/bzero. * dwarfout.c (dwarfout_init): Call concat, not xmalloc/strcpy/... * except.c (new_eh_region_entry): Call xmalloc/xrealloc, not malloc/realloc. (find_all_handler_type_matches): Likewise. Don't check return value. (get_new_handler, init_insn_eh_region, process_nestinfo): Call xmalloc, not malloc. (init_eh_nesting_info): Likewise. Call xcalloc, not xmalloc/bzero. * gcc.c (xstrerror, xmalloc, xrealloc): Don't define. (init_spec): Call xcalloc, not xmalloc/bzero. (set_spec): Call xstrdup, not save_string. (record_temp_file): Call xstrdup, not xmalloc/strcpy. (find_a_file): Call xstrdup, not xmalloc/strcpy. (process_command): Call xstrdup, not save_string. (main): Call xcalloc, not xmalloc/bzero. * gcov.c (xmalloc): Don't define. (create_program_flow_graph): Call xcalloc, not xmalloc/bzero. (scan_for_source_files): Call xstrdup, not xmalloc/strcpy. (output_data): Call xcalloc, not xmalloc/bzero. * haifa-sched.c (schedule_insns): Call xcalloc, not xmalloc/bzero. * mips-tdump.c (xmalloc): Don't define. (print_symbol): Call xmalloc, not malloc. (read_tfile): Call xcalloc, not calloc. * mips-tfile.c (xfree, my_strsignal, xmalloc, xcalloc, xrealloc): Don't define. All callers of xfree/my_strsignal changed to use free/strsignal instead. (allocate_cluster): Call xcalloc, not calloc. * objc/objc-act.c (lang_init): Call concat, not xmalloc/strcpy/... Fix memory leak, free allocated memory. * prefix.c (translate_name): Call xstrdup, not save_string. (update_path): Likewise. * profile.c (branch_prob): Call xstrdup, not xmalloc/strcpy. * protoize.c (xstrerror, xmalloc, xrealloc, xfree, savestring2): Don't define. Callers of xfree/savestring2 changed to use free/concat instead. * reload1.c (reload): Call xcalloc, not xmalloc/bzero. (init_elim_table): Likewise. * resource.c (init_resource_info): Likewise. * stupid.c (stupid_life_analysis): Likewise. * toplev.c (xmalloc, xcalloc, xrealloc, xstrdup): Don't define. (open_dump_file): Call concat, not xmalloc/strcpy/... (clean_dump_file): Likewise. (compile_file): Call xstrdup, not xmalloc/strcpy. From-SVN: r29148
1999-09-02protoize.c (gen_aux_info_file): Let pexecute call choose_temp_base if needed.Marc Espie1-2/+1
* protoize.c (gen_aux_info_file): Let pexecute call choose_temp_base if needed. From-SVN: r29052
1999-08-31Makefile.in (OBJS, PROTO_OBJS): Remove getpwd.o.Kaveh R. Ghazi1-2/+0
* Makefile.in (OBJS, PROTO_OBJS): Remove getpwd.o. (getpwd.o): Remove target. * getpwd.c: Delete file. Its in libiberty now. * dbxout.c (getpwd): Don't prototype. * dwarf2out.c (getpwd): Likewise * dwarfout.c (getpwd): Likewise * final.c (getpwd): Likewise. * protoize.c (getpwd): Likewise. From-SVN: r28999
1999-08-25Makefile.in (PREPROCESSOR_DEFINES): New macro.Fred Fish1-15/+38
* Makefile.in (PREPROCESSOR_DEFINES): New macro. (protoize.o): Use PREPROCESSOR_DEFINES and DRIVER_DEFINES. (unprotoize.o): Ditto. (test-protoize-simple): Don't define STD_PROTO_DIR. * protoize.c: Use PARAMS rather than PROTO. Minor whitespace changes to make 'test-protoize-simple' pass. (STD_PROTO_DIR): Remove define. (STANDARD_EXEC_PREFIX): Supply default define. (standard_exec_prefix): New variable, init to STANDARD_EXEC_PREFIX. (target_machine): New variable, init to DEFAULT_TARGET_MACHINE. (target_version): New variable, init to DEFAULT_TARGET_VERSION. (GET_ENV_PATH_LIST): New macro. (default_syscalls_dir): No longer initialized to STD_PROTO_DIR. (do_processing): Initialize default_syscalls_dir using new macros. Use it to initialize syscalls_absolute_filename. Co-Authored-By: Geoff Keating <geoffk@cygnus.com> From-SVN: r28832
1999-04-16system.h: Always prototype abort.Zack Weinberg1-0/+1
1999-04-16 22:44 -0400 Zack Weinberg <zack@rabi.columbia.edu> * system.h: Always prototype abort. Prototype fatal. Define abort to call fatal, not fprintf/exit. Define a stub macro for trim_filename. * toplev.c: Define DIR_SEPARATOR. (trim_filename): New function. * toplev.h: Prototype trim_filename, and #undef system.h's stub. * gcc.c, genattr.c, genattrtab.c, gencodes.c, genconfig.c, genemit.c, genextract.c, genflags.c, genopinit.c, genoutput.c, genpeep.c, genrecog.c: Make fatal non-static. * gcov.c, gengenrtl.c, protoize.c: #undef abort after including system.h. * config/i386/dgux.h, config/m68k/xm-amix.h: Remove stale code relating to abort. From-SVN: r26511
1999-03-23protoize.c (abspath): Preserve multiple leading slashes for _WIN32 and Interix.Mumit Khan1-1/+1
* protoize.c (abspath): Preserve multiple leading slashes for _WIN32 and Interix. Co-Authored-By: Donn Terry <donn@interix.com> From-SVN: r25933
1999-03-18Warning fixes:Kaveh R. Ghazi1-2/+2
* cccp.c (default_include): Initialize structure memebers. (pass_thru_directive): Change the type of 'keyword_length' to int. (main): Cast `bindtextdomain' and `textdomain' to (void). * collect2.c (main): Likewise. * cppmain.c (main): Likewise. * gcc.c (main): Likewise. * gcov.c (main): Likewise. * protoize.c (main): Likewise. * toplev.c (main): Likewise. From-SVN: r25839
1999-03-10cppfiles.c (INO_T_EQ): Handle UWIN.Mumit Khan1-1/+3
* cppfiles.c (INO_T_EQ): Handle UWIN. * c-common.c (decl_attributes): Flag unrecognized attribute functions as warnings instead of as errors. Support for i386-pc-uwin. * i386/uwin.h: New file. * i386/xm-uwin.h: New file. * i386/t-uwin: New file. * i386/uwin.asm: New file. * configure.in (i[3456]86-*-uwin*): Define. Add Workaround for vfork bug when hosted on uwin. * configure: Regenerate. * cccp.c (INO_T_EQ): Undefine. UWIN has inodes. (absolute_filename): UWIN uses POSIX pathnames only. * libgcc2.c (getpagesize): Do not define for UWIN. (mprotect): Likewise. * protoize.c (dirent.h): Conditionally include. (fputc): Prototype only if it's not a macro. From-SVN: r25696
1999-02-09system.h (_, N_): Remove dummy i18n macros.Nathan Sidwell1-2/+2
* system.h (_, N_): Remove dummy i18n macros. * protoize.c: Move inclusion of intl.h to after system.h. * cexp.y: Include intl.h. * cexp.c: Rebuilt. From-SVN: r25117
1999-01-30cccp.c (main): Only call setlocale (LC_MESSAGES, ...) if LC_MESSAGES is defined.Jeffrey A Law1-0/+2
* cccp.c (main): Only call setlocale (LC_MESSAGES, ...) if LC_MESSAGES is defined. * collect2.c (main): Likewise. * cppmain.c (main): Likewise. * gcc.c (main): Likewise. * gcov.c (main): Likewise. * protoize.c (main): Likewise. * toplev.c (main): Likewise. From-SVN: r24923
1999-01-26Merge in gcc2 snapshot 19980929. See gcc/ChangeLog and gcc/FSFChangeLog forJeffrey A Law1-176/+200
details. From-SVN: r24879
1999-01-21Update copyright.Richard Henderson1-1/+1
From-SVN: r24816
1999-01-21cccp.c (xrealloc): Call malloc given a NULL old pointer.Richard Henderson1-1/+5
* cccp.c (xrealloc): Call malloc given a NULL old pointer. * collect2.c, cppalloc.c, gcc.c, genattr.c, genattrtab.c: Likewise. * gencodes.c, genconfig.c, genemit.c, genextract.c: Likewise. * genflags.c, genopinit.c, genoutput.c, genpeep.c: Likewise. * genrecog.c, mips-tfile.c, protoize.c: Likewise. From-SVN: r24806
1999-01-09gcc.c (xstrerror): Renamed from my_strerror.Kaveh R. Ghazi1-28/+26
* gcc.c (xstrerror): Renamed from my_strerror. All callers changed. Remove prototype since we get that from libiberty.h. * protoize.c (xstrerror): Likewise. From-SVN: r24605
1998-12-12* protoize.c (fputs): Wrap extern declaration in #ifndef fputs.Manfred Hollstein1-0/+2
From-SVN: r24289
1998-12-11cccp.c: Do not #include <sys/stat.h> here; this is already done by "system.h".Manfred Hollstein1-1/+0
� * cccp.c: Do not #include <sys/stat.h> here; this is already done by "system.h". * collect2.c: Likewise. * cpplib.h: Likewise. * gcc.c: Likewise. * gcov.c: Likewise. * getpwd.c: Likewise. * protoize.c: Likewise. * toplev.c: Likewise. From-SVN: r24263
1998-11-27system.h: Include libiberty.h.Kaveh R. Ghazi1-29/+7
* system.h: Include libiberty.h. * c-aux-info.c: Remove prototypes for concat/concat3. Change function `concat' from fixed parameters to variable parameters, as is done in libiberty. All callers of concat/concat3 changed to use the new `concat' with variable args. * cccp.c: Remove things made redundant by libiberty.h and/or conform to libiberty standards. * cexp.y: Likewise. * collect2.c: Likewise. * config/1750a/1750a.h: Likewise. * cppalloc.c: Likewise. * cppexp.c: Likewise. * cppfiles.c: Likewise. * cpphash.c: Likewise. * cpplib.c: Likewise. * dyn-string.c: Likewise. * fix-header.c: Likewise. * gcc.c: Likewise. * gcov.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * gencheck.c: Likewise. * gencodes.c: Likewise. * genconfig.c: Likewise. * genemit.c: Likewise. * genextract.c: Likewise. * genflags.c: Likewise. * gengenrtl.c: Likewise. * genopinit.c: Likewise. * genoutput.c: Likewise. * genpeep.c: Likewise. * genrecog.c: Likewise. * getpwd.c: Likewise. * halfpic.c: Likewise. * hash.c: Likewise. * mips-tdump.c: Likewise. Wrap malloc/realloc/calloc prototypes in NEED_DECLARATION_* macros. * mips-tfile.c: Remove things made redundant by libiberty.h and/or conform to libiberty standards. (fatal): Fix const-ification of variable `format' in !ANSI_PROTOTYPES case. * prefix.c: Remove things made redundant by libiberty.h and/or conform to libiberty standards. * print-rtl.c: Rename variable `spaces' to `xspaces' to avoid conflicting with function `spaces' from libiberty. * profile.c: Remove things made redundant by libiberty.h and/or conform to libiberty standards. * protoize.c: Likewise. * rtl.h: Likewise. * scan.h: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tree.h: Likewise. From-SVN: r23931
1998-11-19configure.in: Don't do AC_CHECK_HEADERS(wait.h sys/wait.h).Kaveh R. Ghazi1-14/+0
* configure.in: Don't do AC_CHECK_HEADERS(wait.h sys/wait.h). Instead call AC_HEADER_SYS_WAIT. * collect2.c: Don't provide defaults for sys/wait.h macros. * gcc.c: Likewise. * protoize.c: Likewise. Also, don't include sys/wait.h. * system.h: Include sys/wait.h and provide macro defaults. From-SVN: r23712
1998-11-12Jumbo patch from Geoff Noer to rename CYGWIN32 to CYGWIN.Geoffrey Noer1-1/+1
From-SVN: r23622
1998-11-07configure.in (host_xm_file, [...]): Arrange to include gansidecl.h in ↵Kaveh R. Ghazi1-1/+0
{ht}config.h & tm.h just before the config/... * configure.in (host_xm_file, build_xm_file, xm_file, tm_file): Arrange to include gansidecl.h in {ht}config.h & tm.h just before the config/ directory headers. (tm_file_list, host_xm_file_list, build_xm_file_list): Handle gansidecl.h in the list of dependencies. * Makefile.in (RTL_BASE_H): Don't depend on gansidecl.h. (TREE_H, DEMANGLE_H, RECOG_H, REGS_H, libgcc2.a, stmp-multilib, mbchar.o, collect2.o, pexecute.o, vfprintf.o, splay-tree.o, gcc.o, gencheck.o, choose-temp.o, mkstemp.o, mkstemp.o, prefix.o, dyn-string.o, cexp.o, cccp.o, cppmain.o, cpplib.o, cpperror.o, cppexp.o, cppfiles.o, cpphash.o, cppalloc.o, scan-decls.o): Likewise. * cccp.c: Don't include gansidecl.h. * cexp.y: Likewise. * collect2.c: Likewise. * config/c4x/c4x.c: Likewise. * config/v850/v850.h: Likewise. * cppalloc.c: Likewise. * cpperror.c: Likewise. * cppexp.c: Likewise. * cppfiles.c: Likewise. * cpphash.c: Likewise. * cpplib.c: Likewise. * cppmain.c: Likewise. * cppulp.c: Likewise. * demangle.h: Likewise. * doprint.c: Likewise. * dyn-string.c: Likewise. * eh-common.h: Likewise. * fix-header.c: Likewise. * frame.c: Likewise. * gcc.c: Likewise. * gcov.c: Likewise. * gen-protos.c: Likewise. * gencheck.c: Likewise. * halfpic.h: Likewise. * hash.c: Likewise. * machmode.h: Likewise. * mbchar.c: Likewise. * prefix.c: Likewise. * protoize.c: Likewise. * recog.h: Likewise. * rtl.h: Likewise. * scan-decls.c: Likewise. * tree.h: Likewise. * varray.h: Likewise. From-SVN: r23558
1998-11-02configure.in: Call AC_FUNC_VFORK.Kaveh R. Ghazi1-6/+0
* configure.in: Call AC_FUNC_VFORK. * collect2.c: Define VFORK_STRING as a printable string for error messages (either "vfork" or "fork".) If HAVE_VFORK_H is defined, include vfork.h. If VMS is defined, define vfork() appropriately. Remove vfork check on USG, we're using autoconf. (collect_execute): Pass VFORK_STRING to fatal_perror instead of checking locally what string to pass. (scan_prog_file): Likewise. (scan_libraries): Likewise. * gcc.c: Remove vfork check on USG, we're using autoconf. Besides, no calls to vfork/fork occur in this file. * protoize.c: Likewise. From-SVN: r23498
1998-10-17Warning fixes:Kaveh R. Ghazi1-2/+2
* Makefile.in (flow.o): Depend on recog.h. * cpplib.h (directive_table): Add missing initializiers. (finclude): Change type of variable `bsize' to size_t. * cse.c (rtx_cost): Mark parameter `outer_code' with ATTRIBUTE_UNUSED. * dwarfout.h (dwarfout_label): Wrap prototype in macro RTX_CODE. * fix-header.c (lookup_std_proto): Cast the result of `strlen' to `int' when comparing against one. (cpp_file_line_for_message): Mark parameter `pfile' with ATTRIBUTE_UNUSED. (cpp_fatal): Mark parameter `pfile' with ATTRIBUTE_UNUSED. * flow.c: Include recog.h. (sbitmap_copy): Cast arguments 1 & 2 of `bcopy' to (PTR). * function.c (thread_prologue_and_epilogue_insns): Mark parameter `f' with ATTRIBUTE_UNUSED. (reposition_prologue_and_epilogue_notes): Likewise. * genopinit.c (gen_insn): Cast argument of ctype functions to `unsigned char'. * haifa-sched.c: Include recog.h. (blockage_range): Cast result of UNIT_BLOCKED macro to (int) when comparing against one. * libgcc2.a (__throw): Revert ATTRIBUTE_UNUSED change for now. * mips-tfile.c (parse_end): Cast the argument of ctype function to `unsigned char'. (parse_ent): Likewise. (parse_input): Likewise. * optabs.c (init_libfuncs): Likewise. * protoize.c (find_rightmost_formals_list): Likewise. * recog.h (const_double_operand): Fix typo in prototype. * tlink.c (scan_linker_output): Cast the argument of ctype function to `unsigned char'. * toplev.c (check_lang_option): Cast the result of `strlen' to `int' when comparing against one. From-SVN: r23155
1998-10-14Add ATTRIBUTE_NORETURN in a bunch of places:Kaveh R. Ghazi1-0/+4
* cppalloc.c (memory_full): Mark function prototype with ATTRIBUTE_NORETURN. * demangle.h (collect_exit): Likewise. * fix-header.c (v_fatal, fatal): Likewise. * gcc.c (pfatal_with_name, pfatal_pexecute, fatal, fancy_abort): Likewise. * gcov.c (print_usage): Likewise. * genattr.c (fatal, fancy_abort): Likewise. * genattrtab.c (fatal, fancy_abort): Likewise. * gencodes.c (fatal, fancy_abort): Likewise. * genconfig.c (fatal, fancy_abort): Likewise. * genemit.c (fatal, fancy_abort): Likewise. * genextract.c (fatal, fancy_abort): Likewise. * genflags.c (fatal, fancy_abort): Likewise. * genopinit.c (fatal, fancy_abort): Likewise. * genoutput.c (fatal, fancy_abort): Likewise. * genpeep.c (fatal, fancy_abort): Likewise. * genrecog.c (fatal, fancy_abort): Likewise. * libgcc2.c (__eprintf, __default_terminate, __sjthrow, __sjpopnthrow, __throw): Likewise. * objc/objc-act.c (objc_fatal): Likewise. * protoize.c (usage, aux_info_corrupted, declare_source_confusing): Likewise. * rtl.c (dump_and_abort): Likewise. * rtl.h (sets_cc0_p): Likewise. * toplev.c (float_signal, pipe_closed): Likewise. From-SVN: r23084
1998-10-14Warning fixes:Kaveh R. Ghazi1-27/+36
* Makefile.in (sched.o): Depend on recog.h. * alias.c (REG_BASE_VALUE): Cast the result of REGNO() macro to (unsigned) when comparing against one. (find_base_value): Likewise. (record_base_value): Cast variable `regno' to (unsigned) when comparing against one. Cast the result of REGNO() macro to (unsigned) when comparing against one. (memrefs_conflict_p): Change type of variables `r_x' and `r_y' to unsigned. (init_alias_analysis): Add unsigned variable `ui'. Use it as loop variable where an unsigned index is needed. * caller-save.c (init_caller_save): Cast `-1' to (enum insn_code) before comparing against one. * collect2.c: Add prototypes for functions `error', `fatal' and `fatal_perror'. Make these functions take variable arguments instead of faking it with a fixed number of args. (write_c_file_stat): Cast the argument of ctype macro to (unsigned char). * combine.c (can_combine_p): Mark parameter `pred' with ATTRIBUTE_UNUSED. (find_split_point): Cast variable `src' to (unsigned HOST_WIDE_INT) when comparing against one. HOST_WIDE_INT) when comparing against one. (simplify_rtx): Cast 1 to (unsigned HOST_WIDE_INT) in shift. (simplify_logical): Likewise. (force_to_mode): Cast result of INTVAL() macro to (unsigned HOST_WIDE_INT) when comparing against one. Cast 1 to (unsigned HOST_WIDE_INT) in shift. (simplify_and_const_int): Cast result of INTVAL() macro to `unsigned HOST_WIDE_INT' when comparing against one. (merge_outer_ops): Cast variable const0 to `unsigned HOST_WIDE_INT' when comparing against the result of GET_MODE_MASK() macro. (simplify_comparison): Likewise for variable `c0'. Cast variable `const_op' to `unsigned HOST_WIDE_INT' when comparing against one. Cast `1' to `unsigned HOST_WIDE_INT' in shift. Cast the result of `GET_MODE_MASK()/2' to `HOST_WIDE_INT' when comparing against one. Cast `1' to `unsigned HOST_WIDE_INT' in shift. Cast result of INTVAL() macro to `unsigned HOST_WIDE_INT' when comparing against one. (distribute_notes): Wrap variable `cc0_setter' in macro `HAVE_cc0'. config/mips/mips.c (gen_int_relational): Cast result of INTVAL() macro to `unsigned HOST_WIDE_INT' when comparing against one. (output_block_move): Cast `sizeof' expression to (int) when comparing against one. (function_arg): Cast BITS_PER_WORD to `unsigned' when comparing against one. (save_restore_insns): Cast `base_offset' to `long' to match format specifier in fprintf. * config/mips/mips.h (Pmode): Cast the result of `Pmode' macro to `enum machine_mode'. * flow.c (life_analysis_1): Remove unused variable `insn'. * gcc.c (translate_options): Move variables `j' and `k' into the scope in which they are used. Change their types to `size_t'. (set_spec): Cast the argument of ctype macro to `unsigned char'. (read_specs): Likewise. (process_command): Cast `sizeof' to (int) when comparing against one. (do_spec_1): Cast the argument of ctype macro to `unsigned char'. (handle_braces): Cast both sides of `==' expression to `long' to ensure sign matching. (main): Cast variable `i' to `int' when comparing against one. * gcov-io.h (__fetch_long): Change type of parameter `bytes' from int to size_t. Cast variable `i' to size_t when comparing against one. * genattrtab.c (convert_set_attr_alternative): Remove unused parameter `insn_code'. All callers changed. (convert_set_attr): Likewise. * genrecog.c (add_to_sequence): Cast result of XVECLEN() macro to size_t when comparing against one. Likewise for variable `len'. * global.c (global_alloc): Cast variable `max_regno' to size_t when comparing against one. Likewise for variable `max_allocno'. * jump.c (sets_cc0_p): Mark parameter `x' with ATTRIBUTE_UNUSED. * local-alloc.c (validate_equiv_mem_from_store): Mark parameter `set' with ATTRIBUTE_UNUSED. (find_free_reg): Cast `sizeof' expression to (int) when comparing against one. * loop.c (count_loop_regs_set): Remove unused variable `dest'. (strength_reduce): Mark parameter `bct_p' with ATTRIBUTE_UNUSED. (get_condition): Cast variable `const_val' to `unsigned HOST_WIDE_INT' when comparing against one. Cast unsigned expression to HOST_WIDE_INT when comparing against one. (insert_loop_mem): Mark parameter `data' with ATTRIBUTE_UNUSED. (load_mems_and_recount_loop_regs_set): Cast variable `nregs' to `unsigned' when comparing against one. * protoize.c (is_id_char): Change type of parameter `ch' to unsigned char. (munge_compile_params): Cast argument of ctype macro to (const unsigned char). (process_aux_info_file): Cast variable `aux_info_size' to int when comparing against one. (forward_to_next_token_char): Cast argument of ctype macro to `const unsigned char'. (edit_formals_lists): Likewise. (find_rightmost_formals_list): Likewise. (add_local_decl): Likewise. (add_global_decls): Likewise. (edit_fn_definition): Likewise. (do_cleaning): Likewise. (scan_for_missed_items): Likewise. (edit_file): Cast variable `orig_size' to (int) when comparing against one. (main): Cast argument of ctype macro to `const unsigned char'. * recog.c (const_int_operand): Mark parameter `mode' with ATTRIBUTE_UNUSED. * regclass.c (record_reg_classes): Change type of variable `c' to `unsigned char'. Cast `char' array index to `unsigned char'. * reload.c (push_secondary_reload): Cast argument to REG_CLASS_FROM_LETTER() macro to `unsigned char'. * reload1.c (calculate_needs): Cast `char' array index to `unsigned char'. (set_label_offsets): Change type of variable `i' to unsigned int. Cast result of XVECLEN() macro to unsigned when comparing against one. (mark_not_eliminable): Change type of variable `i' to unsigned. (order_regs_for_reload): Likewise. Cast `max_regno' to unsigned when comparing against one. (reload_as_needed): Cast macro NUM_ELIMINABLE_REGS to (int) when comparing against one. (choose_reload_regs): Hide unused label `fail'. (reload_cse_simplify_operands): Cast `char' array index to `unsigned char'. (reload_combine_note_store): Mark parameter `set' with ATTRIBUTE_UNUSED. Cast UNITS_PER_WORD to unsigned when comparing against one. (reload_cse_move2add): Remove unused variable `src2'. * sched.c: Include recog.h. (sched_note_set): Remove unused parameter `b'. All callers changed. (split_hard_reg_notes): Likewise for parameter `orig_insn'. (blockage_range): Cast result of UNIT_BLOCKED() macro to (int) when comparing against one. * stupid.c (stupid_find_reg): Mark parameter `changes_size' with ATTRIBUTE_UNUSED. Cast `sizeof' expression to (int) when comparing against one. * unroll.c (precondition_loop_p): Remove unused parameter `loop_end'. All callers changed. From-SVN: r23079
1998-08-26system.h: Include stdarg.h/varargs.h...Kaveh R. Ghazi1-5/+0
* system.h: Include stdarg.h/varargs.h, make sure they are ordered correctly with regards to stdio.h. * calls.c: Remove stdarg.h/varargs.h. * cccp.c: Likewise. * cexp.y: Likewise. * combine.c: Likewise. * cpperror.c: Likewise. * cpplib.c: Likewise. * cpplib.h: Likewise. * doprint.c: Likewise. * emit-rtl.c: Likewise. * final.c: Likewise. * fix-header.c: Likewise. * gcc.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * gencodes.c: Likewise. * genconfig.c: Likewise. * genemit.c: Likewise. * genextract.c: Likewise. * genflags.c: Likewise. * genopinit.c: Likewise. * genoutput.c: Likewise. * genpeep.c: Likewise. * genrecog.c: Likewise. * mips-tfile.c: Likewise. * prefix.c: Likewise. * protoize.c: Likewise. * regmove.c: Likewise. * toplev.c: Likewise. * tree.c: Likewise. * cp/errfn.c: Remove stdarg.h/varargs.h. * cp/tree.c: Likewise. From-SVN: r21997
1998-06-29* Merge from gcc2 June 9, 1998 snapshot. See ChangeLog.13 forJeff Law1-2/+2
details. From-SVN: r20808
1998-06-28Consolidate strerror handling, as well as getcwd/getwd.Kaveh R. Ghazi1-7/+1
* configure.in (GCC_NEED_DECLARATIONS): Add strerror, getcwd and getwd. * acconfig.m4: Add stubs for NEED_DECLARATION_STRERROR, NEED_DECLARATION_GETCWD and NEED_DECLARATION_GETWD. * cccp.c: Remove strerror()/sys_nerr/sys_errlist decls. (my_strerror): Add prototype and make it static. * collect2.c: Likewise. * cpplib.c: Likewise. * gcc.c: Likewise, but keep `my_strerror' extern. * protoize.c: Likewise. * pexecute.c (my_strerror): Add argument to prototype. * system.h: Add prototypes for getcwd, getwd and strerror. Add extern decls for sys_nerr and sys_errlist. Make abort decl explicitly extern. * getpwd.c: Remove decls for getwd and getcwd. From-SVN: r20779
1998-05-12Consolidate support for "String-ification" into system.h:Kaveh R. Ghazi1-8/+0
* system.h: Define the STRINGIFY macro here. * protoize.c: Not here. * gengenrtl.c (DEF_RTL_EXPR): Use the STRINGIFY macro. From-SVN: r19696
1998-05-06c-common.c: Convert to using ctype macros defined in system.h.Kaveh R. Ghazi1-27/+27
* c-common.c: Convert to using ctype macros defined in system.h. * c-lex.c: Likewise. * cccp.c: Likewise. * collect2.c: Likewise. * rs6000.c: Likewise. * cpplib.c: Likewise. * fix-header.c: Likewise. * gcc.c: Likewise. * gen-protos.c: Likewise. * pexecute.c: Likewise. * protoize.c: Likewise. * rtl.c: Likewise. * scan.c: Likewise. * stmt.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. From-SVN: r19579
1998-05-06Be more careful when including <time.h> and <sys/file.h> in system.h.Kaveh R. Ghazi1-8/+0
Consolidate O_RDONLY/O_WRONLY fallback definitions from various files into system.h. * system.h: Wrap time.h and sys/file.h in autoconf checks. Provide default definitions for O_RDONLY and O_WRONLY here. * cccp.c, cpplib.c, fix-header.c, gcc.c, protoize.c: Not here. From-SVN: r19571
1998-04-20Add extra protection in case strrchr already definedMichael Meissner1-0/+2
From-SVN: r19343
1998-04-20Switch to strrchr if available instead of rindexMichael Meissner1-4/+14
From-SVN: r19341
1998-04-08* protoize.c (creat, read, write): Do not declare.Jeffrey A Law1-2/+2
From-SVN: r19061
1998-04-06More system.h cutover patches:Kaveh R. Ghazi1-55/+12
* c-parse.in: Include system.h, and remove stuff now made redundant. * cccp.c: Likewise. * cexp.y: Likewise. * protoize.c: Likewise. Properly check for cpp stringification. * Makefile.in (c-parse.o, cccp.o, cexp.o, protoize.o, unprotoize.o): Depend on system.h. * objc/Make-lang.in (objc-parse.o): Likewise. From-SVN: r19020
1998-04-04* Check in merge from gcc2. See ChangeLog.11 and ChangeLog.12Jeff Law1-29/+59
for details. * haifa-sched.c: Mirror recent changes from gcc2. From-SVN: r18984
1998-03-18Fix more warnings...Kaveh R. Ghazi1-0/+2
* c-lang.c (finish_file): Wrap variable `void_list_node' with macro test !ASM_OUTPUT_CONSTRUCTOR || !ASM_OUTPUT_DESTRUCTOR. * calls.c (emit_call_1): Wrap variable `already_popped' with macro test !ACCUMULATE_OUTGOING_ARGS. * collect2.c (write_c_file_glob): Wrap function definition in macro test !LD_INIT_SWITCH. * combine.c (try_combine): Wrap variables `cc_use' and `compare_mode' in macro test EXTRA_CC_MODES. * cpplib.c (do_ident): Remove unused variable `len'. (skip_if_group): Remove unused variables `at_beg_of_line' and `after_ident'. (cpp_get_token): Remove unused variable `dummy'. * dbxout.c (scope_labelno): Move static variable definition inside the one function scope where it is used. (dbxout_function_end): Wrap prototype and definition in macro test !NO_DBX_FUNCTION_END. * dwarf2out.c (add_subscript_info): Wrap variable `dimension_number' in macro test !MIPS_DEBUGGING_INFO. * expr.c (expand_builtin_setjmp): Move declaration of variable `i' into the scope where it is used. Wrap empty else-statement body in braces. * fix-header.c: Fix typo in comment. (inf_skip_spaces): Cast results of INF_UNGET to (void). (check_protection, main): Likewise. * flow.c (find_basic_blocks_1): Remove dangling comment text. * function.c (contains): Wrap prototype and definition in macro test HAVE_prologue || HAVE_epilogue. (fixup_var_refs_1): Remove unused variable `width'. * gen-protos.c (main): Remove unused variable `optr'. * haifa-sched.c (debug_control_flow): Remove unused variable `j'. * libgcc2.c (__udiv_w_sdiv): Provide dummy return value of 0. (__sjpopnthrow): Remove unused variable `jmpbuf'. (__throw): Remove unused variable `val'. * protoize.c: Check for a previously existing definition before defining *_OK macros. * scan-decls.c (scan_decls): Remove unused variable `old_written'. From-SVN: r18654
1998-02-28Fix warious warnings:Kaveh R. Ghazi1-5/+9
* c-aux-info.c: Include string.h/strings.h. * pa.c: Include stdlib.h. (pa_combine_instructions): Prototype the function. (pa_can_combine_p, forward_branch_p, shadd_constant_p): Likewise. (reloc_needed): Add default case for enumeration switch. (remove_useless_addtr_insns): Remove unused variable `all'. (hppa_expand_prologue): Add explicit braces to avoid ambiguous `else'. (output_function_epilogue): Remove unused variable `i'. (output_millicode_call): Remove unused variable `link'. (shadd_constant_p, forward_branch_p): Make the function static. (following_call): Explicitly declare to return int. (pa_reorg): Declare as void. (pa_combine_instructions): Declare as static void. Add parentheses around && within ||. * pa.h: Add prototypes for pa_reorg, symbolic_operand, following_call, function_label_operand, lhs_lshift_cint_operand and zdepi_cint_p. * pa.md: Add parentheses around && within ||. * cppalloc.c: Include stdlib.h. * cpperror.c (cpp_print_containing_files): Remove unused variable `i'. Fix format specifier in fprintf. * cse.c (cse_around_loop): Add explicit braces to avoid ambiguous `else'. (delete_dead_from_cse): Wrap variable `tem' in macro HAVE_cc0. * expr.c (expand_expr): Add parentheses around && within ||. * final.c (app_enable): Replace fprintf with fputs where there are no format specifiers and no trailing argument after the string. Eg, when printing ASM_APP_ON/ASM_APP_OFF. (app_disable): Likewise. (final_end_function): Likewise. (final_scan_insn): Likewise. Remove unused variable `set'. (profile_function): Wrap empty if-statement body in {} brackets. * function.c: Include stdlib.h. (pad_below): Wrap prototype and definition in ARGS_GROW_DOWNWARD. (reposition_prologue_and_epilogue_notes): Add parentheses around assignment used as truth value. * integrate.c (expand_inline_function): Wrap variable `cc0_insn' in macro HAVE_cc0. * jump.c (jump_optimize): Wrap variable `q' in macro HAVE_cc0. Remove unused variable `prev1'. * libgcc2.c (__bb_exit_trace_func): Add parentheses around && within ||. Fix format specifier in fprintf. (__bb_init_prg): Add parentheses around assignment used as truth value. * local-alloc.c: Include stdlib.h. (requires_inout): Add parentheses around assignment used as truth value. * loop.c (analyze_loop_iterations): Wrap prototype and definition in macro HAVE_decrement_and_branch_on_count. (insert_bct, instrument_loop_bct): Likewise. (move_movables): Add parentheses around assignment used as truth value. (consec_sets_invariant_p): Likewise. (maybe_eliminate_biv_1): Wrap variable `new' in macro HAVE_cc0. * objc/objc-act.c: Include stdlib.h. (lookup_method_in_protocol_list): Wrap empty else-statement body in braces. (lookup_protocol_in_reflist): Likewise. (objc_add_static_instance): Remove unused variables `decl_expr' and `decl_spec'. (get_objc_string_decl): Remove unused variable `decl'. (generate_static_references): Remove unused variables `idecl' and `instance'. (check_protocols): Wrap empty else-statement body in braces. * protoize.c: Include stdlib.h. (substr): Add parentheses around assignment used as truth value. (abspath): Likewise. (shortpath): Likewise. * regmove.c (fixup_match_1): Add parentheses around assignment used as truth value. * reload.c (push_secondary_reload): Remove unused variable `i'. (find_reloads): Add parentheses around assignment used as truth value. * reload1.c: Include stdlib.h. * rtl.h: Correct typo in prototype of offsettable_memref_p. * stmt.c (add_case_node): Add parentheses around assignment used as truth value. (case_tree2list): Likewise. * tree.c (valid_machine_attribute): Wrap variable `decl_attr_list' in macro VALID_MACHINE_DECL_ATTRIBUTE. Wrap variable `type_attr_list' in macro VALID_MACHINE_TYPE_ATTRIBUTE. (merge_attributes): Add explicit braces to avoid ambiguous `else'. * unroll.c (copy_loop_body): Wrap variable `cc0_insn' in macro HAVE_cc0. * varasm.c: Include stdlib.h. From-SVN: r18290