Remove Negative(gwarf-) from gdwarf
authorRichard Biener <rguenther@suse.de>
Fri, 24 Mar 2023 09:19:55 +0000 (10:19 +0100)
committerRichard Biener <rguenther@suse.de>
Tue, 28 Mar 2023 06:52:01 +0000 (08:52 +0200)
Prior to the removal of STABS support the gdwarf, gstabs, ... options
formed a cycle with their Negative(..) option attribute.  But that
didn't actually have any effect since most of the options also
are Joined or JoinedOrMissing for which there's no pruning of options
and so once ran into the set_debug_level diagnostics reporting
conflicting debug formats.

The following removes the remains of that cycle, which is a
Negative option from gdwarf to gdwarf-.  With RejectNegative
added the expected effect of -gdwarf-4 -gdwarf would be to
enable DWARF5 support (but this doesn't happen for some reason).
I think the more sensible behavior is that seen and implemented
in opts.cc, the more specific -gdwarf-4 determines the DWARF level
and a later or earlier -gdwarf becomes a no-op.  So the
Negative(..) annotation on gdwarf is just confusing.

* common.opt (gdwarf): Remove Negative(gdwarf-).

gcc/common.opt

index 4546acb..862c474 100644 (file)
@@ -3349,7 +3349,7 @@ Common Driver RejectNegative JoinedOrMissing
 Generate BTF debug information at default level.
 
 gdwarf
-Common Driver JoinedOrMissing Negative(gdwarf-) RejectNegative
+Common Driver JoinedOrMissing RejectNegative
 Generate debug information in default version of DWARF format.
 
 gdwarf-