summaryrefslogtreecommitdiff
path: root/gcc/opt-functions.awk
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright years.Jakub Jelinek2017-01-011-1/+1
| | | | From-SVN: r243994
* re PR other/78766 (GCC Awk scripts use the non-POSIX /^{/ regex)Jakub Jelinek2016-12-121-3/+3
| | | | | | | | PR other/78766 * opt-functions.awk (opt_args): Use [{] instead of { in regexps. Formatting fix. From-SVN: r243583
* Update copyright years.Jakub Jelinek2016-01-041-1/+1
| | | | From-SVN: r232055
* options.texi (EnabledBy): Document that the argument must be a Common option.Manuel López-Ibáñez2015-08-091-3/+3
| | | | | | | | | | | | | | | | | | | | | | | gcc/ChangeLog: 2015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org> * doc/options.texi (EnabledBy): Document that the argument must be a Common option. * doc/invoke.texi (Wnull-dereference): Move after Wnonnull. Not enabled by -Wall. * optc-gen.awk: Give nicer error messages. Detect if the argument of EnabledBy is not a Common option. * common.opt (Wnull-dereference): Not enabled by -Wall. * opt-functions.awk (lang_enabled_by): Nicer error messages. gcc/c-family/ChangeLog: 2015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org> * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy. From-SVN: r226751
* Update copyright years.Jakub Jelinek2015-01-051-1/+1
| | | | From-SVN: r219188
* opt-functions.awk (lang_enabled_by): Support || for enabled-by.Tobias Burnus2014-11-291-20/+24
| | | | | | | | | | | | | | | | | | | | | 2014-11-29 Tobias Burnus <burnus@net-b.de> Manuel López-Ibáñez <manu@gcc.gnu.org> gcc/ * opt-functions.awk (lang_enabled_by): Support || for enabled-by. * optc-gen.awk: Ditto. * doc/options.texi (LangEnabledBy, EnabledBy): Document the || syntax. gcc/fortran/ * lang.opt (Wtabs): Combine duplicated item into a single one using || for LangEnabledBy. Co-Authored-By: Manuel López-Ibáñez <manu@gcc.gnu.org> From-SVN: r218175
* opts.h (CL_PCH_IGNORE): Define.Joern Rennecke2014-03-031-0/+1
| | | | | | | | | | * opts.h (CL_PCH_IGNORE): Define. * targhooks.c (option_affects_pch_p): Return false for options that have CL_PCH_IGNORE set. * opt-functions.awk: Process PchIgnore. * doc/options.texi: Document PchIgnore. From-SVN: r208292
* Update copyright years in gcc/Richard Sandiford2014-01-021-1/+1
| | | | From-SVN: r206289
* Update copyright years in gcc/Richard Sandiford2013-01-101-2/+1
| | | | From-SVN: r195098
* Update Copyright years for files modified in 2011 and/or 2012.Jakub Jelinek2013-01-041-1/+1
| | | | From-SVN: r194903
* optc-gen.awk: Factor code out to...Manuel López-Ibáñez2012-11-071-0/+32
| | | | | | | | | 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org> * optc-gen.awk: Factor code out to... * opt-functions.awk (lang_enabled_by): ... this new function. From-SVN: r193303
* re PR c/53063 (encode group options in the .opt files)Manuel López-Ibáñez2012-10-161-0/+16
| | | | | | | | | | | | | | | 2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org> PR c/53063 PR c/40989 * doc/options.texi (EnabledBy): Document new form. * optc-gen.awk: Handle new form of EnabledBy. * common.opt (Wunused-but-set-parameter): Use EnabledBy. (Wunused-parameter): Likewise. * opts.c (finish_options): Do not handle them explicitly. * opt-functions.awk (search_var_name): New. From-SVN: r192503
* dwarf2out.c (gen_producer_string): Omit command line switch if ↵Simon Baldwin2012-08-241-0/+1
| | | | | | | | | | | | | | | | CL_NO_DWARF_RECORD flag set. gcc/ChangeLog * dwarf2out.c (gen_producer_string): Omit command line switch if CL_NO_DWARF_RECORD flag set. * opts.h (CL_NO_DWARF_RECORD): New. * opt-functions.awk (switch_flags): Add NoDWARFRecord. * doc/options.texi: Document NoDWARFRecord option flag. gcc/fortran/ChangeLog * lang.opt (-cpp=): Mark flag NoDWARFRecord. From-SVN: r190648
* re PR c/53063 (encode group options in the .opt files)Manuel López-Ibáñez2012-05-141-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org> PR 53063 c-family/ * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init, Wreorder): Use LangEnabledBy. * c-opts.c (c_common_handle_option): Do not enable them explicitly. Call lang-specific generated functions. (c_common_post_options): Do not set them here. gcc/ * doc/options.texi: (LangEnabledBy): Document it. * optc-gen.awk: Handle LangEnabledBy. * opth-gen.awk: Generate declaration for lang-specific functions. * opt-read.awk: Record lang numbers. * opt-functions.awk (flag_set_p): Ignore the arguments of flags. (lang_sanitized_name): New. ada/ * gcc-interface/misc.c: Include opts.h and options.h before tm.h. (gnat_handle_option): Call lang-specific generated function. fortran/ * options.c (gfc_handle_option): Call lang-specific generated function. From-SVN: r187462
* Allow HOST_WIDE_INT for option variable.H.J. Lu2011-08-181-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2011-08-18 H.J. Lu <hongjiu.lu@intel.com> Igor Zamyatin <igor.zamyatin@intel.com> * hwint.h (HOST_WIDE_INT_1): New. * opt-functions.awk (switch_bit_fields): Initialize the host_wide_int field. (host_wide_int_var_name): New. (var_type_struct): Check and return HOST_WIDE_INT. * opt-read.awk: Handle HOST_WIDE_INT for "Variable". * optc-save-gen.awk: Support HOST_WIDE_INT on var_target_other. * opth-gen.awk: Use HOST_WIDE_INT_1 on HOST_WIDE_INT. Properly check masks for HOST_WIDE_INT. * opts-common.c (set_option): Support HOST_WIDE_INT flag_var. (option_enabled): Likewise. (get_option_state): Likewise. * opts.h (cl_option): Add cl_host_wide_int. Change var_value to HOST_WIDE_INT. Co-Authored-By: Igor Zamyatin <igor.zamyatin@intel.com> From-SVN: r177864
* opt-functions.awk (var_type_struct): Handle Enum options.Joseph Myers2011-05-051-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * opt-functions.awk (var_type_struct): Handle Enum options. * optc-gen.awk: Don't check range of variables of character type. * config/rs6000/rs6000.c (rs6000_sched_insert_nops_str, rs6000_sched_costly_dep_str, rs6000_recip_name, rs6000_abi_name, rs6000_sdata_name, rs6000_explicit_options): Remove. (rs6000_option_override_internal): Check for -malign-power here. Use global_options_set instead of rs6000_explicit_options. (rs6000_parse_fpu_option): Remove. (rs6000_handle_option): Access variables via opts and opts_set pointers. Use error_at and warning_at. Add fall-through comments. Don't handle OPT_mcmodel_, OPT_maix_struct_return, OPT_msvr4_struct_return, OPT_mvrsave, OPT_mspe, OPT_mcall_, OPT_msdata_, OPT_mtls_size_, OPT_mtraceback_, OPT_mfloat_gprs_, OPT_msched_costly_dep_, OPT_malign_ or OPT_mrecip_ explicitly here. Don't use rs6000_parse_fpu_option. * config/rs6000/rs6000.h (fpu_type): Remove declaration. * config/rs6000/rs6000.opt (rs6000_long_double_type_size, rs6000_spe, rs6000_float_gprs): Remove TargetVariable entries. (mrecip=): Use Var. (mspe): Use Var and Save. (mtraceback=): Use Enum and Var. (rs6000_traceback_type): New Enum and EnumValue entries. (mfloat-gprs=): Use Enum, Var and Save. (rs6000_float_gprs): New Enum and EnumValue entries. (mlong-double-): use Var and Save. (msched-costly-dep=, minsert-sched-nops=): Use Var. (malign-): Use Enum and Var. (rs6000_alignment_flags): New Enum and EnumValue entries. (mfpu=): Use Enum. (fpu_type_t): New Enum and EnumValue entries. * config/rs6000/aix43.h (SUBTARGET_OVERRIDE_OPTIONS): Use global_options_set instead of rs6000_explicit_options. * config/rs6000/aix52.h (SUBTARGET_OVERRIDE_OPTIONS): Use global_options_set instead of rs6000_explicit_options. * config/rs6000/aix53.h (SUBTARGET_OVERRIDE_OPTIONS): Use global_options_set instead of rs6000_explicit_options. * config/rs6000/aix61.h (SUBTARGET_OVERRIDE_OPTIONS): Use global_options_set instead of rs6000_explicit_options. * config/rs6000/e500-double.h (SUB3TARGET_OVERRIDE_OPTIONS): Use global_options_set instead of rs6000_explicit_options. * config/rs6000/eabispe.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Use global_options_set instead of rs6000_explicit_options. (RS6000_DEFAULT_LONG_DOUBLE_SIZE): Remove commented-out definition. * config/rs6000/linux64.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Use global_options_set instead of rs6000_explicit_options. * config/rs6000/linux64.opt (mcmodel=): Use Enum and Var. (rs6000_cmodel): New Enum and EnumValue entries. * config/rs6000/linuxspe.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Use global_options_set instead of rs6000_explicit_options. * config/rs6000/sysv4.opt (mcall-, msdata=): Use Var. (mtls-size=): Use Enum and Var. (rs6000_tls_size): New Enum and EnumValue entries. From-SVN: r173434
* options.texi (ToLower): Document.Joseph Myers2011-04-041-0/+1
| | | | | | | | | | | | | | | * doc/options.texi (ToLower): Document. * opt-functions.awk (switch_bit_fields): Initialize cl_tolower field. * opts-common.c (decode_cmdline_option): Handle cl_tolower. * opts.h (cl_option): Add cl_tolower field. * config/rx/rx.c (rx_handle_option): Use strcmp of -mcpu= arguments with lowercase strings. * config/rx/rx.opt (mcpu=): Add ToLower. * config/rx/t-rx (MULTILIB_MATCHES): Don't handle uppercase -mcpu= argument. From-SVN: r171932
* opts.h (cl_option): Add comments to fields.Joseph Myers2011-03-311-15/+36
| | | | | | | | | | | | | | | | | | | | | | | | | * opts.h (cl_option): Add comments to fields. Add bit-fields for various flags. (CL_SEPARATE_NARGS_SHIFT, CL_SEPARATE_NARGS_MASK, CL_SEPARATE_ALIAS, CL_NO_DRIVER_ARG, CL_REJECT_DRIVER, CL_SAVE, CL_DISABLED, CL_REPOR, CL_REJECT_NEGATIVE, CL_MISSING_OK, CL_UINTEGER, CL_NEGATIVE_ALIAS): Remove. (CL_JOINED, CL_SEPARATE, CL_UNDOCUMENTED): Update bit positions. * opt-functions.awk (flag_init, switch_bit_fields): New. (switch_flags): Don't handle flags moved to bit-fields. Don't generate CL_MISSING_OK or CL_SAVE. * optc-gen.awk: Update to generate bit-field output as well as flags field. * gcc.c (driver_wrong_lang_callback): Use cl_reject_driver bit-field instead of CL_REJECT_DRIVER flag. * opts-common.c (generate_canonical_option, decode_cmdline_option): Use bit-fields instead of CL_* flags. * opts.c (maybe_default_option): Use cl_reject_negative bit-field instead of CL_REJECT_NEGATIVE flag. * toplev.c (print_switch_values): Use cl_report bit-field instead of CL_REPORT flag. From-SVN: r171804
* options.texi (NegativeAlias): Document.Joseph Myers2011-03-301-1/+2
| | | | | | | | | | | | | | | | | | | * doc/options.texi (NegativeAlias): Document. (Alias): Mention NegativeAlias. * opt-functions.awk: Handle NegativeAlias. * optc-gen.awk: Disallow NegativeAlias with multiple Alias arguments. * opts-common.c (decode_cmdline_option): Handle CL_NEGATIVE_ALIAS. * opts.h (CL_NEGATIVE_ALIAS): Define. * config/rs6000/rs6000.c (rs6000_parse_yes_no_option): Remove. (rs6000_handle_option): Don't handle OPT_mvrsave_, OPT_misel_ and OPT_mspe_. * config/rs6000/rs6000.opt (mvrsave=, misel=, mspe=): Replace with Alias entries. * config/rs6000/t-spe (MULTILIB_OPTIONS, MULTILIB_EXCEPTIONS): Use mno-spe and mno-isel instead of mspe=no and -misel=no. From-SVN: r171745
* options.texi (Enum, EnumValue): Document new record types.Joseph Myers2010-11-261-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/options.texi (Enum, EnumValue): Document new record types. (Enum): Document new option flag. * opt-functions.awk * optc-gen.awk: Handle enumerated option arguments. * opth-gen.awk: Handle enumerated option arguments. * opts-common.c (enum_arg_ok_for_language, enum_arg_to_value, enum_value_to_arg): New. (decode_cmdline_option): Handle enumerated arguments. (read_cmdline_option): Handle CL_ERR_ENUM_ARG. (set_option, option_enabled, get_option_state): Handle CLVC_ENUM. * opts.c (print_filtered_help, print_specific_help): Take lang_mask arguments. (print_filtered_help): Handle printing values of enumerated options. Print possible arguments for enumerated options. (print_specific_help): Update call to print_filtered_help. (common_handle_option): Update calls to print_specific_help. Use value rather than arg for OPT_fdiagnostics_show_location_. Don't handle OPT_ffp_contract_, OPT_fexcess_precision_, OPT_fvisibility_, OPT_ftls_model_, OPT_fira_algorithm_ or OPT_fira_region_ here. * opts.h (enum cl_var_type): Add CLVC_ENUM. (struct cl_option): Add var_enum. (CL_ENUM_CANONICAL, CL_ENUM_DRIVER_ONLY, struct cl_enum_arg, struct cl_enum, cl_enums, cl_enums_count): New. (CL_ERR_ENUM_ARG): Define. (CL_ERR_NEGATIVE): Update value. (enum_value_to_arg): Declare. * common.opt (flag_ira_algorithm, flag_ira_region, flag_fp_contract_mode, flag_excess_precision_cmdline, default_visibility, flag_tls_default): Remove Variable entries. (help_enum_printed): New Variable. (fdiagnostics-show-location=): Use Enum. Add associated SourceInclude, Enum and EnumValue entries. (fexcess-precision=, ffp-contract=, fira-algorithm=, fira-region=, ftls-model=, fvisibility=): Use Enum, Var and Init. Add associated Enum and EnumValue entries. po: * exgettext: Handle UnknownError. From-SVN: r167190
* options.texi (Var): Document effects of Defer.Joseph Myers2010-11-191-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/options.texi (Var): Document effects of Defer. (Defer): Document. * opt-functions.awk (var_type, var_set): Handle deferred options. * opts-common.c (set_option): Handle CLVC_DEFER. * common.opt (fcall-saved-, fcall-used-, fdump-, ffixed-, fplugin=, fplugin-arg-, fstack-limit, fstack-limit-register=, fstack-limit-symbol=): Mark as deferred. * opts.c: Don't include rtl.h, ggc.h, output.h, tree-pass.h or plugin.h. (print_filtered_help): Don't report state of CLVC_DEFER options. (common_handle_option): Move code for OPT_fcall_used_, OPT_fcall_saved_, OPT_fdump_, OPT_ffixed_, OPT_fplugin_, OPT_fplugin_arg_, OPT_fstack_limit, OPT_fstack_limit_register_ and OPT_fstack_limit_symbol_ to opts-global.c. (option_enabled, get_option_state): Handle CLVC_DEFER. * opts.h: Include vec.h. (enum cl_var_type): Add CLVC_DEFER. (cl_deferred_option): Define type and vectors. (handle_common_deferred_options): Declare. * opts-global.c: New. * toplev.c (toplev_main): Call handle_common_deferred_options * Makefile.in (OPTS_H): Include $(VEC_H). (OBJS-common): Include opts-global.o. (opts.o): Update dependencies. (opts-global.o): Add dependencies. From-SVN: r166942
* defaults.h (DEFAULT_WORD_SWITCH_TAKES_ARG, [...]): Remove.Joseph Myers2010-11-051-0/+6
| | | | | | | | | | | | | | | | | | | | | | * defaults.h (DEFAULT_WORD_SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG): Remove. * doc/options.texi (Args): Document. * doc/tm.texi.in (WORD_SWITCH_TAKES_ARG): Remove. * doc/tm.texi: Regenerate. * opt-functions.awk (switch_flags): Handle Args. * opts-common.c: Update comment on tm.h include. (decode_cmdline_option): Handle options with multiple arguments. Don't check WORD_SWITCH_TAKES_ARG for unknown options. * opts.h (CL_SEPARATE_NARGS_SHIFT, CL_SEPARATE_NARGS_MASK): Define. (CL_PARAMS, CL_WARNING, CL_OPTIMIZATION, CL_DRIVER, CL_TARGET, CL_COMMON): Update values. * system.h (WORD_SWITCH_TAKES_ARG): Poison. * config/darwin.h (WORD_SWITCH_TAKES_ARG): Remove. * config/darwin.opt (Zsegaddr, sectalign, sectcreate, sectobjectsymbols, sectorder, segcreate, segprot): New. From-SVN: r166359
* Fix PR bootstrap/35855: awk character classes.Ralf Wildenhues2010-10-111-2/+10
| | | | | | | | | | | | | gcc/: PR bootstrap/35855 * opt-functions.awk (BEGIN): New section. (lower, upper, digit, alnum): New variables. (static_var, opt_sanitized_name): Use alnum instead of character classes, for non-C locale. * optc-gen.awk: Likewise. * opth-gen.awk: Likewise. From-SVN: r165322
* * opt-functions.awk (opt_sanitized_name): Remove gdwarf+ handling.Eric Botcazou2010-10-101-2/+0
| | | | From-SVN: r165255
* opt-functions.awk (static_var): Update comment.Joseph Myers2010-09-301-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * opt-functions.awk (static_var): Update comment. (var_ref): Return offsetof expression or -1, not variable address. * optc-gen.awk: Generate structure field initializers instead of static variables. Expect -1 for missing variables instead of null pointer. Add gcc_options parameters to generated functions. * opth-gen.awk: Generate structure fields for static variables. Add gcc_options parameters to generated functions. * common.opt (optimize, optimize_size): Add variables. * config/i386/i386-c.c (ix86_pragma_target_parse): Pass &global_options to cl_target_option_restore. * config/i386/i386.c (ix86_valid_target_attribute_p): Pass &global_options to cl_optimization_restore, cl_target_option_save and cl_target_option_restore. (ix86_set_current_function): Pass &global_options to cl_target_option_restore. * config/pdp11/pdp11.h (optimize): Remove. * config/rs6000/rs6000.h (optimize): Remove. * config/sh/sh.h (optimize): Remove. * config/xtensa/xtensa.h (optimize): Remove. * coretypes.h (struct gcc_options): Declare. * diagnostic.c (diagnostic_initialize): Initialize context->option_state. (diagnostic_report_diagnostic): Pass option_state to option_enabled hook. * diagnostic.h (diagnostic_context.option_enabled): Add void * parameter. (diagnostic_context.option_state): New field. * final.c (final_start_function, final, final_scan_insn): Rename optimize parameter to optimize_p. * flags.h (optimize, optimize_size): Remove. * function.c (invoke_set_current_function_hook): Pass &global_options to cl_optimization_restore. * gcc.c (driver_handle_option): Take gcc_options parameter. Assert that it is &global_options. (process_command): Pass &global_options to read_cmdline_option. * ipa-pure-const.c (suggest_attribute): Pass &global_options to option_enabled. * lto-opts.c (lto_reissue_options): Use option_flag_var. Pass &global_options to set_option. * opts-common.c (handle_option, handle_generated_option, read_cmdline_option, set_option): Take explicit gcc_options parameters. Use option_flag_var. (option_flag_var): New. * opts.c (common_handle_option, lang_handle_option, target_handle_option): Take gcc_options parameter. Assert that it is &global_options. (read_cmdline_options): Pass &global_options to read_cmdline_option. (print_filtered_help): Use option_flag_var. Pass &global_options to option_enabled. (common_handle_option): Use option_flag_var. (option_enabled): Take opts parameter. Use option_flag_var. (get_option_state): Take gcc_options parameter. Use option_flag_var. Pass gcc_options parameter to option_enabled. (enable_warning_as_error): Pass &global_options to handle_generated_option. * opts.h (struct cl_option): Change flag_var to flag_var_offset. (cl_option_handler_func.handler): Take gcc_options parameter. (option_enabled, get_option_state, set_option, handle_option, handle_generated_option, read_cmdline_option): Take gcc_options parameters. * toplev.c (optimize, optimize_size): Remove. (print_switch_values): Pass &global_options to option_enabled. (option_affects_pch_p): Use option_flag_var. Pass &global_options to get_option_state. (general_init): Initialize global_dc->option_state. * tree.c (build_optimization_node): Pass &global_options to cl_optimization_save. (build_target_option_node): Pass &global_options to cl_target_option_save. c-family: * c-common.c (handle_optimize_attribute): Pass &global_options to cl_optimization_save and cl_optimization_restore. * c-opts.c (c_common_handle_option): Pass &global_options to handle_generated_option. * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var. (handle_pragma_pop_options, handle_pragma_reset_options): Pass &global_options to cl_optimization_restore. From-SVN: r164751
* options.texi (SeparateAlias): Document.Joseph Myers2010-09-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/options.texi (SeparateAlias): Document. * opt-functions.awk (switch_flags): Handle SeparateAlias. * opth-gen.awk: Generate enumeration names for options marked SeparateAlias, but not for those marked Ignore. * opts-common.c (generate_canonical_option): Don't output separate argument for options marked CL_SEPARATE_ALIAS. (decode_cmdline_option): Handle CL_SEPARATE_ALIAS. * opts.h (CL_SEPARATE_ALIAS): New. (CL_PARAMS, CL_WARNING, CL_OPTIMIZATION, CL_DRIVER, CL_TARGET, CL_COMMON): Adjust definitions. * config/i386/darwin.opt, config/mips/sde.opt: New. * common.opt (fdump-final-insns): New. * config.gcc (i[34567]86-*-darwin*, x86_64-*-darwin*): Add i386/darwin.opt. (mips*-sde-elf*): Add mips/sde.opt. * config/mips/sde.h (DRIVER_SELF_SPECS): Don't handle -mno-data-in-code and -mcode-xonly here. * defaults.h (DEFAULT_SWITCH_TAKES_ARG): Add 'd'. * gcc.c (option_map): Add "j" to --dump entry. (translate_options): Don't translate -d to -foutput-class-dir= here. java: * lang.opt (d): New. testsuite: * gcc.dg/opts-4.c: New test. From-SVN: r163844
* opts.h (struct cl_option): Add warn_message field.Joseph Myers2010-09-021-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * opts.h (struct cl_option): Add warn_message field. (struct cl_decoded_option): Add warn_message field. * doc/options.texi (Ignore, Warn): Document. * opt-functions.awk (needs_state_p): Don't consider aliases or ignored options to need state saved. * optc-gen.awk: Handle Warn and Ignore. * opth-gen.awk: Output OPT_SPECIAL_ignore. * opts-common.c (decode_cmdline_option): Set warn_message field. Handle ignored options. (decode_cmdline_options_to_array, generate_option, generate_option_input_file): Set warn_message field. (read_cmdline_option): Generate warnings from warn_message field. Handle ignored options. * common.opt (Wunreachable-code, fargument-alias, fargument-noalias, fargument-noalias-global, fargument-noalias-anything, fcse-skip-blocks, fforce-addr, floop-optimize, frerun-loop-opt, fsched2-use-traces, fsee, fstrength-reduce, ftree-store-ccp, ftree-store-copy-prop, ftree-salias): Mark Ignore. * config/i386/i386.h (CC1_CPU_SPEC_1): Don't handle -mcpu, -mintel-syntax and -mno-intel-syntax here. * config/i386/i386.opt (mcpu=, mintel-syntax): Define as aliases using Warn. * opts.c (common_handle_option): Don't handle options marked as ignored. (enable_warning_as_error): Handle ignored options. c-family: * c.opt (Wimport, fall-virtual, falt-external-templates, fdefault-inline, fenum-int-equiv, fexternal-templates, fguiding-decls, fhonor-std, fhuge-objects, flabels-ok, fname-mangling-version-, fnew-abi, fnonnull-objects, foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable, fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as applicable. (fhandle-exceptions): Mark with Alias and Warn. * c-opts.c (c_common_handle_option): Don't handle options marked as ignored. po: * exgettext: Handle {} in operand of MissingArgError. Handle Warn. From-SVN: r163771
* re PR driver/44076 (-MT <target> behaves different as -MT<target> (w/o space))Joseph Myers2010-09-021-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR driver/44076 * opts.h (struct cl_option): Add alias_arg, neg_alias_arg and alias_target fields. * opt-functions.awk (opt_sanitized_name): Don't handle finline-limit=, Wlarger-than= and ftemplate-depth= specially. * optc-gen.awk: Generate alias fields. * opth-gen.awk: Explicitly give values for OPT_* enum constants. Don't generate such constants for aliases. * opts-common.c (generate_canonical_option): New. (decode_cmdline_option): Handle aliases. Use generate_canonical_option for known options instead of copying the input option text. * doc/options.texi (Alias): Document. * common.opt (W, Wlarger-than-, aux-info=, finline-limit-, fstack-check, specs): Mark as aliases. * gcc.c (driver_handle_option): Canonicalize -L options to joined arguments. (driver_handle_option): Don't handle OPT_specs. * opts.c (common_handle_option): Don't handle options marked as aliases. (enable_warning_as_error): Handle aliases. * stor-layout.c (layout_decl): Use OPT_Wlarger_than_ instead of OPT_Wlarger_than_eq. * tree-optimize.c (tree_rest_of_compilation): Use OPT_Wlarger_than_ instead of OPT_Wlarger_than_eq. c-family: * c.opt (Wcomments, Werror-implicit-function-declaration, ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x, std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as aliases. * c-common.c (option_codes): Use OPT_Wcomment instead of OPT_Wcomments. * c-opts.c (warning_as_error_callback, c_common_handle_option): Don't handle options marked as aliases. java: * lang.opt (CLASSPATH, bootclasspath, classpath, encoding, fCLASSPATH=): Mark as Java options and as aliases. * jvspec.c (jvgenmain_spec): Don't handle -fCLASSPATH*. (lang_specific_driver): Don't handle options marked as aliases. * lang.c (java_handle_option): Don't handle OPT_fCLASSPATH_. testsuite: * gcc.dg/cpp/warn-comments-3.c: New. Based on warn-comments-2.c but using -Werror=comment. * gcc.dg/cpp/warn-comments.c, gcc.dg/cpp/warn-comments-2.c: Adjust expected error messages. From-SVN: r163770
* options.texi (NoDriverArg): Document.Joseph Myers2010-08-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/options.texi (NoDriverArg): Document. * gcc.c (cpp_unique_options): Generate -MD and -MMD instead of -MDX and -MMDX. * opt-functions.awk (switch_flags): Handle NoDriverArg. * opts-common.c (decode_cmdline_option): Ignore CL_SEPARATE marking for CL_NO_DRIVER_ARG options when in the driver. * opts.h (CL_NO_DRIVER_ARG): Define. (CL_PARAMS, CL_WARNING, CL_OPTIMIZATION, CL_DRIVER, CL_TARGET, CL_COMMON): Update values. c-family: * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of RejectDriver. (MMDX): Change back to MMD. Mark NoDriverArg instead of RejectDriver. * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD instead of OPT_MDX and OPT_MMDX. fortran: * lang.opt (MDX): Change back to MD. Mark NoDriverArg instead of RejectDriver. (MMDX): Change back to MMD. Mark NoDriverArg instead of RejectDriver. * cpp.c (gfc_cpp_handle_option): Use OPT_MD and OPT_MMD instead of OPT_MDX and OPT_MMDX. From-SVN: r163280
* common.opt: Add driver options.Joseph Myers2010-08-161-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common.opt: Add driver options. (auxbase, auxbase-strip, quiet, version): Mark RejectDriver. * doc/options.texi (Driver, RejectDriver): Document. * gcc.c (pass_exit_codes, print_search_dirs, print_file_name, print_prog_name, print_multi_directory, print_sysroot, print_multi_os_directory, print_multi_lib, print_sysroot_headers_suffix, report_times, combine_flag, use_pipes, wrapper_string): Remove. (save_switch, driver_unknown_option_callback, driver_wrong_lang_callback, driver_post_handling_callback, driver_handle_option): New. (spec_lang, last_language_n_infiles): Make file-scope static instead of local to process_command. (process_command): Use decode_cmdline_options_to_array and read_cmdline_option for option processing. Compute have_c in prescan of decoded options. * opt-functions.awk (switch_flags): Handle Driver and RejectDriver. (var_type, var_type_struct): Handle Separate options as generating const char * variables. * opts-common.c (decode_cmdline_option): Expect CL_COMMON and CL_TARGET to be passed by caller if required. (decode_cmdline_options_to_array): Update comment. * opts.c (complain_wrong_lang): Handle options only valid for the driver. (decode_options): Update call to decode_cmdline_options_to_array. (print_filtered_help): Ignore driver-only options. (print_specific_help): Ignore CL_DRIVER. (common_handle_option): Don't call print_specific_help for CL_DRIVER. * opts.h (CL_DRIVER, CL_REJECT_DRIVER): Define. (CL_PARAMS, CL_WARNING, CL_OPTIMIZATION, CL_TARGET, CL_COMMON): Update values. c-family: * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver. fortran: * lang.opt (MDX, MMDX): Mark RejectDriver. java: * lang.opt (MD_, MMD_, version): Mark RejectDriver. From-SVN: r163279
* opt-functions.awk (opt_sanitized_name): New.Manuel López-Ibáñez2010-04-131-0/+18
| | | | | | | | | | | 2010-04-13 Manuel López-Ibáñez <manu@gcc.gnu.org> * opt-functions.awk (opt_sanitized_name): New. (opt_enum): New. * optc-gen.awk: Use it * opth-gen.awk: Use it. From-SVN: r158272
* Make-lang.in, [...]: Update copyright years.Steven Bosscher2010-04-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ada/gcc-interface/Make-lang.in, alias.c, attribs.c, auto-inc-dec.c, basic-block.h, bb-reorder.c, calls.c, c-common.c, cgraph.h, collect2.h, config/alpha/alpha.c, config/alpha/alpha.md, config/alpha/predicates.md, config/arm/arm.md, config/arm/lib1funcs.asm, config/arm/neon-schedgen.ml, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin.c, config/darwin9.h, config/darwin.c, config/darwin.h, config/h8300/h8300.c, config/i386/cpuid.h, config/i386/cygming.h, config/i386/cygwin.h, config/i386/mingw32.h, config/i386/msformat-c.c, config/i386/sol2-10.h, config/i386/xopintrin.h, config/ia64/ia64.c, config/ia64/ia64.md, config/ia64/sync.md, config/mep/mep.c, config/mips/mips.md, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/pa/pa.c, config/pa/pa.md, config/rs6000/aix.h, config/rs6000/dfp.md, config/rs6000/rs6000-builtin.def, config/rs6000/rs6000-c.c, config/rs6000/vector.md, config/rtems.h, config/rx/rx.md, config/s390/s390.md, config/sol2-c.c, config/sparc/sol2-bi.h, config/sparc/sol2-gas.h, config/sparc/sparc.h, config/sparc/sparc.md, config/sparc/sparc-protos.h, config/spu/spu.c, config/spu/spu-c.c, config/t-darwin, convert.c, c.opt, c-opts.c, cp/Make-lang.in, c-pretty-print.c, c-typeck.c, df-core.c, df-scan.c, diagnostic.c, diagnostic.h, doc/cppopts.texi, doc/cpp.texi, doc/extend.texi, doc/gimple.texi, doc/languages.texi, doc/plugins.texi, doc/rtl.texi, doc/standards.texi, doc/tree-ssa.texi, doc/trouble.texi, dominance.c, fold-const.c, fortran/Make-lang.in, fwprop.c, gcc-plugin.h, gensupport.c, gimple.h, gimple-iterator.c, graphite.c, graphite-clast-to-gimple.c, graphite-clast-to-gimple.h, graphite-dependences.c, graphite-poly.c, graphite-poly.h, graphite-ppl.c, graphite-ppl.h, graphite-scop-detection.c, graphite-sese-to-poly.c, graphite-sese-to-poly.h, ifcvt.c, intl.c, intl.h, ipa.c, ipa-cp.c, ipa-inline.c, ipa-prop.c, ipa-prop.h, ipa-pure-const.c, ipa-reference.c, ipa-type-escape.c, ira-color.c, ira-conflicts.c, ira-lives.c, java/Make-lang.in, lambda-code.c, loop-invariant.c, lto/Make-lang.in, lto-streamer.h, lto-streamer-in.c, objc/Make-lang.in, objcp/Make-lang.in, omp-low.c, optc-gen.awk, opt-functions.awk, opth-gen.awk, params.def, passes.c, postreload-gcse.c, print-tree.c, recog.c, regrename.c, reload.h, rtl.def, sched-int.h, sched-rgn.c, sel-sched-dump.c, sese.c, sese.h, store-motion.c, stor-layout.c, tree-cfgcleanup.c, tree-chrec.c, tree-complex.c, tree-data-ref.c, tree.def, tree-eh.c, tree-flow.h, tree-flow-inline.h, tree.h, tree-loop-distribution.c, tree-outof-ssa.c, tree-parloops.c, tree-pass.h, tree-predcom.c, tree-profile.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-alias.c, tree-ssa-coalesce.c, tree-ssa-copy.c, tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-loop-im.c, tree-ssa-loop-ivcanon.c, tree-ssa-loop-manip.c, tree-ssa-math-opts.c, tree-ssa-operands.c, tree-ssa-pre.c, tree-ssa-sccvn.c, tree-ssa-structalias.c, tree-ssa-uncprop.c, tree-tailcall.c, tree-vect-data-refs.c, tree-vect-loop.c, tree-vectorizer.h, tree-vect-slp.c, tree-vrp.c, unwind-dw2-fde-darwin.c, varpool.c: Update copyright years. From-SVN: r157950
* re PR middle-end/43574 (Revision 157795 failed gcc.dg/lto/20090914-1 ↵Jie Zhang2010-03-311-2/+2
| | | | | | | | | | c_lto_20090914-1_0.o) PR 43574 * opt-functions.awk (var_type_struct): Use signed char type for simple variables. From-SVN: r157859
* opt-functions.awk (opt_args): Allow argument to be enclosed in curly braces.Dave Korn2009-07-301-1/+7
| | | | | | | | * opt-functions.awk (opt_args): Allow argument to be enclosed in curly braces. * doc/options.texi (Option properties): Mention new quoting syntax. From-SVN: r150248
* Update Copyright years for files modified in 2008 and/or 2009.Jakub Jelinek2009-02-201-1/+1
| | | | From-SVN: r144324
* Change attribute((option(...))) to attribute((target(...))); Do not allocate ↵Michael Meissner2008-08-301-0/+1
| | | | | | 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
* Add ability to set target options (ix86 only) and optimization options on a ↵Michael Meissner2008-07-231-0/+17
| | | | | | function specific basis From-SVN: r138075
* Change copyright header to refer to version 3 of the GNU General Public ↵Nick Clifton2007-07-261-3/+3
| | | | | | License and to point readers at the COPYING3 file and the FSF's license web page. From-SVN: r126948
* invoke.texi (Overall Options): Document --help=.Nick Clifton2007-02-121-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Update FSF address.Kelley Cook2005-06-251-1/+1
| | | | From-SVN: r101317
* opt-functions.awk (global_state_p, [...]): New.Richard Sandiford2005-06-141-4/+30
| | | | | | | | | * opt-functions.awk (global_state_p, needs_state_p, static_var): New. (var_ref): Take the option's flags as a second parameter. Check static_var. * optc-gen.awk: Declare local state variables. Pass flags to var_ref. From-SVN: r100937
* opt-functions.awk (var_type): New function.Richard Sandiford2005-05-261-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* opt-functions.awk (var_set): Emit OPTION_MASK_ for InverseMask if variable ↵David Edelsohn2005-05-071-2/+7
| | | | | | | | | name exists. * opt-functions.awk (var_set): Emit OPTION_MASK_ for InverseMask if variable name exists. From-SVN: r99357
* opt-functions.awk (var_set): Emit proper initializer for non-target bitfields.DJ Delorie2005-04-281-2/+7
| | | | | | | * opt-functions.awk (var_set): Emit proper initializer for non-target bitfields. From-SVN: r98962
* opt-functions.awk (flag_set_p, test_flag): New functions.Richard Sandiford2005-03-301-14/+27
| | | | | | | | | * opt-functions.awk (flag_set_p, test_flag): New functions. (switch_flags): Use them. * opth-gen.awk: Use flag_set_p to check for flags. * optc-gen.awk: Likewise. Use opt_args to check for Init(...) flags. From-SVN: r97237
* config.gcc (extra_options): New variable for listing option files.Richard Sandiford2005-03-141-22/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* opts.sh: Delete.Kelley Cook2004-06-181-0/+76
2004-06-18 Kelley Cook <kcook@gcc.gnu.org> * opts.sh: Delete. Break out generated code to next four files. * opt-gather.awk: New file. * optc-gen.awk: New file. * opth-gen.awk: New file. * opt-functions.awk: New common file. * Makefile.in: Update for above. * configure.ac: Update comment. * configure: Regenerate. From-SVN: r83333