From patchwork Thu Nov 24 10:58:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 61069 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2E7CD38493C8 for ; Thu, 24 Nov 2022 10:59:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2E7CD38493C8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669287544; bh=6X0rafF/6GvFlIPl+6SQ5cs095cQwc+8FvDfcTcJOXM=; h=Date:To:Cc:Subject:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=RNhfMVrCIJWyFnndykdVoUU3zZ88J2FsIQrzyOcZ/y+wpyLJQmJ4hvJIK2w1ITS5Y +M9G6Yj4xcZyqAjAnGntI4+nClRtae6Jp1DEnUIuC6vMxds1bdHLb14mE5wh7s+MOl GXpAIQAkeFtL/z+XPYZ1om8bOmmyz/imEvJSTUCE= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 077A03858022 for ; Thu, 24 Nov 2022 10:58:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 077A03858022 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-487-31Y5wLvkOuqlv0CtOhi9xA-1; Thu, 24 Nov 2022 05:58:31 -0500 X-MC-Unique: 31Y5wLvkOuqlv0CtOhi9xA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 79A95299E750 for ; Thu, 24 Nov 2022 10:58:31 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.194.202]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 37BC017585; Thu, 24 Nov 2022 10:58:31 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 2AOAwQ3L230842 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 24 Nov 2022 11:58:27 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 2AOAwPGN230841; Thu, 24 Nov 2022 11:58:25 +0100 Date: Thu, 24 Nov 2022 11:58:25 +0100 To: Jason Merrill Cc: gcc-patches@gcc.gnu.org Subject: [committed] c++: Further -fcontract* option description fixes Message-ID: References: <493ff6ad-1498-2a79-dd5c-13b34a3d59ba@redhat.com> MIME-Version: 1.0 In-Reply-To: <493ff6ad-1498-2a79-dd5c-13b34a3d59ba@redhat.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jakub Jelinek via Gcc-patches From: Jakub Jelinek Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" On Tue, Nov 22, 2022 at 10:09:06AM -0500, Jason Merrill wrote: > > Though, shall we have those [on|off] options at all? > > Those are inconsistent with all other boolean options gcc has. > > Every other boolean option is -fwhatever for it being on > > and -fno-whatever for it being off, shouldn't the options be > > without arguments and accept negatives (-fcontract-assumption-mode > > vs. -fno-contract-assumption-mode etc.)? > > True, but I think let's leave them alone for now, they'll probably all be > replaced as the feature specification evolves. If we don't want to support them for too long, another possibility would be to use params for those instead of normal options, params are understood to be more volatile than normal options and can be removed easily (while for normal options we typically keep them but error or them or silently ignore depending on what the option is about). Anyway, during testing I've missed my previous patch just changed: -FAIL: compiler driver --help=c++ option(s): "^ +-.*[^:.]\$" absent from output: " -fcontract-build-level=[off|default|audit] Specify max contract level to generate runtime checks for" +FAIL: compiler driver --help=c++ option(s): "^ +-.*[^:.]\$" absent from output: " -fcontract-role=: Specify the semantics for all levels in a role (default, review), or a custom contract role with given semantics (ex: opt:assume,assume,assume)" rather than actually fixed it, the test only reports the first such problem. This patch fixes the remaining ones. Tested with make check-gcc RUNTESTFLAGS=help.exp and committed to trunk as obvious. 2022-11-24 Jakub Jelinek * c.opt (fcontract-role=, fcontract-semantic=): Terminate descriptions with a dot. Jakub --- gcc/c-family/c.opt.jj 2022-11-23 09:29:01.083548284 +0100 +++ gcc/c-family/c.opt 2022-11-24 11:42:29.582499720 +0100 @@ -1713,11 +1713,11 @@ C++ Joined RejectNegative fcontract-role= C++ Joined RejectNegative --fcontract-role=: Specify the semantics for all levels in a role (default, review), or a custom contract role with given semantics (ex: opt:assume,assume,assume) +-fcontract-role=: Specify the semantics for all levels in a role (default, review), or a custom contract role with given semantics (ex: opt:assume,assume,assume). fcontract-semantic= C++ Joined RejectNegative --fcontract-semantic=: Specify the concrete semantics for level +-fcontract-semantic=: Specify the concrete semantics for level. fcoroutines C++ LTO Var(flag_coroutines)