Commit Graph

33 Commits

Author SHA1 Message Date
Per Bothner 40e941afc1 opts.c (in_fnames, [...]): Moved here from c-opts.
* opts.c (in_fnames, num_in_fnames):  Moved here from c-opts.
	(add_input_filename):  New function.
	(handle_options):  Call add_input_filename directly instead of
	with a lang hook.
	* opts.h (in_fnames, num_in_fnames):  Moved here.
	(add_input_filename):  Declare.
	* c-decl.c:  Need to #include opts.h.
	* Makefile.in (c-decl.o):  Also depends on opts.h.
	* c-opts.c (in_fnames, num_in_fnames):  Moved to opts.c.
	(c_common_handle_filename):  Replaced by add_input_filename.
	* c-common.h (in_fnames, num_in_fnames, c_common_handle_filename):
	Remove.
	* langhooks.h (struct lang_hooks):  Remove handle_filename hook.
	* langhooks-def.h (LANG_HOOKS_HANDLE_FILENAME):  Remove macro.
	(LANG_HOOKS_INITIALIZER):  Remove use of LANG_HOOKS_HANDLE_FILENAME.
	* c-lang.c (LANG_HOOKS_HANDLE_FILENAME):  Remove macro.

From-SVN: r70012
2003-07-31 12:26:17 -07:00
Gabriel Dos Reis b6fe0bb8c5 Remove pedwarn_with_decl, warning_with_decl and error_with_decl from GCC.
Remove pedwarn_with_decl, warning_with_decl and error_with_decl
        from GCC.
        * calls.c (try_to_integrate): Don't use xxx_with_decl.
        (expand_call): Likewise.
        * dwarfout.c (output_reg_number): Likewise.
        * expr.c (expand_expr): Likewise.
        * function.c (assign_temp): Likewise.
        (uninitialized_vars_warning): Likewise.
        (setjmp_args_warning): Likewise.
        (expand_function_end): Likewise.
        * stmt.c (fixup_gotos): Likewise.
        (warn_about_unused_variables): Likewise.
        (expand_end_bindings): Likewise.
        * stor-layout.c (layout_decl): Likewise.
        (place_field): Likewise.
        * toplev.c (check_global_declarations): Likewise.
        (rest_of_handle_inlining): Likewise.
        (default_tree_printer): New function.
        (general_init): Initialize diagnostic machinery before routing
        signals to the ICE machinery.  Set default tree printer.
        * toplev.h (pedwarn_with_decl): Remove declaration.
        (warning_with_decl): Likewise.
        (error_with_decl): Likewise.
        (pedwarn): Remove attribute for the time being.
        * tree-inline.c (expand_call_inline): Don't use xxx_with_decl.
        * varasm.c (named_section): Likewise.
        (make_decl_rtl): Likewise.
        (assemble_variable): Likewise.
        (merge_weak): Likewise.
        (declare_weak): Likewise.

        * diagnostic.h: Move non-diagnostic stuff into pretty-print.h.
        * diagnostic.c: Move non-diagnostic stuff into pretty-print.c.
        (format_with_decl): Remove.
        (diagnostic_for_decl): Likewise.
        (pedwarn_with_decl): Likewise.
        (warning_with_decl): Likewise.
        (error_with_decl): Likewise.
        (diagnostic_initialize): Adjust.
        (diagnostic_count_diagnostic): Likewise.
        (announce_function): Likewise.
        (lhd_print_error_function): Likewise.
        (diagnostic_report_current_module): Likewise.
        (default_diagnostic_starter): Likewise.
        (diagnostic_report_diagnostic): Likewise.
        (default_diagnostic_finalizer): Likewise.
        (verbatim): Likewise.
        (error): Likewise.
        (warning): Likewise.
        * opts.c (common_handle_option): Likewise.
        * pretty-print.c: New file.
        * c-pretty-print.h (pp_base): Override.
        * c-pretty-print.c: Adjust use of macros throughout.
        (pp_buffer): New macro.
        (pp_newline): Likewise.
        * c-objc-common.c (c_tree_printer): Adjust prototype. Tidy.
        * Makefile.in (DIAGNOSTIC_H): New variable.
        (c-errors.o): Use it.
        (c-objc-common.o): Likewise.
        (c-common.o): Likewise.
        (c-opts.o): Likewise.
        (c-format.o): Likewise.
        (diagnostic.o): Likewise.
        (opts.o): Likewise.
        (toplev.o): Likewise.
        (rtl-error.o): Likewise.
        (dwarf2out.o): Likewise.
        (jump.o): Likewise.
        (pretty-print.o): New rule.

