aboutsummaryrefslogtreecommitdiff
path: root/gcc/f/bad.c
AgeCommit message (Collapse)AuthorFilesLines
2001-09-13c-parse.in (yyerror): Const-ification and/or static-ization.Kaveh R. Ghazi1-1/+1
* c-parse.in (yyerror): Const-ification and/or static-ization. * c-typeck.c (push_member_name): Likewise. * collect2.c (main): Likewise. * dbxout.c (dbxout_parms): Likewise. * diagnostic.c (format_with_decl): Likewise. * dwarf2out.c (output_ranges): Likewise. * dwarfout.c (fundamental_type_code): Likewise. * except.c (dw2_output_call_site_table): Likewise. * gcc.c (do_spec_1): Likewise. * genopinit.c (optabs): Likewise. * objc/objc-act.c (synth_id_with_class_suffix, start_class, gen_declaration_1, handle_impent): Likewise. * protoize.c (default_include, in_system_include_dir, abspath): Likewise. * sched-vis.c (visualize_stall_cycles): Likewise. * sdbout.c (plain_type_1, sdbout_end_function, sdbout_end_epilogue): Likewise. * varasm.c (decode_reg_name): Likewise. * 1750a.c (mod_regno_adjust): Likewise. * alpha.c (alpha_write_one_linkage, unicosmk_output_default_externs): Likewise. * arm.c (arm_condition_codes): Likewise. * arm.h (arm_condition_codes): Likewise. * avr.c (output_movsisf, encode_section_info): Likewise. * darwin.h (GEN_BINDER_NAME_FOR_STUB, GEN_SYMBOL_NAME_FOR_SYMBOL): Likewise. * i386.c (hi_reg_name, qi_reg_name, qi_high_reg_name): Likewise. * i386.h (hi_reg_name, qi_reg_name, qi_high_reg_name): Likewise. * m88k.c (output_function_profiler): Likewise. * mips.c (mips_output_conditional_branch): Likewise. * ns32k.c (ns32k_out_reg_names): Likewise. * ns32k.h (ns32k_out_reg_names): Likewise. * pj.c (pj_output_rval): Likewise. * rs6000.c (GEN_LOCAL_LABEL_FOR_SYMBOL): Likewise. * sparc.c (sparc_flat_function_prologue, sparc_flat_function_epilogue): Likewise. cp: * decl.c (warn_extern_redeclared_static, cp_make_fname_decl): Const-ification. * pt.c (tsubst_decl): Likewise. f: * bad.c (ffebad_finish): Const-ification and/or static-ization. * intrin.c (ffeintrin_cmp_name_): Likewise. * stc.c (ffestc_R904): Likewise. java: * expr.c (expand_invoke): Const-ification. * parse.y (patch_method_invocation): Likewise. From-SVN: r45581
2001-04-12bad.c (inhibit_warnings): Delete redundant declaration.Kaveh R. Ghazi1-2/+0
* bad.c (inhibit_warnings): Delete redundant declaration. * com.c (skip_redundant_dir_prefix): Likewise. * com.h (mark_addressable): Likewise. From-SVN: r41312
2000-12-08safe-ctype.h: New file.Zack Weinberg1-1/+1
include: * 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. From-SVN: r38124
2000-06-21Make-lang.in (F77_SRCS): Remove all .j files.Zack Weinberg1-2/+2
* Make-lang.in (F77_SRCS): Remove all .j files. * Makefile.in (ASSERT_H, CONFIG_H, CONVERT_H, FLAGS_H, GGC_H, GLIMITS_H, HCONFIG_H, INPUT_H, OUTPUT_H, RTL_H, SYSTEM_H, TOPLEV_H, TREE_H): Remove references to .j files. (TCONFIG_H, TM_H): Remove entirely. (deps-kinda): Delete rule. Correct commentary. * assert.j, config.j, convert.j. flags.j, ggc.j, glimits.j, hconfig.j, input.j, output.j, rtl.j, system.j, toplev.j, tree.j, tconfig.j, tree.j: Delete. * ansify.c, bad.c, bit.c, com.c, com.h, intdoc.c, lex.c, parse.c, proj.c, proj.h, ste.c, target.c, target.h, top.c, where.c, where.h: Include parent-directory headers directly. * lex.c: Don't include tree.h twice. From-SVN: r34638
1999-09-16system.h (CTYPE_CONV, [...]): New macros.Kaveh R. Ghazi1-1/+1
* system.h (CTYPE_CONV, TOUPPER, TOLOWER): New macros. Use CTYPE_CONV in all ctype macros. * cccp.c (initialize_char_syntax): Use uppercase ctype macro from system.h. * cexp.y (initialize_random_junk): Likewise. * c4x.c (c4x_interrupt_function_p, c4x_handle_pragma): Likewise. * i370.c (handle_pragma): Likewise. * i370.h (ASM_OUTPUT_LABELREF, ASM_OUTPUT_ASCII): Likewise. * v850.c (override_options): Likewise. * doprint.c (_doprnt): Likewise. * fixinc/fixincl.c (main, quoted_file_exists, extract_quoted_files): Likewise. * fixinc/server.c (load_data): Likewise. * fold-const.c (real_hex_to_f): Likewise. * genattr.c (write_upcase, gen_attr): Likewise. * genattrtab.c (convert_const_symbol_ref, evaluate_eq_attr, write_upcase): Likewise. * genemit.c (print_code): Likewise. * genopinit.c (gen_insn): Likewise. * genpeep.c (print_code): Likewise. * genrecog.c (print_code): Likewise. * optabs.c (init_libfuncs): Likewise. ch: * lex.c (maybe_downcase, getlc, handle_generic_pragma, check_newline): Likewise. f: * bad.c (ffebad_finish): Likewise. * fini.c (main): Likewise. * intrin.c (ffeintrin_init_0): Likewise. * lex.c (ffelex_hash_): Likewise. * src.c (ffesrc_init_1): Likewise. From-SVN: r29463
1999-03-27Warning fixes:Kaveh R. Ghazi1-11/+11
* bad.c (_ffebad_message_, ffebad_string_, ffebad_message_, ffebad_bufputs_, ffebad_bufputs_, ffebad_start_, ffebad_string, ffebad_finish): Const-ify a char*. * bld.c (ffebld_op_string_, ffebld_op_string): Likewise. * bld.h (ffebld_op_string): Likewise. * com.c (ffecom_arglist_expr_, ffecom_build_f2c_string_, ffecom_debug_kludge_, ffecom_f2c_make_type_, ffecom_get_appended_identifier_, ffecom_get_identifier_, ffecom_gfrt_args_): Likewise. (ffecom_convert_narrow_, ffecom_convert_widen_): Add prototype. (builtin_function, ffecom_gfrt_name_, ffecom_gfrt_argstring_, ffecom_arglist_expr_, ffecom_build_f2c_string_, ffecom_debug_kludge_, ffecom_f2c_make_type_, ffecom_get_appended_identifier_, ffecom_get_external_identifier_, ffecom_get_identifier_, ffecom_decl_field, ffecom_get_invented_identifier, lang_print_error_function, skip_redundant_dir_prefix, read_name_map, print_containing_files): Const-ify a char*. (savestring): Remove, use `xstrdup' instead. * com.h (ffecom_decl_field, ffecom_get_invented_identifier): Const-ify a char*. * data.c (ffebld, ffedata_gather_): Make explicitly static. * expr.c (ffeexpr_isdigits_, ffeexpr_percent_, ffeexpr_reduced_concatenate_, ffeexpr_nil_real_, ffeexpr_nil_number_, ffeexpr_nil_number_period_, ffeexpr_nil_number_real_, ffeexpr_token_real_, ffeexpr_token_number_, ffeexpr_token_number_period_, ffeexpr_token_number_real_): Const-ify a char*. * fini.c (xspaces): Likewise. * global.c (ffeglobal_type_string_): Likewise. (ffeglobal_drive): Protoize. (ffeglobal_proc_def_arg): Const-ify a char*. * global.h (ffeglobal_drive): Protoize. (ffeglobal_proc_def_arg): Const-ify a char*. * implic.c (ffeimplic_none, ffeimplic_peek_symbol_type): Likewise. * implic.h (ffeimplic_peek_symbol_type): Likewise. * info.c (ffeinfo_basictype_string_, ffeinfo_kind_message_, ffeinfo_kind_string_, ffeinfo_kindtype_string_, ffeinfo_where_string_, ffeinfo_basictype_string, ffeinfo_kind_message, ffeinfo_kind_string, ffeinfo_kindtype_string, ffeinfo_where_string): Likewise. * info.h (ffeinfo_basictype_string, ffeinfo_kind_message, ffeinfo_kind_string, ffeinfo_kindtype_string, ffeinfo_where_string): Likewise. * intrin.c (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_, _ffeintrin_imp_, ffeintrin_check_, ffeintrin_cmp_name_, ffeintrin_fulfill_specific, ffeintrin_init_0, ffeintrin_is_actualarg, ffeintrin_is_intrinsic, ffeintrin_name_generic, ffeintrin_name_implementation, ffeintrin_name_specific): Likewise. * intrin.h (ffeintrin_is_intrinsic, ffeintrin_name_generic, ffeintrin_name_implementation, ffeintrin_name_specific): Likewise. * lex.c (ffelex_type_string_, ffelex_token_new_character, ffelex_token_new_name, ffelex_token_new_names, ffelex_token_new_number): Likewise. * lex.h (ffelex_token_new_character, ffelex_token_new_name, ffelex_token_new_names, ffelex_token_new_number): Likewise. * malloc.c (malloc_types_, malloc_pool_new, malloc_new_inpool_, malloc_new_zinpool_): Likewise. * malloc.h (malloc_new_inpool_, malloc_new_zinpool_, malloc_pool_new): Likewise. * name.c (ffename_space_drive_global, ffename_space_drive_symbol): Protoize. * name.h (ffename_space_drive_global, ffename_space_drive_symbol): Likewise. * symbol.c (ffesymbol_state_name_, ffesymbol_attr_name_, ffesymbol_attrs_string): Const-ify a char*. (ffesymbol_drive, ffesymbol_drive_sfnames): Protoize. (ffesymbol_state_string): Const-ify a char*. * symbol.h (ffesymbol_attrs_string): Likewise. (ffesymbol_drive, ffesymbol_drive_sfnames): Protoize. (ffesymbol_state_string): Const-ify a char*. * target.c (ffetarget_layout): Likewise. * target.h (ffetarget_layout): Likewise. From-SVN: r26013
1999-02-15delete/change my email addressCraig Burley1-1/+1
From-SVN: r25221
1998-10-12Warning fixes:Kaveh R. Ghazi1-2/+2
* bad.c (ffebad_finish): Change type of variable `c' to unsigned char, change type of variable `s' to unsigned char *. * com.c (ffecom_symbol_null_): Add missing initializers. * fini.c (MAXNAMELEN): Undef it before defining. * implic.c (ffeimplic_lookup_): Change type of parameter `c' to unsigned char. * intrin.c (ffeintrin_init_0): Cast the argument of ctype macros to (unsigned char). * lex.c (ffelex_splice_tokens): Change type of variable `p' to unsigned char *. (ffelex_token_name_from_names): Cast the argument of `ffelex_is_firstnamechar' to (unsigned char). (ffelex_token_names_from_names): Likewise. (ffelex_token_new_name): Likewise. (ffelex_token_new_names): Likewise. * malloc.c (malloc_root_): Add missing initializer. * stb.c (ffestb_do): Change type of variable `p' to unsigned char *. (ffestb_else) Likewise. (ffestb_else3_) Likewise. (ffestb_endxyz) Likewise. (ffestb_goto) Likewise. (ffestb_let) Likewise. (ffestb_varlist) Likewise. (ffestb_R522) Likewise. (ffestb_R528) Likewise. (ffestb_R834) Likewise. (ffestb_R835) Likewise. (ffestb_R838) Likewise. (ffestb_R1102) Likewise. (ffestb_blockdata) Likewise. (ffestb_R1212) Likewise. (ffestb_R810) Likewise. (ffestb_R10014_): Cast the argument of `ffelex_is_firstnamechar' to (unsigned char). (ffestb_V014): Change type of variable `p' to unsigned char *. (ffestb_dummy) Likewise. (ffestb_R524) Likewise. (ffestb_R547) Likewise. (ffestb_decl_chartype) Likewise. (ffestb_decl_dbltype) Likewise. (ffestb_decl_gentype) Likewise. (ffestb_decl_entsp_2_) Likewise. (ffestb_V027) Likewise. (ffestb_decl_R539) Likewise. * top.c (ffe_decode_option): Mark parameter `argc' with ATTRIBUTE_UNUSED. * where.c (ffewhere_unknown_line_): Add missing initializers. From-SVN: r23030
1998-06-16Cutover to system.h:Craig Burley1-4/+4
Mon Jun 15 22:21:57 1998 Craig Burley <burley@gnu.org> Cutover to system.h: * Make-lang.in: * Makefile.in: * ansify.c: * bad.c: * bld.c: * com.c: * com.h: * expr.c: * fini.c: * g77spec.c: * implic.c: * intdoc.c: * intrin.c: * lex.c: * lex.h: * parse.c: * proj.c: * proj.h: * src.c: * src.h: * stb.c: * ste.c: * target.c: * top.c: * system.j: New file. Use toplev.h where appropriate: * Make-lang.in: * Makefile.in: * bad.c: * bld.c: * com.c: * lex.c: * ste.c: * top.c: * toplev.j: New file. Conditionalize all dumping/reporting routines so they don't get built for gcc/egcs: * bld.c: * bld.h: * com.c: * equiv.c: * equiv.h: * sta.c: * stt.c: * stt.h: * symbol.c: * symbol.h: Use hconfig.h instead of config.h where appropriate: * Makefile.in (proj-h.o): Compile with -DUSE_HCONFIG. * fini.c: Define USE_HCONFIG before including proj.h. * Makefile.in (deps-kinda): Redirect stderr to stdout, to eliminate diagnostics vis-a-vis g77spec.c. * Makefile.in: Regenerate dependencies via deps-kinda. * lex.c (ffelex_file_fixed, ffelex_file_free): Eliminate apparently spurious warnings about uninitialized variables `c', `column', and so on. From-SVN: r20520
1998-06-15Restore circa-0.5.22 capabilities of `g77' driver:Craig Burley1-0/+1
Thu May 28 21:32:18 1998 Craig Burley <burley@gnu.org> Restore circa-0.5.22 capabilities of `g77' driver: * Make-lang.in (g77spec.o): Depend on f/version.h. (g77version.o): New rule to compile g77 version info. (g77$(exeext)): Depend on and link in g77version.o. * g77spec.c: Rewrite to be more like 0.5.22 version of g77.c, making filtering of command line smarter so mixed Fortran and C (etc.) can be compiled, verbose version info can be obtained, etc. * lang-specs.h (f77-version): New "language" to support "g77 -v" command under new gcc 2.8 regime. * lex.c (ffelex_file_fixed): If -fnull-version, just substitute a "source file" that prints out version info. * top.c, top.h: Support -fnull-version. * lang-specs.h: Use "%O" instead of OO macro to specify object extension. Remove old stringizing cruft. * Make-lang.in (g77.c, g77spec.o, g77.o, g77$(exeext), g77-cross$(exeext), f771, $(srcdir)/f/g77.info, $(srcdir)/f/g77.dvi, $(srcdir)/f/intdoc.texi, f77.install-common, f77.install-info, f77.install-man, f77.uninstall, $(G77STAGESTUFF), f77.stage1, f77.stage2, f77.stage3, f77.stage4, f77.distdir): Don't do anything unless user specified "f77" or "F77" in $LANGUAGES either during configuration or explicitly. For convenience of various tests and to work around lack of the assignment "LANGUAGES=$(BOOT_LANGUAGES)" in the "make stage1" command of "make bootstrap" in gcc, use a touch file named "lang-f77" to communicate whether this is the case. * Make-lang.in (F77_FLAGS_TO_PASS): Delete this macro, replace with minimal expansion of its former self in each of the two instances where it was used. * Makefile.in (HOST_CC): Delete this definition. * com.c (index, rindex): Delete these declarations. * proj.h: (isascii): Delete this. * Make-lang.in (f77.install-common): Warn if `f77-install-ok' flag-file exists, since it no longer triggers any activity. Rename libf2c.a and f2c.h to libg2c.a and g2c.h, normalize and simplify g77/libg2c build process: * Make-lang.in: Remove all support for overwriting /usr/bin/f77 etc., or whatever the actual names are via $(prefix) and $(local_prefix). (g++ overwrites /usr/bin/c++, but then it's often the only C++ compiler on the system; f77 often exists on systems that are installing g77.) (f77.realclean): Remove obsolete target. (g77.c, g77$(exeext)): Minor changes to look more like g++'s stuff. (f771): Now built with srcdir=gcc/f, not srcdir=gcc, to be more like g++ and such. (f/Makefile): Removed, as g++ doesn't need this rule. (f77.install-common): No longer install f77, etc. (f77.install-man): No longer install f77.1. (f77.uninstall): No longer uninstall f77, f77.1, etc. (f77.stage1, f77.stage2, f77.stage3, f77.stage4): Do work only if "f77" appears in $(LANGUAGES). (Note: gcc's Makefile.in's bootstrap target should set LANGUAGES=$(BOOT_LANGUAGES) when making the stage1 target.) * Makefile.in: Update vis-a-vis gcc/cp/Makefile.in. (none): Remove. (g77-only): Relocate. (all.indirect, f771, *.o): Now assumes current directory is this dir (gcc/f), not the parent directory. (TAGS): Remove "echo 'parse.y,0' >> TAGS ;" line. * config-lang.in: Delete commented-out code. Fix stagestuff definition. Add more stuff to diff_excludes definition. Don't create any directories. Set outputs to f/Makefile, to get variable substition to happen (what does that really do, anyway?!). * g77spec.c: Rename libf2c to libg2c. * com.h: Remove all of the gcc back-end decls, since egcs should have all of them correct. * com.c: Include "proj.h" before anything else, as that's how things are supposed to work. * ste.c: Ditto. * bad.c: Include "flags.j" here, since some diagnostics check flag_pedantic_errors. * Makefile.in (f/*.o): Rebuild dependencies via deps-kinda. * output.j: New source file. * Make-lang.in (F77_SRCS): Update accordingly. * Makefile.in (OUTPUT_H): Ditto. (deps-kinda): Ditto. * com.c: Include "output.j" here. * lex.c: Ditto. From-SVN: r20506
1998-05-19JCB: update email in header.Dave Love1-1/+1
From-SVN: r19876
1997-08-12Initial revisionJeff Law1-0/+543
From-SVN: r14772