From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id C13813870898 for ; Fri, 24 Mar 2023 10:20:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C13813870898 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id E491933A30; Fri, 24 Mar 2023 10:20:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1679653209; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=RXcBjTbVHHM2eHwdlD+uVxbMBm7S+jyF7X7ecHb0CwM=; b=V6mvKVfT5SxEC8UG3FwFnWXr7pb8zWDVsvIWSPJ6V/ATUHZe2s/VEeowUf/nYffJ5m/H/+ 2T1ev8A31e4zXMzmCz4quBH3L2IlX1FcAwtp7aOMMJKOM89KFnvEXfFGlvJ6RMQhcEh6VF C4NA3IvwuewA1kEXaC0VB9q/BMOtlP0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1679653209; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=RXcBjTbVHHM2eHwdlD+uVxbMBm7S+jyF7X7ecHb0CwM=; b=vjuREqqg6S16V13Yq1LWAZjkVgMPTbfenkP7DOWophUjzgohzGI5GL5tlxi3zPE5MI8a28 cy6kVGkredVU3qAw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id C79A5138F1; Fri, 24 Mar 2023 10:20:09 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id XWodL1l5HWTwPAAAMHmgww (envelope-from ); Fri, 24 Mar 2023 10:20:09 +0000 Date: Fri, 24 Mar 2023 11:20:09 +0100 (CET) From: Richard Biener To: gcc-patches@gcc.gnu.org cc: "Joseph S. Myers" , Jakub Jelinek Subject: [PATCH 2/2] Remove Negative(gwarf-) from gdwarf MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Message-Id: <20230324102009.C79A5138F1@imap2.suse-dmz.suse.de> X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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