cp/
        * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
        * error.c: Use the new pretty-printer fraamework.

From-SVN: r69773
2003-07-25 09:52:32 +00:00
Neil Booth 2cc980567a common.opt: Document --param.
* common.opt:  Document --param.
	* opts.c (columns, undocumented_msg): New.
	(print_help): Get number of columns from environment.  Print
	--param help.  Tweak newline handling.
	(print_param_help): New.
	(print_filtered_help): Better handling of duplicates.  Complain
	about undocumented switches.
	(print_switch): New.
	(wrap_help): Improve wrapping, use COLUMNS.
	* opts.sh: Ignore comments in records.
	* params.def: Fix typos and remove trailing periods.
	* toplev.c (display_help): Don't dump --param help.
	* doc/sourcebuild.texi: Update.
java:
	* lang.opt: Don't show -MD_ and -MDD_.

From-SVN: r69581
2003-07-19 08:13:58 +00:00
Neil Booth f2ac996428 c.opt: Document Uncodumented; use it.
* c.opt: Document Uncodumented; use it.  Document ObjC options.
	* opts.c (print_filtered_help): Skip undocumented switches.
	* opts.h (CL_UNDOCUMENTED): New.
	* opts.sh: Handle Undocumented.
	* toplev.c (documented_lang_options): Prevent its becoming empty.
f:
	* lang-options.h: Remove.
	* lang.opt: Document most options.
objc:
	* lang-options.h: Remove.

From-SVN: r69494
2003-07-17 05:33:18 +00:00
Neil Booth 72de27eaff c-opts.c (print_help): Remove.
* c-opts.c (print_help): Remove.
	(c_common_handle_option): Don't handle --help.
	* c.opt: Document some options.
	(--help): Remove.
	* opts.c (print_filtered_help): New.
	(print_help): Use it.

From-SVN: r69383
2003-07-15 05:48:16 +00:00
Neil Booth f3fdaec48d common.opt: More --help messages.
* common.opt: More --help messages.
	* opts.c (print_help): Use puts().
	* toplev.c (f_options): Remove help text.
	(display_help): Don't dump f_options.

From-SVN: r69217
2003-07-11 05:35:06 +00:00
Andreas Jaeger fbdb0453f1 opts.c (wrap_help): Only pass int arguments as arguments to printf's '*' modifier.
* opts.c (wrap_help): Only pass int arguments as arguments to
	printf's '*' modifier.  Change argument of function.

From-SVN: r69124
2003-07-09 07:13:09 +02:00
Neil Booth 2178981638 * opts.c (wrap_help): Use unsigned int, not size_t.
From-SVN: r69106
2003-07-08 21:36:34 +00:00
Neil Booth cf03fd63cd Makefile.in: Update.
* Makefile.in: Update.
	* c-opts.c (c_common_handle_option): opt_text now contains the '-'.
	* c.opt: Update documentation.
	* common.opt: Add some help text.
	* opts.c: Include intl.h.
	(wrap_help, print_help): New.
	(find_opt, handle_option, common_handle_option): opt_text now
	contains the '-'.  Use print_help to output help.
	* opts.h (struct cl_option): New member "help".
	* opts.sh: Update to handle help text output and to prepend
	options with '-'.
	* toplev.c (display_help): Remove some help text.

From-SVN: r69068
2003-07-08 05:25:39 +00:00
Neil Booth 0fcd5ddaa8 opts.c (common_handle_option): Correct handling of the -falign- switches that do and don't take an argument.
* opts.c (common_handle_option): Correct handling of the
	-falign- switches that do and don't take an argument.

