From patchwork Tue Sep 6 07:15:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marc_Poulhi=C3=A8s?= X-Patchwork-Id: 1016 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5044:0:0:0:0:0 with SMTP id h4csp504876wrt; Tue, 6 Sep 2022 00:21:43 -0700 (PDT) X-Google-Smtp-Source: AA6agR4yE/xmDtyZCDnZiH1mOf8FiBp2tQ1GlMuqdncR3x2hbmBiL++K9coFKsfKeP9zPspt576K X-Received: by 2002:a05:6402:1f13:b0:44e:97dd:7b77 with SMTP id b19-20020a0564021f1300b0044e97dd7b77mr5768851edb.300.1662448902784; Tue, 06 Sep 2022 00:21:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662448902; cv=none; d=google.com; s=arc-20160816; b=SxgKyZzsk1jrcSlHfGq6qgIrnOdPPM9yKu+hFM+CuNibsEXyl+zA6xnKQwTP/HgLFz nqmgeMbAEZhEYJ4ZbfAru7hVKISEKy37VOiUudKxueHo1f1X1w/qCX5TGnv95qTkCgSU fBp2xb6X4IXNnwfpPdSVZhZ/Hm0tcF1MweK05zTWlVAIY0h3KbxItNoJsezo8L5RJwGs W/5jPd8QIyYCBLRpF2hxE5nxiDlfz9hxbu8BGNVy0jnHKcSnecB0+rvgPQHpF+yyM5+k ZGp6py83B697C9RqmKcKNPvngcQNZCerNdbzV0NvkWguZOxyF9tawhgCuTxC6x2MwB7d rALQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:from:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:content-disposition:mime-version :message-id:subject:to:date:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=rxVrAy1/0TJomca5m0SmnOcwgmugbrfEtq/DRCKQznk=; b=ABhurEoeEC1eCnfPcDVrzerU93issSre3huCX+8JIqgt9paTZGurkxQlzXHG3RPIUf EujnXgRm+r9ybRP772IuowfJ557w7uXQriAmAN3/JI3KCgy4ff/CLUEOwa250UOma3/Z bGgSpjBrgLdb1ervNuviQdXnDeE0CSVRbHJU7DxXLsFZI7y7ByBCJ0BTl/e/lv9r6kfT 3s4VG+ynYvYxEIof8YBWC7QsewcH2fr74jxER8v0AfoINPIxy0bhGpUSmWEybK5cAefx 8etAcNRyjBj8zGH0pie5ksyG93pFFMGwGikSbaYK0fz+SjpQJBCmPJHlb61kxiHGvTkh ov1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=TFswL9wZ; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id gv18-20020a1709072bd200b0072af35fca64si7427673ejc.484.2022.09.06.00.21.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Sep 2022 00:21:42 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=TFswL9wZ; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 D5B42392AC22 for ; Tue, 6 Sep 2022 07:18:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D5B42392AC22 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662448704; bh=rxVrAy1/0TJomca5m0SmnOcwgmugbrfEtq/DRCKQznk=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=TFswL9wZy+sF0oEILV7MZjl5BwpqzQDx3Oq1A4vfgG9pU/Ul8FwfgtP1z6G0t6VP0 xDeSJ4Kh4bqgc3Albiw6R67qUbr9GBG/EPRofVJl0PoYDmjzWodpi2j02VanJZTQV6 3vZF+H1kW/9MASl9RuQXRrvDR5B+gzkBXsKKi8dE= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by sourceware.org (Postfix) with ESMTPS id 52685385117B for ; Tue, 6 Sep 2022 07:15:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 52685385117B Received: by mail-wr1-x42e.google.com with SMTP id t7so8982907wrm.10 for ; Tue, 06 Sep 2022 00:15:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:content-disposition:mime-version :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date; bh=rxVrAy1/0TJomca5m0SmnOcwgmugbrfEtq/DRCKQznk=; b=Bd9sa3BT+HMnGC504ZLAj/wucZbTbwECQW1n9ajdMV9OIFJFPvhUiHUhPeTWLBF8N1 a+QbgJ94UTUo/qwMt46JFJ1ARwjYvsCN38cULFNJkUZsHgwoE+05VaAWjSJW0tnPKWi/ JaRjZWucyQyQmehsEmzJuRJ22kEMDE2W05aDtrmZi58IGVS+DWR2KXY7FvAmBESNW7PJ cVWmpUg5uweb+VQZe79yLdrvGzAZvG40ZNWJjR5Q5xOGF+St0ebMbYXbb5JcJZMB2W0J uLGh84w5mV7Y1mErZ/9aWKRKUjgs1yI9Mzm9u7ZpeW29JzYgkH2USLFydNAqpAIwTA/Q dshw== X-Gm-Message-State: ACgBeo1P4pm7+0eOk3XCavEvqUwcrrmZsbtbNIZz7XcUdc/Yvh5ijTPA xXq11pCJDuwtf21dbLYSfLf++imOLgPfCQ== X-Received: by 2002:adf:eb0e:0:b0:226:db7d:6fed with SMTP id s14-20020adfeb0e000000b00226db7d6fedmr22922047wrn.626.1662448548193; Tue, 06 Sep 2022 00:15:48 -0700 (PDT) Received: from poulhies-Precision-5550 (static-176-191-105-132.ftth.abo.bbox.fr. [176.191.105.132]) by smtp.gmail.com with ESMTPSA id l7-20020adffe87000000b00228da396f9dsm1224515wrr.84.2022.09.06.00.15.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Sep 2022 00:15:47 -0700 (PDT) Date: Tue, 6 Sep 2022 09:15:47 +0200 To: gcc-patches@gcc.gnu.org Subject: [Ada] Document change to legality checks for Inox case statements Message-ID: <20220906071547.GA1280314@poulhies-Precision-5550> MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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: =?utf-8?q?Marc_Poulhi=C3=A8s_via_Gcc-patches?= From: =?utf-8?q?Marc_Poulhi=C3=A8s?= Reply-To: Marc =?iso-8859-1?q?Poulhi=E8s?= Cc: Steve Baird 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?1743204020887634304?= X-GMAIL-MSGID: =?utf-8?q?1743204020887634304?= INOX (which is enabled via -gnatX) supports composite case-statement selectors. As a temporary measure, simplify the coverage-related compile-time checks for such case statements via two changes: an others choice is always required for such a case statement, and no legality checks relating to overlapping of case choices are performed. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst: Document new temporary rule that a "when others =>" case choice must be given when casing on a composite selector. * gnat_rm.texi: Regenerate. diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst --- a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst +++ b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst @@ -2262,7 +2262,8 @@ of GNAT specific extensions are recognized as follows: will not be executed if the earlier alternative "matches"). All possible values of the composite type shall be covered. The composite type of the selector shall be an array or record type that is neither limited - class-wide. + class-wide. Currently, a "when others =>" case choice is required; it is + intended that this requirement will be relaxed at some point. If a subcomponent's subtype does not meet certain restrictions, then the only value that can be specified for that subcomponent in a case diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi --- a/gcc/ada/gnat_rm.texi +++ b/gcc/ada/gnat_rm.texi @@ -3717,7 +3717,8 @@ set shall be a proper subset of the second (and the later alternative will not be executed if the earlier alternative “matches”). All possible values of the composite type shall be covered. The composite type of the selector shall be an array or record type that is neither limited -class-wide. +class-wide. Currently, a “when others =>” case choice is required; it is +intended that this requirement will be relaxed at some point. If a subcomponent’s subtype does not meet certain restrictions, then the only value that can be specified for that subcomponent in a case