diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-02 11:43:19 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-02 11:43:19 +0000 |
commit | 3b0273a198fcdb889f70f2a3c15896dba429e852 (patch) | |
tree | b73424a97ff306c8f1ae185b160c05e86be29bc0 /gcc/optc-gen.awk | |
parent | 67089c6ba213c45df206f3516b3f5507e36c166b (diff) | |
download | gcc-3b0273a198fcdb889f70f2a3c15896dba429e852.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163771 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/optc-gen.awk')
-rw-r--r-- | gcc/optc-gen.awk | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/gcc/optc-gen.awk b/gcc/optc-gen.awk index 4376d72dedd..bee780c0b63 100644 --- a/gcc/optc-gen.awk +++ b/gcc/optc-gen.awk @@ -201,9 +201,19 @@ for (i = 0; i < n_opts; i++) { else missing_arg_error = quote missing_arg_error quote + + warn_message = opt_args("Warn", flags[i]) + if (warn_message == "") + warn_message = "0" + else + warn_message = quote warn_message quote + alias_arg = opt_args("Alias", flags[i]) if (alias_arg == "") { - alias_data = "NULL, NULL, N_OPTS" + if (flag_set_p("Ignore", flags[i])) + alias_data = "NULL, NULL, OPT_SPECIAL_ignore" + else + alias_data = "NULL, NULL, N_OPTS" } else { alias_opt = nth_arg(0, alias_arg) alias_posarg = nth_arg(1, alias_arg) @@ -246,8 +256,8 @@ for (i = 0; i < n_opts; i++) { } # Split the printf after %u to work around an ia64-hp-hpux11.23 # awk bug. - printf(" { %c-%s%c,\n %s,\n %s,\n %s, %s, %u,", - quote, opts[i], quote, hlp, missing_arg_error, + printf(" { %c-%s%c,\n %s,\n %s,\n %s,\n %s, %s, %u,", + quote, opts[i], quote, hlp, missing_arg_error, warn_message, alias_data, back_chain[i], len) printf(" %d,\n", idx) condition = opt_args("Condition", flags[i]) |