From-SVN: r69053
2003-07-07 19:27:30 +00:00
Neil Booth cb66e38590 c-common.h (c_comon_handle_filename, [...]): New.
* c-common.h (c_comon_handle_filename,
	c_common_missing_arguement): New.
	* c-lang.c (LANG_HOOKS_HANDLE_FILENAME,
	LANG_HOOKS_MISSING_ARGUMENT): New.
	* c-opts.c (missing_arg): Rename c_common_missing_argument,
	update to be an appropriate langhook.
	(c_common_handle_option): Don't handle filenames.
	(c_common_handle_filename): New.
	* hooks.c (hook_void_constcharptr,
	hook_bool_constcharptr_size_t_false): New.
	* hooks.h (hook_void_constcharptr,
	hook_bool_constcharptr_size_t_false): New.
	* langhooks-def.h (LANG_HOOKS_HANDLE_FILENAME,
	LANG_HOOKS_MISSING_ARGUMENT): New.
	(LANG_HOOKS_INITIALIZER): Update.
	* langhooks.h (struct lang_hooks): Add handle_filename and
	missing_argument.
	* opts.c (handle_option): Don't handle filenames here, but ...
	(handle_options): ... here.
	(common_handle_option): Don't handle missing arguments here.
	* objc/objc-lang.c (LANG_HOOKS_HANDLE_FILENAME,
	LANG_HOOKS_MISSING_ARGUMENT): New.
ada:
	* misc.c (gnat_handle_option): Don't handle filenames.
cp:
	* cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
	LANG_HOOKS_MISSING_ARGUMENT): Override.
f:
	* top.c (ffe_handle_option): Don't handle filenames.
java:
	* lang.c (java_handle_option): Don't handle filenames.

From-SVN: r69011
2003-07-06 19:01:21 +00:00
Neil Booth 5e14ae7e26 * opts.c (common_handle_options): Negate sense of -falign- switches.
From-SVN: r68939
2003-07-04 21:47:22 +00:00
Neil Booth b86f6cd9ab c-common.h (c_common_init_options): New prototype.
* c-common.h (c_common_init_options): New prototype.
	* c-opts.c (deferred_size): Remove.
	(defer_opt): Array is now pre-allocated.
	(c_common_init_options): Pre-allocate deferred_opts.  Make
	lang_flags unsigned.
	(push_command_line_options): Free deferred_opts.
	* hooks.c (hook_uint_uint_constcharptrptr_0): New.
	* hooks.h (hook_uint_uint_constcharptrptr_0): New.
	* langhooks-def.h (LANG_HOOKS_INIT_OPTIONS): Update.
	* langhooks.h (struct lang_hooks): New prototype for init_options.
	* main.c (main): Cast argv.
	* opts.c (handle_option, handle_options): Update prototypes.
	(decode_options): save_argc, save_argv are not global.  Constify.
	* opts.h (decode_options): New prototype.
	* toplev.c (general_init): New protoype.
	(save_argv): Make static.
	(save_argc): Remove.
	(print_switch_values, general_init): Constify.
	(toplev_main): Save argv.
	* toplev.h (toplev_main): Update prototype.
	(save_argc, save_argv): Remove.
ada:
	* misc.c (save_argc, save_argv): Make static.
	(gnat_init_options): New prototype.
	(gnat_init_options): Update.
f:
	* top.c (ffe_init_options): Update prototype.
	* top.h (ffe_init_options): Update prototype.
java:
	* lang.c (java_init_options): Update prototype.
treelang:
	* tree1.c (treelang_init_options): Update prototype.
	* treelang.h (treelang_init_options): Update prototype.

From-SVN: r68850
2003-07-02 20:15:46 +00:00
Franz Sirl d6553b54e8 opts.c: Include insn-attr.h.
2003-06-29  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>

	* opts.c: Include insn-attr.h.
	* Makefile.in (opts.o): Depend on INSN_ATTR_H.

From-SVN: r68657
2003-06-29 01:17:54 +00:00
Neil Booth 9756310a6e Makefile.in: Update.
* Makefile.in: Update.
	* opts.c: Include tm_p.h.
	(handle_options): Make static.
	(decode_options): Copied from toplev.c.
	* opts.h (decode_options): New.
	* toplev.c (parse_options_and_default_flags): Move most to opts.c,
	some to...
	(general_init): ...here.
	(toplev_main): Use decode_options instead.
	* toplev.h (save_argc, save_argv): New.

