aboutsummaryrefslogtreecommitdiff
path: root/gcc/opts.h
AgeCommit message (Collapse)AuthorFilesLines
2010-06-20re PR other/32998 (-frecord-gcc-switches issues)Joseph Myers1-7/+19
PR other/32998 * opth-gen.awk: Generate definitions of OPT_SPECIAL_unknown, OPT_SPECIAL_program_name and OPT_SPECIAL_input_file. * opts-common.c (find_opt): Return OPT_SPECIAL_unknown on failure. (decode_cmdline_option): Update for this return value. Set orig_option_with_args_text field. Set arg field for unknown options. Make static. (decode_cmdline_options_to_array): New. (prune_options): Update handling of find_opt return value. * opts.c (read_cmdline_option): Take decoded option. Return void. (read_cmdline_options): Take decoded options. (decode_options): Add parameters for decoded options. Use decode_cmdline_options_to_array. Use decoded options for -O scan. Use integral_argument for -O parameters. Update call to read_cmdline_options. (enable_warning_as_error): Update handling of find_opt return value. * opts.h: Update comment on unknown options. (struct cl_decoded_option): Update comments on opt_index and arg. Add orig_option_with_args_text. (decode_cmdline_option): Remove. (decode_cmdline_options_to_array): Declare. (decode_options): Update prototype. * toplev.c (save_argv): Remove. (save_decoded_options, save_decoded_options_count): New. (read_integral_parameter): Remove. (print_switch_values): Use decoded options. (toplev_main): Don't set save_argv. Update call to decode_options. * toplev.h (read_integral_parameter): Remove. * varasm.c (elf_record_gcc_switches): Don't handle holding back names. c-family: * c-common.c (parse_optimize_options): Update call to decode_options. fortran: * options.c (gfc_handle_option): Don't handle N_OPTS. testsuite: * gcc.dg/opts-2.c: New test. From-SVN: r161053
2010-06-12opts-common.c: Include options.h.Joseph Myers1-1/+33
* opts-common.c: Include options.h. (integral_argument): Move from opts.c. (decode_cmdline_option): New. Based on read_cmdline_option. * opts.c (integral_argument): Move to opts-common.c. (read_cmdline_option): Move most contents to decode_cmdline_option. Use %qs in diagnostics. * opts.h (CL_ERR_DISABLED, CL_ERR_MISSING_ARG, CL_ERR_WRONG_LANG, CL_ERR_UINT_ARG, struct cl_decoded_option, integral_argument, decode_cmdline_option): New. testsuite: * gcc.dg/funroll-loops-all.c: Update expected error. From-SVN: r160639
2010-05-06re PR c/40989 (-Werror= and #pragma diagnostics do not work with group flags)Manuel López-Ibáñez1-2/+3
2010-05-06 Manuel López-Ibáñez <manu@gcc.gnu.org> PR 40989 * doc/invoke.texi (Wimplicit): Document as C only. * opts.c (common_handle_option): Add argument kind. (handle_option): Rename as read_cmdline_option. Factor out code to... (handle_option): ... here. New. (handle_options): Rename as read_cmdline_options. (decode_options): Update call. (set_option): Use option index instead of option pointer. Classify diagnostics correctly. (enable_warning_as_error): Call handle_option. * opts.h (set_option): Update declaration. (handle_option): Declare. * langhooks.h (struct lang_hooks): Add argument kind to handle_option. * c.opt (Wimplicit,Wimplicit-int): Initialize to -1. * c-opts.c (set_Wimplicit): Delete. (c_family_lang_mask): New static constant. (c_common_handle_option): Add argument kind. Use handle_option instead of set_Wimplicit. (c_common_post_options): warn_implicit and warn_implicit_int are disabled by default. * c-common.c (warn_implicit): Do not define here. * c-common.h (warn_implicit): Do not declare here. (c_common_handle_option): Update declaration. * lto-opts.c (lto_reissue_options): Update call to set_option. java/ * lang.c (java_handle_option): Add argument kind. fortran/ * options.c (gfc_handle_option): Add argument kind. * gfortran.h (gfc_handle_option): Update declaration. ada/ * gcc-interface/misc.c (gnat_handle_option): Add argument kind. testsuite/ * gcc.dg/pr40989.c: New. From-SVN: r159102
2010-04-07diagnostic.h (diagnostic_override_option_index): New macro to set a ↵Simon Baldwin1-0/+1
diagnostic's option_index. * diagnostic.h (diagnostic_override_option_index): New macro to set a diagnostic's option_index. * c-tree.h (c_cpp_error): Add warning reason argument. * opts.c (_warning_as_error_callback): New. (register_warning_as_error_callback): Store callback for warnings enabled via enable_warning_as_error. (enable_warning_as_error): Call callback, minor code tidy. * opts.h (register_warning_as_error_callback): Declare. * c-opts.c (warning_as_error_callback): New, set cpp_opts flag in response to -Werror=. (c_common_init_options): Register warning_as_error_callback in opts.c. * common.opt: Add -Wno-cpp option. * c-common.c (struct reason_option_codes_t): Map cpp warning reason codes to gcc option indexes. * (c_option_controlling_cpp_error): New function, lookup the gcc option index for a cpp warning reason code. * (c_cpp_error): Add warning reason argument, call c_option_controlling_cpp_error for diagnostic_override_option_index. * doc/invoke.texi: Document -Wno-cpp. * cpp.c (cb_cpp_error): Add warning reason argument, set a value for diagnostic_override_option_index if CPP_W_WARNING_DIRECTIVE. * directives.c (do_diagnostic): Add warning reason argument, call appropriate error reporting function for code. (directive_diagnostics): Call specific warning functions with warning reason where appropriate. (do_error, do_warning, do_pragma_dependency): Add warning reason argument to do_diagnostic calls. * macro.c (_cpp_warn_if_unused_macro, enter_macro_context, _cpp_create_definition): Call specific warning functions with warning reason where appropriate. * Makefile.in: Add new diagnostic functions to gettext translations. * include/cpplib.h (struct cpp_callbacks): Add warning reason code to error callback. (CPP_DL_WARNING, CPP_DL_WARNING_SYSHDR, CPP_DL_PEDWARN, CPP_DL_ERROR, CPP_DL_ICE, CPP_DL_NOTE, CPP_DL_FATAL): Replace macros with enums. (CPP_W_NONE, CPP_W_DEPRECATED, CPP_W_COMMENTS, CPP_W_MISSING_INCLUDE_DIRS, CPP_W_TRIGRAPHS, CPP_W_MULTICHAR, CPP_W_TRADITIONAL, CPP_W_LONG_LONG, CPP_W_ENDIF_LABELS, CPP_W_NUM_SIGN_CHANGE, CPP_W_VARIADIC_MACROS, CPP_W_BUILTIN_MACRO_REDEFINED, CPP_W_DOLLARS, CPP_W_UNDEF, CPP_W_UNUSED_MACROS, CPP_W_CXX_OPERATOR_NAMES, CPP_W_NORMALIZE, CPP_W_INVALID_PCH, CPP_W_WARNING_DIRECTIVE): New enums for cpp warning reason codes. (cpp_warning, cpp_pedwarning, cpp_warning_syshdr, cpp_warning_with_line, cpp_pedwarning_with_line, cpp_warning_with_line_syshdr): New specific error reporting functions. * pch.c (cpp_valid_state): Call specific warning functions with warning reason where appropriate. * errors.c (cpp_diagnostic, cpp_diagnostic_with_line): New central diagnostic handlers. (cpp_warning, cpp_pedwarning, cpp_warning_syshdr, cpp_warning_with_line, cpp_pedwarning_with_line, cpp_warning_with_line_syshdr): New specific error reporting functions. * expr.c (cpp_classify_number, eval_token, num_unary_op): Call specific warning functions with warning reason where appropriate. * lex.c (_cpp_process_line_notes, _cpp_skip_block_comment, warn_about_normalization, lex_identifier_intern, lex_identifier, _cpp_lex_direct): Ditto. * charset.c (_cpp_valid_ucn, convert_hex, convert_escape, narrow_str_to_charconst): Ditto. * gcc.dg/cpp/warn-undef-2.c: New. * gcc.dg/cpp/warn-traditional-2.c: New. * gcc.dg/cpp/warn-comments-2.c: New. * gcc.dg/cpp/warning-directive-1.c: New. * gcc.dg/cpp/warn-long-long.c: New. * gcc.dg/cpp/warn-traditional.c: New. * gcc.dg/cpp/warn-variadic-2.c: New. * gcc.dg/cpp/warn-undef.c: New. * gcc.dg/cpp/warn-normalized-1.c: New. * gcc.dg/cpp/warning-directive-2.c: New. * gcc.dg/cpp/warn-long-long-2.c: New. * gcc.dg/cpp/warn-variadic.c: New. * gcc.dg/cpp/warn-normalized-2.c: New. * gcc.dg/cpp/warning-directive-3.c: New. * gcc.dg/cpp/warn-deprecated-2.c: New. * gcc.dg/cpp/warn-trigraphs-1.c: New. * gcc.dg/cpp/warn-multichar-2.c: New. * gcc.dg/cpp/warn-normalized-3.c: New. * gcc.dg/cpp/warning-directive-4.c: New. * gcc.dg/cpp/warn-unused-macros.c: New. * gcc.dg/cpp/warn-trigraphs-2.c: New. * gcc.dg/cpp/warn-cxx-compat-2.c: New. * gcc.dg/cpp/warn-cxx-compat.c: New. * gcc.dg/cpp/warn-redefined.c: New. * gcc.dg/cpp/warn-trigraphs-3.c: New. * gcc.dg/cpp/warn-unused-macros-2.c: New. * gcc.dg/cpp/warn-deprecated.c: New. * gcc.dg/cpp/warn-trigraphs-4.c: New. * gcc.dg/cpp/warn-redefined-2.c: New. * gcc.dg/cpp/warn-comments.c: New. * gcc.dg/cpp/warn-multichar.c: New. * g++.dg/cpp/warning-directive-1.C: New. * g++.dg/cpp/warning-directive-2.C: New. * g++.dg/cpp/warning-directive-3.C: New. * g++.dg/cpp/warning-directive-4.C: New. * gfortran.dg/warning-directive-1.F90: New. * gfortran.dg/warning-directive-3.F90: New. * gfortran.dg/warning-directive-2.F90: New. * gfortran.dg/warning-directive-4.F90: New. From-SVN: r158079
2009-10-13re PR lto/41565 (-m32 causes an ICE when the object files were compiled with ↵Richard Guenther1-0/+1
64bit) 2009-10-13 Richard Guenther <rguenther@suse.de> PR lto/41565 * opts.c (handle_option): Split out code to handle setting the options flag var ... (set_option): ... here. * opts.h (set_option): Declare. * lto-opts.c (register_user_option_p): Include -fexceptions and all position independent code variants. (handle_common_option): Remove. (lto_reissue_options): Use set_option. From-SVN: r152705
2009-02-20Update Copyright years for files modified in 2008 and/or 2009.Jakub Jelinek1-1/+2
From-SVN: r144324
2008-10-07re PR middle-end/37576 (-v --help ICEs)Jakub Jelinek1-8/+8
PR middle-end/37576 * opts.h (CL_SAVE): Move up to flags range. (CL_PARAMS, CL_WARNING, CL_OPTIMIZATION, CL_TARGET, CL_COMMON): Renumber. (CL_MIN_OPTION_CLASS): Set to CL_PARAMS. * opts.c (common_handle_option): Revert last change. From-SVN: r140955
2008-08-30Change attribute((option(...))) to attribute((target(...))); Do not allocate ↵Michael Meissner1-1/+2
tree nodes on x86 for builtins until we generate code for the ISA; Delete hot/cold functions changing optimization; Make C++ support target specific functions; Add #pragma GCC {push_options,pop_options,reset_options} instead of #pragma GCC {target,optimize} {push,reset,pop} From-SVN: r139812
2008-07-25cgraphbuild.c (record_reference): Drop non-unit-at-a-time code.Jan Hubicka1-1/+0
* cgraphbuild.c (record_reference): Drop non-unit-at-a-time code. (build_cgraph_edges): Likewise. * cgraph.c (cgraph_node): Do not update assembler hash. (cgraph_remove_node): Drop non-unit-at-a-time code. * tree-pass.h (pass_O0_always_inline): Remove. * ipa-reference.c (gate_reference): Remove unit-at-a-time check. * toplev.c (process_options): Flag unit-at-a-time does not imply no section anchors. * cgraphunit.c: Update comments. (decide_is_function_needed): Drop non-unit-at-a-time mode. (cgraph_assemble_pending_functions): Remove. (cgraph_reset_node): Drop non-unit-at-a-time code. (cgraph_finalize_function): Likewise. (cgraph_analyze_function): Likewise. (cgraph_finalize_compilation_unit): Likewise. (cgraph_expand_function): Likewise. (cgraph_optimize): Likesise. (save_inline_function_body): Likewise. * ipa-pure-const.c (gate_pure_const): Drop flag_unit_at_a_time check. * tree-ssa-alias.c (maybe_be_aliased): Likewise. * ipa-inline.c: Update comments. (enum inlining_mode): remove INLINE_SPEED. (cgraph_clone_inlined_nodes): Drop unit-at-a-time check. (cgraph_mark_inline_edge): Likewise. (try_inline): Likewise. (cgraph_decide_inlining_incrementally): Likewise. (cgraph_gate_inlining): Remove. (cgraph_early_inlining): Remove flag_unit_at_a_time checks. (cgraph_gate_early_inlining): Likewise. (gate_inline_passes): Remove. (pass_inline_parameters, pass_ipa_inline): Remove gates. (cgraph_gate_O0_always_inline, cgraph_O0_always_inline, pass_O0_always_inline): Remove. * c-pch.c (c_pch_matching): Remove -funit-at-a-time. * dwarf2out.c (reference_to_unused): Remove flag_unit_at_a_time check. * opts.c (no_unit_at_a_time_default): Remove. (decode_options): Remove flag_unit_at_a_time reset and warning. * opts.h (no_unit_at_a_time_default): Remove. * c-decl.c (diagnose_mismatched_decls): Do not require inline keyword early in GNU dialect. (merge_decls): Update comment; drop unit-at-a-time check. (finish_decl): Likewise. (grok_declaration): Remove flag_inline_trees code. (finish_functions): Return on function returning non-void on all statics. * ipa-tye-escape.c (gate_type_escape_vars): Remove. * cfgexpand.c (expand_one_static_var): Remove. (expand_one_var): Remove expand_one_static_var call. (expand_used_vars_for_block): Remove flag_unit_a_time check. * c-opts.c (c_common_post_options): Remove flag_inline_trees code and flag_unit_at_a-time compatibility checks. * varasm.c (assemble_alias): Remove flag_unit_at_a_time check. * tree-inline.c (flag_inline_trees): Remove. (inlinable_function_p): Don't check it. (expand_call_inline): Remove non-unit-at-a-time code. * tree-inline.h (flag_inline_trees): Remove. * tree-optimize.c (execute_early_local_optimizations): Remove unit-at-a-time checks. (tree_rest_of_compilation): Likewise. * combine.c (setup_incoming_promotions): Likewise. * tree-profile.c (tree_gen_ic_func_profiler): Likewise. * tree-ssa-structalias.c (delete_points_to_sets): Likewise. * passes.c (pass_inline_parameters): Update comments; remove O0_alwaysinline pass. (execute_one_ipa_transform_pass): Do not reset in_gimple_form. (execute_one_pass): Likewise. * i386.c (ix86_function_regparm): Remove unit-at-a-time check. (ix86_function_sseregparm): Likewise. * arm.c (arm_function_in_section_p): Likewise. * bfin.c (bfin_load_pic_reg, bfin_function_ok_for_sibcall): Likewise. * varpool.c: Update comments. (decide_is_variable_needed): Remove unit-at-a-time checks. (varpool_finalize_decl): Likewise. * ada/utils.c (end_subprog_body): Remove inline trees check. * ada/misc.c (gnat_post_options): Do not set flag_inline_trees. * fortran/options.c (gfc_post_options): Remove flag_unline_trees code. * gcc.dg/winline-4.c: Remove. * gcc.dg/pch/valid-3.hs: Remove. * gcc.dg/pch/valid-3.c: Remove. * g++.old-deja/g++.brendan/crash52.C: Accept returning void warning * g++.old-deja/g++.jason/report.C: Likewise. * testsuite/g++.dg/warn/pr23075.C: We get returning void warning instead of control flow warning. * cp/decl.c (duplicate_decls): Update comment and unit-at-a-time. (grogfndecl): Drop flag_inline_trees code. * cp/pt.c (instantiate_decl): Drop flag_iline_trees code. * cp/lex.c (cxx_init): Do not set unit-at-a-time. * java/decl.c: Include cgraph.h (end_java_method): Remove non-unit-at-a-time code. (java_mark_decl_local): Likewise; sanity check that we don't touch finalized nodes. From-SVN: r138140
2008-02-25re PR other/28322 (GCC new warnings and compatibility)Manuel López-Ibáñez1-0/+1
2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org> PR 28322 * toplev.c (toplev_main): If there are warnings or error, print errors for ignored options. * opts.c (ignored_options): New static variable. (postpone_unknown_option_error): New. (print_ignored_options): New. (handle_option): Postpone errors for unknown -Wno-* options. * opts.h (print_ignored_options): Declare. testsuite/ * gcc.dg/pr28322.c: New. * gcc.dg/pr28322-2.c: New. * lib/prune.exp: Ignore "At top level" even if there is no ':' preceding it. From-SVN: r132648
2007-07-26Change copyright header to refer to version 3 of the GNU General Public ↵Nick Clifton1-4/+3
License and to point readers at the COPYING3 file and the FSF's license web page. From-SVN: r126948
2007-02-15re PR c/26494 (-pedantic-errors can be overridden by -W*)Manuel López-Ibáñez1-0/+2
2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org> PR c/26494 * doc/invoke.texi (Warning Options): Remove -Werror-implicit-function-declaration. (Wimplicit-function-declaration): Update description. * opts.c (common_handle_option): Move handling of -Werror=* to... (enable_warning_as_error): ...here. * opts.h (enable_warning_as_error): Declare. * c-decl.c (implicit_decl_warning): Unless -Wno-implicit-function-declaration is given, emit a pedwarn if -std=c99 or emit a warning if -Wimplicit-function-declaration. * c.opt (Wimplicit-function-declaration): Replace mesg_implicit_function_declaration with warn_implicit_function_declaration. * c-opts.c (c_common_handle_option): -Werror-implicit-function-declaration is exactly equal as -Werror=implicit-function-declaration. (set_Wimplicit): Replace mesg_implicit_function_declaration with warn_implicit_function_declaration. (c_common_post_options): -Wimplict-function-declaration is enabled by default by -std=c99, otherwise is disabled by default. * c-objc-common.c (c_objc_common_init): Remove flawed logic. testsuite/ * gcc.dg/Wimplicit-function-declaration-c89.c: New. * gcc.dg/Wimplicit-function-declaration-c89-default.c: New. * gcc.dg/Wimplicit-function-declaration-c89-pedantic.c: New. * gcc.dg/Wimplicit-function-declaration-c99.c: New. * gcc.dg/Wimplicit-function-declaration-c99-pedantic.c: New. * gcc.dg/Werror-implicit-function-declaration.c: New. From-SVN: r122017
2007-02-12invoke.texi (Overall Options): Document --help=.Nick Clifton1-10/+23
* doc/invoke.texi (Overall Options): Document --help=. * gcc.c (target_help_flag): Rename to print_subprocess_flag. (cc1_options): Pass --help= on to cc1. (display_help): Add description of --help=. (process_command): Add code to handle --help=. Allow translated --help and --target-help switches to be passed on to compiler sub-process. (main): Remove unused if statement. * opts.c (columns): Remove. (LEFT_COLUMN): Define. (wrap_help): Add columns argument. (print_filtered_help): Change parameters to be an include bitmask, an exclude bitmask, an any bitmask and the column width. Move the code to display the params list here. Add code to display the status of options rather than their descriptions if the quiet flag is not active. (print_specific_help): Change parameters to be an include bitmask, an exclude bitmask and an any bitmask. Move code to look up the column width here. Decide upon the title for an options listing. (common_handle_options): Add code to handle --help=. Adapt code for --help and --target-help to use the revised form of the print_specific_help function. (print_help): Delete. (print_param_help): Delete. (print_switch): Delete. * opts.h (cl_lang_count): Add prototype. (CL_PARAMS, CL_WARNING, CL_OPTIMIZATION, CL_MIN_OPTION_CLASS, CL_MAX_OPTION_CLASS): New defines. * optc-gen.awk: Add construction of cl_lang_count. * c.opt: Add Warning attribute to warning options and Optimization attribute to optimization options. * common.opt: Likewise. Add --help=. Add -fhelp and -ftarget-help as aliases for the transformed --help and --target-help options. * opt-functions.awk: Add code to handle Warning and Optimization attributes. From-SVN: r121849
2006-05-16re PR target/26885 (-m64 -m32 no longer creates 32-bit object)H.J. Lu1-0/+3
gcc/ 2006-05-16 H.J. Lu <hongjiu.lu@intel.com> PR driver/26885 * Makefile.in (GCC_OBJS): New. (OBJS-common): Add opts-common.o. (xgcc$(exeext)): Replace gcc.o with $(GCC_OBJS). (cpp$(exeext)): Likewise. (gcc.o): Also depend on opts.h. (opts-common.o): New. * common.opt (gcoff): Add Negative(gdwarf-2). (gdwarf-2): Add Negative(gstabs). (gstabs): Add Negative(gstabs+). (gstabs+): Add Negative(gvms). (gvms): Add Negative(gxcoff). (gxcoff): Add Negative(gxcoff+). (gxcoff+): Add Negative(gcoff). * config/i386/i386.opt (m32): Add Negative(m64). (m64): Add Negative(m32). * doc/options.texi: Document the Negative option. * gcc.c: Include "opts.h". (main): Call prune_options after expandargv. * optc-gen.awk: Generate common declarations for all flag variables in options.c. Output the neg_index field. * opts.c (find_opt): Moved to ... * opts-common.c: Here. New file. * opts.h (cl_option): Add a neg_index field. (find_opt): New. (prune_options): Likewise. gcc/cp/ 2006-05-16 H.J. Lu <hongjiu.lu@intel.com> PR driver/26885 * Make-lang.in (GXX_OBJS): Replace gcc.o with $(GCC_OBJS). gcc/fortran/ 2006-05-16 H.J. Lu <hongjiu.lu@intel.com> PR driver/26885 * Make-lang.in (GFORTRAN_D_OBJS): Replace gcc.o with $(GCC_OBJS). gcc/java/ 2006-05-16 H.J. Lu <hongjiu.lu@intel.com> PR driver/26885 * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with $(GCC_OBJS). gcc/treelang/ 2006-05-16 H.J. Lu <hongjiu.lu@intel.com> PR driver/26885 * Make-lang.in (gtreelang$(exeext)): Replace gcc.o with $(GCC_OBJS). From-SVN: r113824
2006-02-01opts.c (no_unit_at_a_time_default): New global variable.Jan Hubicka1-0/+1
2006-02-01 Jan Hubicka <jh@suse.cz> * opts.c (no_unit_at_a_time_default): New global variable. (decode_options): Use it. * opts.h (no_unit_at_a_time_default): Declare. java/ * decl.c (end_java_method): Kill hack disabling unit-at-a-time. * lang.c (java_init_options): Set no_unit_at_a_time_default. From-SVN: r110479
2005-06-25Update FSF address.Kelley Cook1-2/+2
From-SVN: r101317
2005-06-01system.h (TARGET_OPTIONS, [...]): Poison.Richard Sandiford1-1/+0
* system.h (TARGET_OPTIONS, TARGET_SWITCHES): Poison. * opts.h (print_filtered_help): Delete. * opts.c (handle_option, decode_options): Remove calls to set_target_switch. (print_target_help): New function. (common_option, print_help): Call print_target_help instead of display_target_options. (print_filtered_help): Make static. * toplev.h (display_target_options, set_target_switch): Delete. * toplev.c (target_switches, target_options, display_target_options) (set_target_switch): Delete. (print_switch_values): Remove handling of TARGET_SWITCHES and TARGET_OPTIONS. (default_get_pch_validity): Likewise. Only treat target_flags specially if targetm.check_pch_target_flags is nonnull. (pch_option_mismatch): New function. (default_pch_valid_p): Use it. Remove handling of TARGET_SWITCHES and TARGET_OPTIONS. Only treat target_flags specially if targetm.check_pch_target_flags is nonnull. * config/ia64/ia64.c (ia64_override_options): Don't mention TARGET_OPTIONS in comment. * config/m68k/m68k-none.h (CC1_SPEC): Likewise. * doc/invoke.texi: Remove a reference to TARGET_SWITCHES. * doc/tm.texi (TARGET_DEFAULT_TARGET_FLAGS): Don't mention the interaction with TARGET_SWITCHES. (TARGET_@var{featurename}, TARGET_SWITCHES, TARGET_OPTIONS): Delete. From-SVN: r100432
2005-06-01opts.h (cl_option_state): New structure.Richard Sandiford1-0/+9
* opts.h (cl_option_state): New structure. (get_option_state): Declare. * opts.c (get_option_state): New function. * toplev.c (option_affects_pch_p): New function. (default_get_pch_validity): Store the state of all options for which option_affects_pch_p returns true. (default_pch_valid_p): Check the state of those options here. Only check target_flags separately if targetm.check_pch_target_Flags is nonnull or if TARGET_SWITCHES is defined. From-SVN: r100430
2005-05-26opt-functions.awk (var_type): New function.Richard Sandiford1-4/+8
* opt-functions.awk (var_type): New function. (var_set): Use CLVC_STRING if var_type returns "const char *". * opth-gen.awk: Use var_type to find out the types of variables. Don't print comments above each "extern" definition. * optc-gen.awk: Use var_type in the same way. * opts.h (cl_var_cond): Rename to... (cl_var_type): ...this. Add CLVC_STRING. (cl_option): Make "flag_var" a "void *" pointer. Replace "var_cond" with "var_type". * opts.c (handle_option, option_enabled): Update after above name change. Cast flag_var before using it. Handle CLVC_STRING. * config/alpha/alpha.h (alpha_tls_size): Delete. * config/alpha/alpha.c (alpha_tls_size, alpha_cpu_string) (alpha_tune_string, alpha_tp_string, alpha_fprm_string) (alpha_fptm_string, alpha_mlat_string): Delete. (alpha_handle_option): Don't set the above variables here. Use the integer argument to check the validity of -mtls-size=. * config/alpha/alpha.opt (mcpu=, mtune=, mfp-rounding-mode=) (mfp-trap-mode=, mtrap-precision=, mmemory-latency=): Add Var()s. (mtls-size=): Likewise. Convert to a UInteger and initialize the variable to 32. * config/arc/arc.c (arc_cpu_string, arc_text_string) (arc_data_string, arc_rodata_string): Delete. (arc_handle_option): Don't set the above variables here. * config/arc/arc.opt (mcpu=, mtext=, mdata=, mrodata=): Add Var()s and initialize them. * config/arm/arm.c (target_fpu_name, target_fpe_name) (target_float_abi_name, target_abi_name, structure_size_string) (arm_pic_register_string): Delete. (arm_handle_option): Don't set the above variables here, except in the handling of -mhard-float and -msoft-float. * config/arm/arm.opt (mabi=, mfloat-abi=, mfp=, mfpe=, mfpu=) (mpic-register=, mstructure-size-boundary=): Add Var()s. * config/avr/avr.c (avr_init_stack, avr_mcu_name, TARGET_HANDLE_OPTION) (avr_handle_option): Delete. * config/avr/avr.opt (mmcu=, minit-stack=): Add Var()s and initialize them. * config/bfin/bfin.c (bfin_library_id): Delete. (bfin_handle_option): Don't set it. * config/bfin/bfin.opt (mshared-library-id=): Add Var(). * config/c4x/c4x.h (c4x_rpts_cycles): Delete. * config/c4x/c4x.c (c4x_rpts_cycles): Delete. (c4x_handle_option): Don't set c4x_rpts_cycles here. * config/c4x/c4x.opt (mrpts=): Add Var(). * config/cris/aout.h (CRIS_SUBTARGET_HANDLE_OPTION): Don't set cris_elinux_stacksize_str here. * config/cris/aout.opt (melinux-stacksize=): Add Var(). * config/cris/cris.h (cris_max_stackframe_str, cris_cpu_str) (cris_tune_str, cris_elinux_stacksize_str): Delete. * config/cris/cris.c (cris_max_stackframe_str, cris_cpu_str) (cris_tune_str, cris_elinux_stacksize_str): Delete. (cris_handle_option): Don't set the above variables here. * config/cris/cris.opt (mcpu=, march=, mtune=, mmax-stackframe=) (max-stackframe=): Add Var()s. * config/i386/i386.h (ix86_tune_string, ix86_arch_string): Delete. * config/i386/i386.c (ix86_cmodel_string, ix86_asm_string) (ix86_tls_dialect_string, ix86_tune_string, ix86_arch_string) (ix86_fpmath_string, ix86_regparm_string, ix86_align_loops_string) (ix86_align_jumps_string, ix86_preferred_stack_boundary_string) (ix86_branch_cost_string, ix86_align_funcs_string): Delete. (ix86_handle_option): Don't set the above variables here. * config/i386/i386.opt (malign-functions=, malign-jumps=) (malign-loops=, march=, masm=, mbranch-cost=, mcmodel=, mfpmath=) (mpreferred-stack-boundary=, mregparm=, mtls-dialect=, mtune=): Add Var()s. * config/ia64/ia64.h (ia64_tls_size): Delete. * config/ia64/ia64.c (ia64_tls_size): Delete. (ia64_handle_option): Treat -mtls-size= as a UInteger option, reading the integer argument from the "value" parameter. Don't set ia64_tls_size here. * config/ia64/ia64.opt (mtls-size=): Turn into a UInteger option. Add Var() and Init(). * config/m32r/m32r.h (m32r_cache_flush_func): Delete. (m32r_cache_flush_trap): Delete. * config/m32r/m32r.c (m32r_cache_flush_func): Delete. (m32r_cache_flush_trap): Delete. (m32r_handle_option): Don't set the above variables when handling -mflush-func= and -mflush-trap=. * config/m32r/m32r.opt (-mflush-func=, -mflush-trap=): Add Var()s and Init()s. * config/mips/mips.h (mips_cache_flush_func): Delete. * config/mips/mips.c (mips_arch_string, mips_tune_string) (mips_cache_flush_func): Delete. (mips_handle_option): Don't set the above variables when handling -march=, -mtune= and -mflush-func=. * config/mips/mips.opt (march=, mflush-func=, mtune=): Add Var()s. * config/s390/s390.c (s390_arch_string): Delete. (s390_handle_option): Don't set it here. * config/s390/s390.opt (march=): Add Var(). * config/sparc/sparc.h (sparc_cmodel_string): Delete. * config/sparc/sparc.c (sparc_cmodel_string): Delete. (sparc_handle_option): Don't set it here. * config/sparc/sparc.opt (mcmodel=): Add Var(). From-SVN: r100185
2005-05-16Makefile.in (options.c): Tell optc-gen.awk to include config.h, system.h, ↵Richard Sandiford1-0/+1
coretypes.h and tm.h. * Makefile.in (options.c): Tell optc-gen.awk to include config.h, system.h, coretypes.h and tm.h. (options.o): Update dependencies accordingly. * optc-gen.awk: Allow header_name to be a list of filenames. Handle the "Condition" flag. * opts.h (CL_DISABLED): New flag. * opts.c (handle_option): Print an error for CL_DISABLED options. * doc/options.texi: Document the "Condition" option flag. From-SVN: r99774
2005-05-03c-decl.c (store_parm_decls_oldstyle): Let diagnostic machinery decide if the ↵DJ Delorie1-1/+1
warning will be printed. * c-decl.c (store_parm_decls_oldstyle): Let diagnostic machinery decide if the warning will be printed. * calls.c (expand_call): Likewise. * function.c (init-function_start): Likewise. * common.opt (-fdiagnostics-show-option): New. * opts.c (option_enabled): Accept the option index instead of a pointer to the option descriptor. * opts.h (option_enabled): Likewise. * toplev.c (print_switch_values): Pass option index, not option descriptor. * diagnostic.h (diagnostic_info): Add option_index. * diagnostic.c: Include opts.h. (diagnostic_set_info): Initialize option_index. (diagnostic_report_diagnostic): Amend option name if appropriate. (warning): Check to see if the specified warning is enabled. Store option index. * doc/invoke.texi (-fdiagnostics-show-options): Document. From-SVN: r99169
2005-03-18hooks.c, [...]: Update copyright.Kazu Hirata1-1/+1
* hooks.c, hooks.h, intl.c, opts.h, prefix.c, tree-gimple.c, config/alpha/ev4.md, config/alpha/ev5.md, config/alpha/ev6.md, config/alpha/freebsd.h, config/alpha/linux.h, config/alpha/netbsd.h, config/alpha/osf5.h, config/alpha/vms.h, config/arc/arc.c, config/arc/arc.h, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/h8300/h8300.h, config/ia64/unwind-ia64.c, doc/cppopts.texi: Update copyright. From-SVN: r96686
2005-03-14config.gcc (extra_options): New variable for listing option files.Richard Sandiford1-3/+21
* config.gcc (extra_options): New variable for listing option files. Add ${cpu_type}/${cpu_type}.opt to it if that file exists. * configure.ac (extra_opt_files): New AC_SUBST variable. (tm_file_list, tm_include_list): Include options.h first. * configure: Regenerate. * Makefile.in (extra_opt_files, ALL_OPT_FILES): New variables. (s-options): Use $(ALL_OPT_FILES) instead of $(lang_opt_files) (s-options-h): New rule. (options.h): Depend on it. (TEXI_GCCINT_FILES): Add options.texi. * hooks.h (hook_bool_size_t_constcharptr_int_true): Declare. * hooks.c (hook_bool_size_t_constcharptr_int_true): New function. * target.h (gcc_target): Add default_target_flags and handle_option. * target-def.h (TARGET_DEFAULT_TARGET_FLAGS) (TARGET_HANDLE_OPTION): New macros. (TARGET_INITIALIZER): Include them. * opt-functions.awk (opt_args, nth_arg): New functions. (switch_flags): Handle the "Target" flag. (var_args): Delete. (var_name): Use opt_args and nth_arg. (var_set, var_ref): Likewise. Handle "Mask" and "InverseMask". * opth-gen.awk: Declare target_flags. Declare MASK_* and TARGET_* macros for the "Mask" and "InverseMask" options. * opts.h (cl_var_cond): New enum. (cl_option): Replace the "has_set_value" and "set_value" fields with "var_cond" and "var_value". (CL_TARGET): New macro. (option_enabled, print_filtered_help): Declare. (decode_options): Move definition. * opts.c (handle_option): Search for the original option before removing any "no-" prefix. Handle CL_TARGET. Adjust for the new var_cond and var_value fields. Use targetm.handle_option to handle target options. (decode_options): Set target_flags to targetm.default_target_flags. (print_filtered_help): Make global. Handle CL_TARGET. (option_enabled): New function. * toplev.c (target_switches): Guard with #ifdef TARGET_SWITCHES. (display_target_options, set_target_switch, print_switch_values) (default_pch_valid_p): Guard uses of target_switches with #ifdef TARGET_SWITCHES. Also... (display_target_options): Display the CL_TARGET entries in cl_options. (set_target_option): Don't complain about the "" option when TARGET_SWITCHES is undefined. (print_switch_values): Use option_enabled. (default_pch_valid_p): Check cl_options[] when looking for something that has changed the value of target_flags. * c.opt: Remove documentation from top of file. * doc/gccint.texi: Add an "Options" chapter. Include options.texi. * doc/sourecebuild.texi: Refer to the new options documentation instead of c.opt. Document machine-specific .opt files. * doc/tm.texi (target_flags): Say that this variable is declared by options.h. (TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION): Document. (TARGET_SWITCHES, TARGET_OPTIONS): Refer to the option files as an alternative. * doc/options.texi: New file. From-SVN: r96448
2004-11-18opts.h (add_input_filename): Remove extern declaration.Ben Elliston1-1/+0
* opts.h (add_input_filename): Remove extern declaration. * opts.c (add_input_filename): Make static. From-SVN: r90850
2004-10-15bitmap.c, [...]: Update copyright.Kazu Hirata1-1/+1
* bitmap.c, bitmap.h, builtin-attrs.def, cfglayout.h, collect2.h, conflict.c, coretypes.h, coverage.h, errors.h, gcc.h, gcov-dump.c, gen-protos.c, gencheck.c, gencodes.c, genconstants.c, gengenrtl.c, genmodes.c, genpeep.c, gensupport.h, graph.h, gthr-gnat.c, gthr-gnat.h, gthr-posix.c, gthr-posix.h, hard-reg-set.h, hwint.h, integrate.h, libgcc2.c, lists.c, machmode.def, mips-tdump.c, opts.h, params.c, predict.def, predict.h, protoize.c, reload.h, resource.h, rtl-error.c, sbitmap.c, sbitmap.h, sreal.c, tlink.c, tree-dump.h, tree-inline.h, unwind-dw2-fde.c, unwind-dw2.c, unwind-sjlj.c, value-prof.h: Update copyright. From-SVN: r89097
2004-07-08c-decl.c (pop_scope): Do not set DECL_CONTEXT on file-scope decls when...Zack Weinberg1-4/+0
* c-decl.c (pop_scope): Do not set DECL_CONTEXT on file-scope decls when there is only one input translation unit. * langhooks.c (lhd_set_decl_assembler_name): Partially revert change of 2004-07-05; do not treat declarations with DECL_CONTEXT a TRANSLATION_UNIT_DECL specially. * opts.c (cur_in_fname): Delete. * opts.h: Likewise. * tree.c: Revert changes of 2004-07-05; no special treatment for TRANSLATION_UNIT_DECLs. * Makefile.in (tree.o): Update dependencies. From-SVN: r84306
2004-07-05langhooks.c: Don't include gt-langhooks.h.Zack Weinberg1-0/+4
* langhooks.c: Don't include gt-langhooks.h. (var_labelno): Delete. (lhd_set_decl_assembler_name): Do not append a distinguishing number to file-scope internal-linkage declarations for the first input file, even if they have DECL_CONTEXT set. Use DECL_UID of the declaration itself (if at block scope), or its containing TRANSLATION_UNIT_DECL (if at file scope) for the distinguishing number. * opts.c (cur_in_fname): New global. * opts.h: Declare it. * tree.c: Include opts.h. (make_node_stat): If creating a TRANSLATION_UNIT_DECL, give it DECL_UID equal to cur_in_fname. (copy_node_stat): Do not change DECL_UID when copying a TRANSLATION_UNIT_DECL. (build_common_tree_nodes): Adjust next_decl_uid to reserve the range 0 .. num_in_fnames-1 for TRANSLATION_UNIT_DECLs. * c-decl.c (c_static_assembler_name): Delete. * c-tree.h (c_static_assembler_name): Delete prototype. * c-lang.c, objc/objc-lang.c: Don't override LANG_HOOKS_SET_DECL_ASSEMBLER_NAME. * Makefile.in (tree.o): Update dependencies. (GTFILES): Remove langhooks.c. cp: * decl.c (cxx_init_decl_processing): Call build_common_tree_nodes before creating the global NAMESPACE_DECL. From-SVN: r84123
2004-06-14Makefile.in (FLAGS_H): New.Zdenek Dvorak1-0/+4
* Makefile.in (FLAGS_H): New. (flags.h): Replace by FLAGS_H. * c.opt: Document Var, VarExists, Init and Report attributes. * common.opt: Fill the values of the attributes. * diagnostic.c (flag_fatal_errors): Do not define. * except.c (flag_non_call_exceptions): Do not define. * flags.h: Include options.h. Remove declarations conflicting with the automatically defined ones. * opts.c: Remove automatically defined variables. (handle_option): Perform default initialization. (common_handle_option): Do not handle options covered by the default initialization. * opts.h (struct cl_option): Add flag_var, has_set_value and set_value fields. (CL_REPORT): New. * opts.sh: Generate variable declarations, handle CL_REPORT. * toplev.c: Remove automatically defined variables. (f_options): Removed. (print_switch_values): Use cl_options instead of f_options. * toplev.h (version_flag): Declaration removed. From-SVN: r83105
2003-08-19c-common.c: Fix comment formatting.Kazu Hirata1-2/+2
* c-common.c: Fix comment formatting. * c-common.h: Likewise. * c-decl.c: Likewise. * cppinit.c: Likewise. * cpplib.h: Likewise. * emit-rtl.c: Likewise. * input.h: Likewise. * line-map.h: Likewise. * opts.c: Likewise. * opts.h: Likewise. * simplify-rtx.c: Likewise. From-SVN: r70577
2003-07-31opts.c (in_fnames, [...]): Moved here from c-opts.Per Bothner1-0/+9
* 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-17c.opt: Document Uncodumented; use it.Neil Booth1-0/+1
* 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-08Makefile.in: Update.Neil Booth1-0/+1
* 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-02c-common.h (c_common_init_options): New prototype.Neil Booth1-1/+1
* 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-06-28Makefile.in: Update.Neil Booth1-2/+1
* 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-25c-opts.c (complain_wrong_lang, [...]): Remove.Neil Booth1-1/+3
* 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-22opts.c (find_opt): Fix to always guarantee a find of a switch with joined ↵Neil Booth1-0/+1
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-16c-opts.c (c_common_handle_option): s/on/value/.Neil Booth1-1/+3
* 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-15c-opts.c (lang_flags): Update for new spelling of flags.Neil Booth1-10/+1
* c-opts.c (lang_flags): Update for new spelling of flags. (write_langs): Similarly. * c.opt: Specify languages. * opts.h: Remove languages. * opts.sh: Recognise front-end defined languages. ada: * lang.opt: Declare Ada. * misc.c (gnat_init_options): Update. doc: * sourcebuild.texi: Update. f: * lang.opt: Declare F77. java: * lang.opt: Declare Java. * lang.c (java_init_options): Update. treelang: * lang.opt: Declare Treelang. Update. * tree1.c (treelang_init_options): Update. From-SVN: r67976
2003-06-14Makefile.in: Update to use common.opt and lang_opt_files.Neil Booth1-4/+10
* 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-08Makefile.in: Rename options.c and options.h to c-options.c and c-options.h.Neil Booth1-0/+10
* 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-07Makefile.in (OJBS, c-opts.o): Update.Neil Booth1-0/+34
* 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