On Fri, 2017-10-27 at 10:45 +0200, Richard Biener wrote:
> Does
> 
> gcoff
> Common Driver JoinedOrMissing Ignore Warn(switch %qs no longer
> supported)
> Does nothing.  Preserved for backward compatibility.
> 
> gcoff1
> Common Driver Alias(gcoff)
> 
> gcoff2
> Common Driver Alias(gcoff)
> 
> gcoff3
> Common Driver Alias(gcoff)
> 
> work to that effect?  Not sure if we really should care ;)
> 
> I'm ok with your patch as approved or the Alias variant if it
> avoids the odd warnings for options that never existed
> and you're fine with the reduced duplication.

This doesn't work, because you can't have an alias to an ignored
option.  The alias support uses an OPT_x enum value to point back to
the other option, and there is no OPT_x enum value created for ignored
options.

This does work if I duplicate the gcoff entry 4 times for the 4
options, without the JoinedOrMissing, which is unnecessary if we
explicitly list them all.  This seems to be the only easy way to get
the exact result we need, and doesn't look too bad, so this is what I
checked in.

Jim
2017-10-29  Jim Wilson  <wil...@tuliptree.org>

        gcc/
        * common.opt (gcoff): Re-add as ignored option.
        (gcoff1, gcoff2, gcoff3): Likewise.

diff --git a/gcc/common.opt b/gcc/common.opt
index 25e86ec..5cf270c 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -2868,6 +2868,22 @@ g
 Common Driver RejectNegative JoinedOrMissing
 Generate debug information in default format.
 
+gcoff
+Common Driver Ignore Warn(switch %qs no longer supported)
+Does nothing.  Preserved for backward compatibility.
+
+gcoff1
+Common Driver Ignore Warn(switch %qs no longer supported)
+Does nothing.  Preserved for backward compatibility.
+
+gcoff2
+Common Driver Ignore Warn(switch %qs no longer supported)
+Does nothing.  Preserved for backward compatibility.
+
+gcoff3
+Common Driver Ignore Warn(switch %qs no longer supported)
+Does nothing.  Preserved for backward compatibility.
+
 gcolumn-info
 Common Driver Var(debug_column_info,1) Init(1)
 Record DW_AT_decl_column and DW_AT_call_column in DWARF.

Reply via email to