From-SVN: r68629
2003-06-28 06:18:10 +00:00
Devang Patel 6a08f7b337 final.c (debug_flush_symbol_queue): New function.
* final.c (debug_flush_symbol_queue): New function.
        (debug_queue_symbol): New function.
        (debug_free_queue): New function.
        (debug_nesting): New variable.
        (symbol_queue): New variable.
        (symbol_queue_index): Same.
        (symbol_queue_size): Same.
        * debug.h (debug_flush_symbol_queue): New.
        (debug_queue_symbol): New.
        (debug_free_queue): New.
        (debug_nesting): New.
        (symbol_queue_index): New.
        * dbxout.c (DBXOUT_DECR_NESTING): New macro.
        (DBXOUT_DECR_NESTING_AND_RETURN): New macro.
        (dbxout_init): Delay symbol output.
        (dbxout_global_decl): Save, set and reset TREE_USED bit around dbxout_symbol()
        call.
        (dbxout_begin_function): Same.
        (dbxout_finish): Free symbol queue.
        (dbxout_type): Put appropriate symbols in queue.
        (dbxout_symbol): Put info for symbol's type in queue. Decrement/Increment
        nesting counts flush symbol queue appropriately.
        (dbxout_parms): Increment dbxout nesting.
        (dbxout_reg_parms): Same.
        * flags.h (flag_debug_only_used_symbols): New.
        * toplev.c (flag_debug_only_used_symbols): New variable.
        (lang_independent_options): Add entries for new option -feliminate-unused-debug-symbols.
        * common.opt: Add entry for -feliminate-unused-debug-symbols.
        * opts.c (common_handle_options): Same.
        * config/rs6000/darwin.h (CC1_SPEC): Interpret -gused as -feliminate-unused-debug-symbols.
        * doc/invoke.texi (Debugging Options): Document -feliminate-unused-debug-symbols.

From-SVN: r68556
2003-06-26 20:04:40 -07:00
Neil Booth 9eee5e726d c-opts.c (missing_arg): Make non-static.
* c-opts.c (missing_arg): Make non-static.
	(c_common_handle_option): Don't check for missing arguments.
	* opts.c (handle_option): Check for missing arguments.
ada:
	* misc.c (gnat_handle_option): Don't check for missing arguments.
f:
	* top.c (ffe_handle_option): Don't check for missing arguments.
java:
	* lang.c (java_handle_option): Don't check for missing arguments.
testsuite:
	* const-str-2.m: Update.

From-SVN: r68517
2003-06-26 06:05:36 +00:00
Neil Booth f18754d640 c-opts.c (complain_wrong_lang, [...]): Remove.
* c-opts.c (complain_wrong_lang, write_langs): Remove.
	(c_common_handle_option): Complaints about wrong language are
	handled in opts.c now.
	* opts.c (complain_wrong_lang, write_langs, handle_options): New.
	(find_opt): Fix thinko.
	(handle_option): Update prototype.  Complain about switches for
	a different front end.
	* opts.h (lang_names, handle_options): New.
	(handle_option): Remove.
	* opts.sh: Write out language names array.
	* toplev.c (parse_options_and_default_flags): Use handle_options.

From-SVN: r68495
2003-06-25 20:43:11 +00:00
Neil Booth 0bd95603bb opts.c (common_handle_option): Add missing break;s.
* opts.c (common_handle_option): Add missing break;s.
f:
	* top.c (ffe_handle_option): Add missing break;.

From-SVN: r68457
2003-06-25 05:52:14 +00:00
Neil Booth d302c9d6ce common.opt: Add -finline-limit.
* common.opt: Add -finline-limit.
	* opts.c (common_handle_options): Handle it.
	* opts.sh: Temporary kludge for -finline-limit.
	* toplev.c (decode_f_option, independent_decode_option): Die.
	(parse_options_and_default_flags): No independent_decode_option.

From-SVN: r68348
2003-06-22 20:21:35 +00:00
Neil Booth 6ff3a151fd common.opt: More -f switches.
* common.opt: More -f switches.
	* opts.c (common_handle_options): Handle them.
	* toplev.c (time_report): Make extern.
	(f_options): USe flag_dummy.
	(decode_f_option): No need to use f_options now.
	* toplev.h (flag_cprop_registers, flag_ssa, flag_ssa_ccp,
	flag_ssa_dce, time_report, flag_new_regalloc): Make extern.

From-SVN: r68328
2003-06-22 13:44:40 +00:00
Neil Booth 9cd23ed2b4 opts.c (find_opt): Fix to always guarantee a find of a switch with joined parameter.
* opts.c (find_opt): Fix to always guarantee a find of a
	switch with joined parameter.
	* opts.h (struct cl_option): New member back_chain.
	* opts.sh: Update to calculate and add back_chain member.

