From patchwork Mon May 15 09:44:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Marc_Poulhi=C3=A8s?= X-Patchwork-Id: 94059 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp6795098vqo; Mon, 15 May 2023 02:56:07 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7CUvfRSpe1+ZIVokALMEySQlr7ExLE+emA4+vjSzwKx53LWfqDXb56uQ6VdQ/12KXQE7wV X-Received: by 2002:a17:907:a41e:b0:94a:4b7a:9886 with SMTP id sg30-20020a170907a41e00b0094a4b7a9886mr32907026ejc.12.1684144567358; Mon, 15 May 2023 02:56:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684144567; cv=none; d=google.com; s=arc-20160816; b=gFzSBAOsnvrLXfZqWMfi93oiM7kO9I7d3r39b+oQoB1X5cMe40cX0R9QepUAXcV6iL zBz9PYvyYe76K9Xm6YOHajmoe8pLIw+mm28kRhR0bFMg5dd+sMQmjte9Wu2EWq8o/sFs iNd2NYBaE+q2YQgvdYWuL4R2/iyIdBjgqV3OJg9ZSoRWgjPZ2EaaXdOfaWgHtGy1uAbA 5wk55FNIeWI1kv4WcjbGbI0jVyCrPQN8P3sBv/Rk3ibJc3wpJMzddhy1TKwRjGll5SWG 6XZ+3+8+2j6nbYuP2kKoXsmx7+glzlmAJy+nhPHb7mP0ec8Z06SVPi1GlOeu/p0cTKHI i0LA== 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-transfer-encoding:mime-version:message-id:date:subject:cc :to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=aOCpsuK4jXfJt9BwLRJ8oYYYFQbUe59NPaORDucXL5I=; b=dSzyCtOg6GUfZKWdSwmjAS655YXdCWnwU8wS56OrbWU3kvoyi8S+7fETGMRbL3LEu8 Ixm/BQIfD+ehTBkFqacN/fGF+lZnZzCHRbGkG+Jd5owlpQ4Ese1z8XElxdaFvmrCTwyW bUnkC1ADZfHKrED7ZrRMP10Ap0bLZmx4S195G1zd9fms5pnr5Ri8H6iWjK9A9CUpbPQ/ w7mWFc+J+9oNtEyq3gMwrxsM0tqi2/BT6K4NeQDzjA9ZUHMvApXFm0/RI8qDJCVCqsjU Q8MKIRUAlVR4N/v3Srf8W0InxUY2L9/3ASQvt8T5jtIjU6OEJnE6so3wtTOnsa/waxvB pcoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=C5+VrEfL; 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 (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id a21-20020a1709066d5500b0096ad9f21633si4017734ejt.498.2023.05.15.02.56.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 May 2023 02:56:07 -0700 (PDT) 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=C5+VrEfL; 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 409443889802 for ; Mon, 15 May 2023 09:49:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 409443889802 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684144185; bh=aOCpsuK4jXfJt9BwLRJ8oYYYFQbUe59NPaORDucXL5I=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=C5+VrEfLHGdbO9s7WMfxfkh9C7xAaf9neL/eVyh9q6r420+IiGbjAkOqOmgv+NElS GQ8HvUFrXJcvkmbIUP4DkGj731rRsRGhugtlbwZuWiYXqM+faE1iwIVd4xOnJ4pTt0 W/0AG9J3oLxpoNT/waJmSrXXRxE5+2TcAyh4zdpE= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by sourceware.org (Postfix) with ESMTPS id E52E8383F979 for ; Mon, 15 May 2023 09:44:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E52E8383F979 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-3f417ea5252so67149115e9.0 for ; Mon, 15 May 2023 02:44:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684143847; x=1686735847; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=aOCpsuK4jXfJt9BwLRJ8oYYYFQbUe59NPaORDucXL5I=; b=bSvtqAmyG3rcUL6tJQO8k4U2oCrsxFANRt+OFVV+xfZguxgpyu9zfAf4hRNS+sic3j kkWkSm/uVOW7rDq32wcgCswnJNesw97ysJ0ugfzAcX1jiwTVBHbKx1oG2eD4SlfwGt6e lLNf3uPoRgaIirxhB0zLQEnPYjuyXSrPPKSdm2YzC1DMPGBlmnS6ynNSUSVt7sMQWOyS tFSG4V8j2ndRypmIzeJbfuORfl3SBTOahIqiYMlNAKxFSEYBms6hLSrBZ4XB5J602lFf MdnjbgULTEJspB/Ml1dNF5EAL2pBnqlvkhvbtWT8Z8jYoDdbJUG+G5k9kus8WooCc936 zLvQ== X-Gm-Message-State: AC+VfDy62dMVSN/KmFtl9+B9xeWxJ4Nd0X7VL/iMidjv7OHS7jFsldke iva52EbMPybFQ5DO0xrbt2ByyMaznWSwhHa/26FH3w== X-Received: by 2002:a5d:58d9:0:b0:2f9:1224:2474 with SMTP id o25-20020a5d58d9000000b002f912242474mr24451198wrf.23.1684143846710; Mon, 15 May 2023 02:44:06 -0700 (PDT) Received: from poulhies-Precision-5550.telnowedge.local (lmontsouris-659-1-24-67.w81-250.abo.wanadoo.fr. [81.250.175.67]) by smtp.gmail.com with ESMTPSA id d18-20020adfe852000000b002fe13ec49fasm31771606wrn.98.2023.05.15.02.44.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 May 2023 02:44:06 -0700 (PDT) To: gcc-patches@gcc.gnu.org Cc: Bob Duff Subject: [COMMITTED] ada: Improve comment on First_Entity Date: Mon, 15 May 2023 11:44:04 +0200 Message-Id: <20230515094404.1408615-1-poulhies@adacore.com> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 X-Spam-Status: No, score=-13.4 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: =?utf-8?q?Marc_Poulhi=C3=A8s?= 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?1765953573865355980?= X-GMAIL-MSGID: =?utf-8?q?1765953573865355980?= From: Bob Duff Clarify that "act as scope" overlaps with "[sub]type". gcc/ada/ * einfo.ads: (First_Entity): Update comment explaining why this exists on all [sub]types, as opposed to just the ones with associated entities. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/einfo.ads | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads index 878737c7cc1..6748533a32c 100644 --- a/gcc/ada/einfo.ads +++ b/gcc/ada/einfo.ads @@ -1347,11 +1347,12 @@ package Einfo is -- First_Entity -- Defined in all entities that act as scopes to which a list of --- associated entities is attached. This is defined in all [sub]types, --- including things like scalars that cannot have nested entities, --- which makes it more convenient to Mutate_Entity between type kinds. --- Points to a list of associated entities using the Next_Entity field --- as a chain pointer with Empty marking the end of the list. +-- associated entities is attached, and also in all [sub]types. Some +-- entities are both; for example E_Record_Type acts as a scope and +-- is a type. [Sub]types that do not act as scopes (e.g. scalars) are +-- included to make it more convenient to Mutate_Entity between type +-- kinds. Points to a list of associated entities linked through the +-- Next_Entity field with Empty marking end-of-list. -- See also Last_Entity. -- First_Exit_Statement