Message ID | 0f0bd3e7-6402-929d-f231-2f9c6d4623d1@suse.cz |
---|---|
State | New |
Headers | show |
Series | Ignore properly -mdirect-move (PR target/87164). | expand |
Hi! On Tue, Sep 04, 2018 at 04:02:23PM +0200, Martin Liška wrote: > Option mdirect-move should be Deprecated, that means option value is ignored > and user can't influence rs6000_isa_flags. > > Patch can bootstrap on ppc64le-redhat-linux (gcc110 and gcc112) and survives regression tests. > > Ready to be installed? So the mask is still defined then, and mask for that variable? Sounds fine then, thanks. The other issue is still there: options.texi says: @item Ignore This option is ignored apart from printing any warning specified using @code{Warn}. So Warn is explicitly allowed with Ignore, not forbidden. If you want to change that, you'll have to change the documentation as well ;-) I'll test it later, might be tomorrow. Thanks, Segher
On 09/04/2018 09:40 PM, Segher Boessenkool wrote: > Hi! > > On Tue, Sep 04, 2018 at 04:02:23PM +0200, Martin Liška wrote: >> Option mdirect-move should be Deprecated, that means option value is ignored >> and user can't influence rs6000_isa_flags. >> >> Patch can bootstrap on ppc64le-redhat-linux (gcc110 and gcc112) and survives regression tests. >> >> Ready to be installed? > > So the mask is still defined then, and mask for that variable? Sounds fine > then, thanks. Yes, Deprecated is basically Ignore+Warn(...). > > The other issue is still there: options.texi says: > @item Ignore > This option is ignored apart from printing any warning specified using > @code{Warn}. > > So Warn is explicitly allowed with Ignore, not forbidden. If you want to > change that, you'll have to change the documentation as well ;-) Which means yes, the documentation is not correct. I'm suggesting that: diff --git a/gcc/doc/options.texi b/gcc/doc/options.texi index f887d16f88f..dd201c3b7bc 100644 --- a/gcc/doc/options.texi +++ b/gcc/doc/options.texi @@ -431,9 +431,10 @@ negated. @code{NegativeAlias} may not be used with the forms of @code{Alias} taking more than one argument. @item Ignore -This option is ignored apart from printing any warning specified using -@code{Warn}. The option will not be seen by specs and no @samp{OPT_} -enumeration value is defined for it. +This option is ignored and the option will not be seen by specs +and no @samp{OPT_} enumeration value is defined for it. The option +cannot be combined with @code{Warn} and in such case @code{Deprecated} +should be used. @item SeparateAlias For an option marked with @code{Joined}, @code{Separate} and Feel free to make language correction. I'm going to install the current fix for the PR and documentation can be updated independently. Martin > > I'll test it later, might be tomorrow. Thanks, > > > Segher >
diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt index 0abeeafc646..138ce26d03f 100644 --- a/gcc/config/rs6000/rs6000.opt +++ b/gcc/config/rs6000/rs6000.opt @@ -483,9 +483,8 @@ mcrypto Target Report Mask(CRYPTO) Var(rs6000_isa_flags) Use ISA 2.07 Category:Vector.AES and Category:Vector.SHA2 instructions. -; We can't use Ignore flag because DIRECT_MOVE mask is still used. mdirect-move -Target Undocumented Mask(DIRECT_MOVE) Var(rs6000_isa_flags) Warn(%qs is deprecated) +Target Undocumented Mask(DIRECT_MOVE) Var(rs6000_isa_flags) Deprecated mhtm Target Report Mask(HTM) Var(rs6000_isa_flags) diff --git a/gcc/optc-gen.awk b/gcc/optc-gen.awk index 9a79bb86243..3668b3ef0e4 100644 --- a/gcc/optc-gen.awk +++ b/gcc/optc-gen.awk @@ -336,8 +336,6 @@ for (i = 0; i < n_opts; i++) { alias_data = "NULL, NULL, OPT_SPECIAL_deprecated" if (warn_message != "NULL") print "#error Deprecated option with Warn" - if (var_name(flags[i]) != "") - print "#error Deprecated option with Var" if (flag_set_p("Report", flags[i])) print "#error Deprecated option with Report" }