From-SVN: r68324
2003-06-22 09:04:57 +00:00
Neil Booth de32c0cb3b Makefile.in: Update.
* Makefile.in: Update.
	* common.opt: New switches.
	* opts.c: Include diagnostic.h.
	(common_handle_option): Handle new switches.
	* toplev.c (flag_loop_optimize, flag_crossjumping, flag_if_conversion,
	flag_if_conversion2, flag_delete_null_pointer_checks,
	flag_rerun_cse_after_loop): Make extern.
	(flag_dummy): New.
	(f_options): Update to use flag_dummy for moved options.
	(decode_f_option): Some switches moved to opts.c.
	* toplev.h (flag_loop_optimize, flag_crossjumping, flag_if_conversion,
	flag_if_conversion2, flag_delete_null_pointer_checks,
	flag_rerun_cse_after_loop, flag_keep_static_consts, flag_peel_loops,
	flag_tracer, flag_thread_jumps, flag_unroll_loops,
	flag_unroll_all_loops, flag_unswitch_loops): New.
f:
	* lang.opt: Add -fpreprocessed.
	* top.c (ffe_handle_option): Handle it.

From-SVN: r68315
2003-06-21 20:28:18 +00:00
Neil Booth 058de654c5 Makefile.in: Update.
* Makefile.in: Update.
	* c-opts.c (c_common_handle_option): Don't return -1.
	* common.opt: New switches.
	* opts.c: Include rtl.h, ggc.h and output.h.
	(find_opt): Only stop searching when input switch compares
	less than the stored switch.  Continue searching if greater.
	(handle_option): No need to handle negative return values.
	(common_handle_option): Handle new switches.
	(set_fast_math_flags, fast_math_flags_set_p): New.
	* toplev.c (set_fast_math_flags, fast_math_flags_set_p):
	Move to opts.c.
	(decode_f_option): Some switches moved to opts.c.
	(parse_options_and_default_flags): No need to cater for negative
	return values.
f:
	* top.c (ffe_handle_option): No need to return -1 any more.

From-SVN: r68307
2003-06-21 15:59:31 +00:00
Neil Booth e01cc6dc62 c-decl.c (store_parm_decls): Make saved_warn_shadow boolean.
* c-decl.c (store_parm_decls): Make saved_warn_shadow boolean.
	* common.opt: Add remaining -W options and -g.
	* diagnostic.c (warnings_are_errors): Remove.
	* flags.h: Make most warning flags boolean.
	* opts.c (common_handle_option): Handle remaining -W options, and -g.
	Move many warning flags from toplev.c, making them boolean.
	* toplev.c: Remove many warning flags.
	(decode_W_option): Remove.
	(decode_g_option): Make extern.  Error on unknown switch.
	(lang_independent_W_options): Use warn_dummy.
	(independent_decode_option): Just handle -f switches now.
	* toplev.h (decode_g_option): New.

From-SVN: r68287
2003-06-20 22:56:36 +00:00
Neil Booth 903caebf49 Makefile.in: Update.
* Makefile.in: Update.
	* common.opt: New options.
	* opts.c (maybe_warn_unused_parameter, set_Wextra, handle_param,
	set_Wunused): New.
	(common_handle_option): Handle new options.
	* toplev.c (set_target_switch): Export.
	(set_Wextra, set_Wunused, maybe_warn_unused_parameter): Move to opts.c.
	(decode_W_option): -Wunused and -Wextra handled in opts.c now.
	(independent_decode_option): More options handled in opts.c now.
	Change prototype.
	* toplev.h (set_target_switch): New.

From-SVN: r68138
2003-06-18 06:00:06 +00:00
Neil Booth 7b086b11df c-opts.c (c_common_handle_option): s/on/value/.
* c-opts.c (c_common_handle_option): s/on/value/.
	(OPT_fabi_version_, OPT_ftabstop_, OPT_ftemplate_depth_): Use value
	directly rather than converting the argument.
	* c.opt: Update docs.  Use UInteger where appropriate.
	* common.opt: Use UInteger where appropriate.
	* opts.c (integral_argument): New.
	(handle_argument): Handle integral arguments, and optional
	joined arguments.
	(common_handle_option): Update.
	* opts.h (CL_MISSING_OK, CL_UINTEGER): New.
	* opts.sh: Handle JoinedOrMissing and UInteger flags.
