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: 25442 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3319205wrr; Thu, 24 Nov 2022 02:59:19 -0800 (PST) X-Google-Smtp-Source: AA0mqf6kLsdN2ugwda9Qc8QW5No2F4D+onjYhhFamGDMEH2XYtu8sSir7XlVvqwoeErW2kJTEtiZ X-Received: by 2002:a05:6402:1f08:b0:461:d21a:c0f3 with SMTP id b8-20020a0564021f0800b00461d21ac0f3mr7171846edb.71.1669287559678; Thu, 24 Nov 2022 02:59:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669287559; cv=none; d=google.com; s=arc-20160816; b=xVu1LWd/IEtS1amshhcbO/SSDfQn7k8BAoEsgI9oS2Z+zVTq5yHRfnuvAeY95dqsh+ XVNCU9fDIkOZbxjAgm2JD6t42BwZ8jdljOXGDnDl4rSuBWtpcDzTKalRXgSfzsv589ol 7k0NlNGtQx8+Sycy37LAFWrBwpHc73GPrvEcdwe19oqR6WdyPbIg15JxJQR8Y4jW4EqP r5wOwS6lug2y/4tJX1vO3ygploKnJ8CknR5BWkTqmWNfo0c+j433kV+dQPTtf9v/90tj BBVg1xVjWxZTv2nFB+MOuzjJTThjA+UIym4vGK9RUMUruTst4DyeY3XT3MeU492qERzN xsng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:in-reply-to:mime-version:references:message-id :subject:cc:to:date:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=6X0rafF/6GvFlIPl+6SQ5cs095cQwc+8FvDfcTcJOXM=; b=wT9oE9GRJIUr0vggvoMzJjQtOBGu4s2wJH2+wXlmYZMbE6IQ8cL5AwePP/1M5UUHcA TjpPcFlHflJDzpTyd1UIPTPvbqbgqi12KFgAeFICNRGnV8upB3ASwWCuy7Q7voeeNKfu CKCzo31g1Pu22CoqG1PZpaFyEAns9M5I183jzZm7Vg260dt7X0tGbiTAjXPrVY+uu7qU DsPkEGhMB1TtUWKZoDN/8+45hwrk2vUVsrcfchFMUab3LKwmGsPqLTlWWgE76J6ASLDp eHvITBJZCotuaNgmXoovGBbTkjqf38+hWLZGnvSEq023RoO+QtkxOkUrUPuIkHU/1jT4 nggg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=BkyA0nPr; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id l11-20020a170906794b00b007811e006b46si743792ejo.470.2022.11.24.02.59.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Nov 2022 02:59:19 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=BkyA0nPr; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B59EF38432E8 for ; Thu, 24 Nov 2022 10:59:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B59EF38432E8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669287558; 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=BkyA0nPrqwnedCH8M2eSL6EJwkfrXkfX3aHUOJnw52+1OjxRz1oxfUWIPA+lBqsL9 v3gaqOgLwoFGr4+oyJn1InNrHjLguLqNZRx+/x72+W114uEcOHlSFbb6a4tBV/NY6v bu8iTNZV4hALphMBm84Wd1TV2urpG70iRn/ywZjQ= 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+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750374871659632311?= X-GMAIL-MSGID: =?utf-8?q?1750374871659632311?= 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)