public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 2/2] Remove Negative(gwarf-) from gdwarf
@ 2023-03-24 10:20 Richard Biener
  2023-03-27 22:18 ` Joseph Myers
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Biener @ 2023-03-24 10:20 UTC (permalink / raw)
  To: gcc-patches; +Cc: Joseph S. Myers, Jakub Jelinek

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.

Bootstrapped and tested on x86_64-unknown-linux-gnu, OK?

Thanks,
Richard.

	* common.opt (gdwarf): Remove Negative(gdwarf-).
---
 gcc/common.opt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/common.opt b/gcc/common.opt
index 4546acb5b81..862c474d3c8 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -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-
-- 
2.35.3

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 2/2] Remove Negative(gwarf-) from gdwarf
  2023-03-24 10:20 [PATCH 2/2] Remove Negative(gwarf-) from gdwarf Richard Biener
@ 2023-03-27 22:18 ` Joseph Myers
  0 siblings, 0 replies; 2+ messages in thread
From: Joseph Myers @ 2023-03-27 22:18 UTC (permalink / raw)
  To: Richard Biener; +Cc: gcc-patches, Jakub Jelinek

On Fri, 24 Mar 2023, Richard Biener via Gcc-patches wrote:

> 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.
> 
> Bootstrapped and tested on x86_64-unknown-linux-gnu, OK?

OK.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-27 22:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-24 10:20 [PATCH 2/2] Remove Negative(gwarf-) from gdwarf Richard Biener
2023-03-27 22:18 ` Joseph Myers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).