java:
	* lang.c (java_handle_option): Special-casing of optional
	joined arguments no longer needed.
	* lang.opt: Update switches that take optional argument.

From-SVN: r67999
2003-06-16 05:47:07 +00:00
Neil Booth d185d26881 c-pch.c (asm_file_name): Remove.
* c-pch.c (asm_file_name): Remove.
	* common.opt: Add more switches.
	* flags.h (g_switch_set): Boolify.
	* opts.c (g_switch_value, g_switch_set, exit_after_options,
	version_flag): Move from toplev.c.
	(common_handle_option): Handle more switches from toplev.c.
	* toplev.c (display_help, display_target_options, decode_d_option,
	print_version): Make non-static, remove prototypes.
	(aux_base_name, asm_file_name, aux_info_file_name): Constify.
	(version_flag, g_switch_value, g_switch_set, exit_after_options):
	Remove.
	(independent_decode_option): Move some handlers to opts.c.
	* toplev.h (aux_info_file_name, aux_base_name, asm_file_name,
	exit_after_options, version_flag, display_help, display_target_options,
	print_version, decode_d_option): New.
java:
	* lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.

From-SVN: r67971
2003-06-15 08:30:02 +00:00
Neil Booth d7b4261875 Makefile.in: Update to use common.opt and lang_opt_files.
* Makefile.in: Update to use common.opt and lang_opt_files.
	(c-options.c, c-options.h): Remove.
	(options.c, options.h): Add.
	* c-opts.c: Include options.h not c-options.h.
	* common.opt: New file.
	* configure, configure.in: Add lang_opt_files.
	* opts.c: Include flags.h and diagnostic.h.
	(common_handle_option): New.
	(handle_option): Update to recognize common options and all
	language-dependent options.
	* opts.h (CL_F77, CL_JAVA, CL_ADA, CL_COMMON, CL_TREELANG): New.
	(struct cl_option): Make flags of type int.
	* opts.h: Flag option with front ends to which it applies.
	Handle duplicate options.
	* toplev.c (filename): Remove.
	(independent_decode_option): Don't handle filenames and -quiet.
	(process_options, do_compile): Update.
ada:
	* Make-lang.in: Update to use options.c and options.h.
	* misc.c: Include options.h not aoptions.h.
	(gnat_handle_option): Abort on unrecognized switch.
	(gnat_init_options): Request Ada switches.
cp:
	* Make-lang.in: Remove c-options.o.
f:
	* Make-lang.in: Update to use options.c and options.h.
	* top.c: Include options.h not f-options.h.
	(gnat_handle_option): Abort on unrecognized switch.
	(ffe_init_options): From com.c.  Request F77 options.
	(ffe_handle_options): Abort on unrecognized switch.
	* com.c (ffe_init_options): Move to top.c.
	* top.h (fee_init_options): New.
java:
	* Make-lang.in: Update to use options.c and options.h.
	* lang.c: Include options.h not j-options.h.
	(java_handle_option): Abort on unrecognized option.
	(java_init_options): Request Java switches.
treelang:
	* Make-lang.in: Update to use options.c and options.h.
	* tree1.c: Include options.h not t-options.h.
	(treelang_init_options): New.
	(treelang_handle_option): Abort on unrecognized switch.
	* treetree.c (LANG_HOOKS_INIT_OPTIONS): Override.
	* treetree.h (treelang_init_options): New.

From-SVN: r67941
2003-06-14 12:26:36 +00:00
Kazu Hirata 6356f89288 ChangeLog: Follow spelling conventions.
* ChangeLog: Follow spelling conventions.
	* ChangeLog.2: Likewise.
	* c-decl.c: Likewise.
	* cfgloop.h: Likewise.
	* cgraph.c: Likewise.
	* coverage.c: Likewise.
	* cppcharset.c: Likewise.
	* cpphash.h: Likewise.
	* cpplex.c: Likewise.
	* cpplib.c: Likewise.
	* dbxout.c: Likewise.
	* df.c: Likewise.
	* dwarf2out.c: Likewise.
	* dwarfout.c: Likewise.
	* emit-rtl.c: Likewise.
	* explow.c: Likewise.
	* gcov-io.c: Likewise.
	* gcov-io.h: Likewise.
	* gcov.c: Likewise.
	* gengtype.c: Likewise.
	* ggc.h: Likewise.
	* opts.c: Likewise.
	* real.c: Likewise.
	* reload.c: Likewise.
	* stmt.c: Likewise.

