From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 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-x436.google.com with SMTP id ffacd0b85a97d-30a4ebbda56so1758878f8f.1 for ; Thu, 25 May 2023 01:05:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1685001941; x=1687593941; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=keOYRWNtklxZ2AGj+1qYUVh55GOT+gpEWIc4uYfwNR8=; b=lC0bF1S7LGXjY5r71+LeInVdyhoFznu8135hCz0jDqrLTQIsJ8GU7j5WRxoM74uW7Z +z/zGqrV4UFZhAVRdCPiH9VSJPNX5EcJpT1ubp0CiqbEUf08Q224SGnoUw3qecv5M4pi UloMjj0xkRNDhqY/Ba1YZR0T3neP3Z67AnhPdvE1MerH+WwKAY1yoszdpP2R3V6YbGic zqZmxPn0XwktO3uYLZj29SGRwGbd3113lS7EjbNJzTkWBIvryOn+CDonCeFXiPm7Xd9t /c8rHGDv4jdUcJegfQ78ErNzguU8urEGz8UHo7JAxKQHcGzacvTdPo/TC+BhrLr7ZKb/ ShOA== 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-Google-Smtp-Source: ACHHUZ6Ht7SafLVYi68zl/+dDibZ8RItYRgTiqkNSmrLV08iHL43MpDdvibdGC+bZfsOUGn7GNhPzA== 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) From: =?UTF-8?q?Marc=20Poulhi=C3=A8s?= 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 Content-Transfer-Encoding: 8bit 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 List-Id: 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; -- 2.40.0