From patchwork Thu May 25 08:05:38 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: 98849 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp197107vqr; Thu, 25 May 2023 01:14:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5DjYikgKQ/lT0VdbF7p0x4Hhp6URaBKRStbxrtobZAc7dsJl7LPd10Inj9n/gjN0OjI2mp X-Received: by 2002:a17:907:2d1e:b0:94f:8605:3f31 with SMTP id gs30-20020a1709072d1e00b0094f86053f31mr829951ejc.42.1685002453147; Thu, 25 May 2023 01:14:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685002453; cv=none; d=google.com; s=arc-20160816; b=lmdOvPBoZHiB2Sp2bkEgl2F9O0Q3YjC1+rCE4gYPXzVp1IsznNSZnLpMqtDAlgCow/ iHtt5E+2w7N3AOfGNZub4K15MI9zYp/QqfYBnzS+2MlZB4CzfMg3agE0GtVX5k4c43tY FtCbOZhfkPeO2Joe2lol4r7EBwZrwzmgSOwQeX/85PG2c9n1+VzABaYtCopITGJw9vUk eqrNH7n9/CTohc8W2ki2j7mPPXatIGWCOzUcMZbe7wHlz8NxT0TDnd6r8tSlKcYIbXag 7L3FFaufthRTh9+eTot54SEadMM1EbkzlgYZX/wHgcBgqotkrwGAnuLx80NayjHx0QwH O8Jw== 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=keOYRWNtklxZ2AGj+1qYUVh55GOT+gpEWIc4uYfwNR8=; b=NQt9K0veM+WUDrzr94PJtWs0CsGmTuj4XeuUZ3K31TvULnczrEJB68Y/dHBUKvEM3U B2MRtajX2KtAS486MIq+1yz4vekZa5nsaX79oac1tmljwWE1yEBn2dsNllN8NlyBZBmD 5CgVnQ0+Ueo9FkDQiJXw4G0rix7CAgs4DqetDW3hsGWDD2Y2V0AJidaywmMNtwLKd7/g TLirAy2BHIg5spfukC2MMX0zCUVlzhB8KWTnfrU7z8W1F1PWtEFH3qHWlaX/IJ+4nZit 1V90lht6+tnPq0i6KhWRm+2QPGZhTxyWXKGHfypjepF0ZID4FI5ZrwEBtzfxa+HLMHwP b0OQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=mWqngbI8; 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 sa38-20020a1709076d2600b00969f943c8a3si798435ejc.431.2023.05.25.01.14.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 May 2023 01:14:13 -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=mWqngbI8; 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 32CB1384645D for ; Thu, 25 May 2023 08:09:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 32CB1384645D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685002189; bh=keOYRWNtklxZ2AGj+1qYUVh55GOT+gpEWIc4uYfwNR8=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=mWqngbI8mfCXV4eC902//Y0KsGHipeNzKa1HTbcS7wqfGTbOo4mNqqYch9hsSKSBF piAu4a9JpRbmwTGfDYxFp82KtY5hy2qPzV4GjTfRjRj+mYyBTMhfCC2g3egY0p+rZu KGyHuxOlt97LCHjiLmY/i0TiwDJ8Y9zK3uTcIA+o= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id CEC413857739 for ; Thu, 25 May 2023 08:05:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CEC413857739 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-30a4ebbda56so1758878f8f.1 for ; Thu, 25 May 2023 01:05:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685001941; x=1687593941; 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=keOYRWNtklxZ2AGj+1qYUVh55GOT+gpEWIc4uYfwNR8=; b=S7zKYL2VP2T2y3xUVooE0FEEytCzIoRTyvk00tEMpQcNeGfWUAdPUR+1KqeA7i9seA g9lJHFvc2Zz/P4GeCvhlYwFtoZFljbHw/E9TBRz0TSwsJQcKISti1E1cO5Mosx17gxiQ jch6bNRK9UZU19LDfTNsuKrN0ZpKnY0QADPxfDVOUij2aMbFnWVVbptUh4xos5JK6iyu HS+sHLX6uwDiUDw7O0N1TSNz8ocl2vtvjuignfQD2sS/EDIj5KqLwAJG1B0LQOP6ZyQ3 kZ7KZZs6lVBmeJW21vkQhE+0msfoO/FpD+nyffxJyQ+vRhlMHOs34CPxrkSjIEE6YtfZ MXlQ== X-Gm-Message-State: AC+VfDwV62pzlVmNRlEZeGaYLFGW2qHxdV+NVdTNNUb3faxY5mZ4RMF4 DGNwK00dlsH7M9wH5tlnNpgKZBe5Ymd1IAdo2Rr7lA== X-Received: by 2002:a5d:43c8:0:b0:309:3e48:f400 with SMTP id v8-20020a5d43c8000000b003093e48f400mr1739048wrr.18.1685001941637; Thu, 25 May 2023 01:05:41 -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 q14-20020adff50e000000b00307acec258esm913974wro.3.2023.05.25.01.05.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 May 2023 01:05:41 -0700 (PDT) To: gcc-patches@gcc.gnu.org Cc: Ronan Desplanques Subject: [COMMITTED] ada: Enrich documentation of subprogram Date: Thu, 25 May 2023 10:05:38 +0200 Message-Id: <20230525080539.1956162-1-poulhies@adacore.com> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 X-Spam-Status: No, score=-13.6 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?1766853132661473100?= X-GMAIL-MSGID: =?utf-8?q?1766853132661473100?= From: Ronan Desplanques This patch adds documentation to the subprogram Replace_Type in Sem_Ch3. In particular, references to relevant parts of the Ada reference manual are added. gcc/ada/ * sem_ch3.adb (Replace_Type): Add more documentation. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_ch3.adb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 0bddfa84463..db2bbb5ee8e 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -15849,7 +15849,11 @@ package body Sem_Ch3 is -- derived type. procedure Replace_Type (Id, New_Id : Entity_Id); - -- When the type is an anonymous access type, create a new access type + -- Set the Etype of New_Id to the appropriate subtype determined from + -- the Etype of Id, following (RM 3.4 (18, 19, 20, 21)). Id is either + -- the parent type's primitive subprogram or one of its formals, and + -- New_Id is the corresponding entity for the derived type. When the + -- Etype of Id is an anonymous access type, create a new access type -- designating the derived type. procedure Set_Derived_Name;