From-SVN: r67849
2003-06-12 19:01:08 +00:00
Neil Booth 7fb26bb001 hooks.c (hook_int_size_t_constcharptr_int_0): New.
* hooks.c (hook_int_size_t_constcharptr_int_0): New.
	* hooks.h (hook_int_size_t_constcharptr_int_0): New.
	* langhooks-def.h (lhd_decode_option, LANG_HOOKS_DECODE_OPTION): Die.
	(LANG_HOOKS_HANDLE_OPTION, LANG_HOOKS_INITIALIZER): Update.
	* langhooks.c (lhd_decode_option): Remove.
	* langhooks.h (struct lang_hooks): Remove decode_option.
	* opts.c (handle_option): No longer use decode_option.
java:
	* Make-lang.in: Handle mostlyclean.
treelang:
	* Make-lang.in: Update for option handling.
	* lang.opt: New.
	* tree1.c: Include opts.h and t-options.h.
	(treelang_decode_option): Remove.
	(treelang_handle_option): New.
	* treetree.c (LANG_HOOKS_DECODE_OPTION): Remove.
	(LANG_HOOKS_HANDLE_OPTION): Override.
	* treetree.h (treelang_decode_option): Remove.
	(treelang_handle_option): New.

From-SVN: r67799
2003-06-11 22:21:10 +00:00
Neil Booth 35399bdca9 Makefile.in: Rename options.c and options.h to c-options.c and c-options.h.
* Makefile.in: Rename options.c and options.h to c-options.c and
	c-options.h.
	(OBJS): Remove options.o.
	* c-opts.c: Don'tInclude c-options.h instead of options.h.
	* opts.c: Don't include options.h.
	(find_opt): Can't use enum opt_code or N_OPTS.
	* opts.h (struct cl_option, cl_options, cl_options_count): Move from...
	* opts.sh: ... here.

From-SVN: r67615
2003-06-08 07:54:10 +00:00
Neil Booth 2772ef3ef3 Makefile.in (OJBS, c-opts.o): Update.
* Makefile.in (OJBS, c-opts.o): Update.
	(c-options.c, c-options.h): Rename options.h and options.c.
	(options.h): Rename options_.h.
	(opts.o): New.
	* c-common.h (c_common_handle_option): Replace c_common_decode_option.
	(c_common_init_options): Update prototype.
	* c-lang.c (c_init_options): Update prototype.
	(LANG_HOOKS_HANDLE_OPTION): Override.
	(LANG_HOOKS_DECODE_OPTION): Drop.
	* c-opts.c: Include opts.h and options.h instead of c-options.h
	and c-options.c.
	(lang_flags): Move to file scope.
	(find_opt, c_common_decode_option): Remove.
	(CL_C, CL_OBJC, CL_CXX, CL_OBJCXX, CL_JOINED, CL_SEPARATE,
	CL_REJECT_NEGATIVE): Move to opts.h.
	(missing_arg): Update prototype.
	(c_common_init_options): Update for new prototype.
	(c_common_handle_options): Filenames are passed as N_OPTS.
	* hooks.c (hook_int_void_0): New.
	* hooks.h (hook_int_void_0): New.
	* langhooks-def.h (LANG_HOOKS_INIT_OPTIONS): New default.
	(LANG_HOOKS_HANDLE_OPTION): Default to NULL for now.
	(LANG_HOOKS_INITIALIZER): Update.
	* langhooks.h (init_options): Update.
	(handle_option): New.
	* opts.c, opts.h: New files.
	* opts.sh: Update c file to include opts.h and options.h.
	* toplev.c: Include opts.h; change options.h to options_.h.
	(parse_options_and_default_flags): Get lang_mask, use
	handle_option for language-specific handling.
	* objc/objc-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
	(LANG_HOOKS_HANDLE_OPTION): Override.
	(objc_init_options): Update.
ada:
	* misc.c (gnat_init_options): Update.
cp:
	* cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
	(LANG_HOOKS_HANDLE_OPTION): Override.
	* cp-tree.h (cxx_init_options): Update.
	* lex.c (cxx_init_options): Update.
f:
	* com.c (ffe_init_options): Update.
java:
	* lang.c (java_init_options): Update.

From-SVN: r67584
2003-06-07 11:10:46 +00:00