From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-wr1-x42e.google.com with SMTP id t7so8982907wrm.10 for ; Tue, 06 Sep 2022 00:15:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; h=content-transfer-encoding:content-disposition:mime-version :message-id:subject:cc:to:from:date:from:to:cc:subject:date; bh=rxVrAy1/0TJomca5m0SmnOcwgmugbrfEtq/DRCKQznk=; b=h6LAQQFK27lC7Gx/dACm7oQyTY44M0PGFV2Qnr6ekOtViM/CLMb2nygZSeEpPZWsk1 OxgFvrpAZHwabPDebn67sNUhfrjcqYLvjH47GqDoyIDdgg6SOyhi4m1cqcWAx5ByCbfB LfrZHIADfPF6ae8LanV/uCM5++2ooAzv/nDsFRYPQ83OwcEi4JO4du0r7GiUgedXcDZ1 SmI4O90nyerdmxfEi7U0nKRMb2EaQLMSiGeh8z0gxoj9md3GxOmh2XxXjfjhNt2llpXs pCiv/fjcwQV+CtaZaxl9zy9VMCgrLwI01r1pNhPNrCnt9heFbwZGMkzF++I0qsHslDn/ QOaw== 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-Google-Smtp-Source: AA6agR5mT6qWQH61oTOIz3d9vq+p6tD1VsDo5J7ziuOPRMNDtiFj8mE7Nkm2lW7JcoQ/GbevE98SpQ== 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 From: Marc =?iso-8859-1?Q?Poulhi=E8s?= To: gcc-patches@gcc.gnu.org Cc: Steve Baird Subject: [Ada] Document change to legality checks for Inox case statements Message-ID: <20220906071547.GA1280314@poulhies-Precision-5550> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="huq684BweRXVnRxX" Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 List-Id: --huq684BweRXVnRxX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. --huq684BweRXVnRxX Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="patch.diff" Content-Transfer-Encoding: 8bit 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 --huq684BweRXVnRxX--