Message ID | 20240517083207.130391-17-poulhies@adacore.com |
---|---|
State | New |
Headers | show
Return-Path: <gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=j1BIa/iy; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VggMf5CjHz20dJ for <incoming@patchwork.ozlabs.org>; Fri, 17 May 2024 18:38:06 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DDFC93849AE3 for <incoming@patchwork.ozlabs.org>; Fri, 17 May 2024 08:38:04 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by sourceware.org (Postfix) with ESMTPS id 1DF6E3849AEC for <gcc-patches@gcc.gnu.org>; Fri, 17 May 2024 08:32:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1DF6E3849AEC Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1DF6E3849AEC Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::333 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715934767; cv=none; b=r/RCN9F9DYa8wphm2j22Xf+H3wwzPbhamIMSS4wHSMqjLY4IgimAgl2+hj8bmySDE85UI3hOra3lfZYz0T2kPtdW55pP6iy60RVw7aeX2/7Lmy/jmtyu/c3pe7wQEklrWGdnk9SS503za5SIA265LgSkyqQUC2VYwOb07J89L54= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715934767; c=relaxed/simple; bh=kyNzRFpy/svX3nttwGAGsSBBboX0Es4xkCn7DshYNe4=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Nkt/v22zAgGyTjz0b+xf8tAMs+cUJbNY/WyHSNneRXzq2vEUKBSi+MRfOPeWecppjne+LR1sJe3c9eMMW355Ek5PKxw+9T79HqFPpFi+JN40Tasvfcs6vPYUAbzGCQiBteDHvIWjxSuIYSgc+nfu1/Tl4r0MvbwR8QoyCdqEU4g= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-420298ff5b1so18303355e9.1 for <gcc-patches@gcc.gnu.org>; Fri, 17 May 2024 01:32:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1715934753; x=1716539553; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mJHn0CbupWqJqKV4ApxcmGCdnXHuAM2ztfd40UP99n0=; b=j1BIa/iyaa1aek+QQMh9HC2oIPSIKu5UatyQ1/BfuTp2EuHt/HmvV3htY9t5jKWTAt 7DaFBq5AwhxadaiRMlbHXUHObrTRnY7VJagdUr90WABBwOUlaxKMQ1qpm73oImk6xY+6 wu3ZFns4/xmXf0WINR7sSe3O8hMU8nu++de2e/OrlsWGMEWo2rJxzLbhG2zINEQn/bPY 5g0nq/Cp26aQLYEHm2kNH/Wl4Tp52qHtiw3ilWfqlSbNxPoc9BZrOo1qidqj5qf9YWCi xwlH3wRFptgOKFEkZmBwD/y964Qmq/G0L74U6cjIMQXFOHUHFd2TYltquYxbnPEH7orY 6igg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715934753; x=1716539553; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mJHn0CbupWqJqKV4ApxcmGCdnXHuAM2ztfd40UP99n0=; b=mXCBwvMUp0PGb2tE6CfFLPM5vsy2QbtvhziyTl/2FGDK48kp8d/7SK6raStshfxXII Me+eun8PWfPONRLduQGcZO1elNLN/LRxyWl69PfIHi6kg/ChSCHpz6StTEt1hXo9QuDi NALGEgLeA0uPKydZRbiwMfuHiDqI2H0Wd6KkB4zx9I5mZEtqGuH1ZeiQ85bl1Ms9QVGg Uw3cU3jvZsV/HgpsDiEjDD9DAiwmRvgqBdaO7MDcExhJjhpTotog8tBwMAVnqJT5s1so Jkpcm4p4u+iJrBl7ZG6ETVn2778+vZxPyHtIyKClRT0WIEH6ADNXKPwkTdoh5S1abBjk hpOg== X-Gm-Message-State: AOJu0YwAAoo6TAZ5gl8QZMX9SRCZz9VCpsxJAge+J7lCMqHGtX02Ytf0 adamCFxJUVR7L1dNC0UN5hUn72VQ5bw6vq/V8YYh+H/4C0nXxrkR4mizJm/Q5BRm72AZWhJuQJg = X-Google-Smtp-Source: AGHT+IHC6jSRgMvQnlpmYGdfMwnGtxJx3O9HesBLPKdXDo5iEjMzkCNZHgOm2XPbNmi3CWTWwUY5gg== X-Received: by 2002:a05:600c:4fcd:b0:419:a3f:f4f6 with SMTP id 5b1f17b1804b1-41fea939fe2mr192700155e9.8.1715934752963; Fri, 17 May 2024 01:32:32 -0700 (PDT) Received: from poulhies-Precision-5550.lan ([2001:861:3382:1a90:de37:8b1c:1f33:2610]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-420273cff03sm75197045e9.26.2024.05.17.01.32.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 01:32:32 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= <poulhies@adacore.com> To: gcc-patches@gcc.gnu.org Cc: Ronan Desplanques <desplanques@adacore.com> Subject: [COMMITTED 17/35] ada: Update docs for Resolve_Null_Array_Aggregate Date: Fri, 17 May 2024 10:31:49 +0200 Message-ID: <20240517083207.130391-17-poulhies@adacore.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240517083207.130391-1-poulhies@adacore.com> References: <20240517083207.130391-1-poulhies@adacore.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-14.2 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 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.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org |
Series |
[COMMITTED,01/35] ada: Add support for 'Object_Size to pragma Compile_Time_{Warning, Error}
|
expand
|
diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb index 508c86bc5de..64e7db79ecc 100644 --- a/gcc/ada/sem_aggr.adb +++ b/gcc/ada/sem_aggr.adb @@ -409,11 +409,10 @@ package body Sem_Aggr is -- string as an aggregate, prior to resolution. function Resolve_Null_Array_Aggregate (N : Node_Id) return Boolean; - -- For the Ada 2022 construct, build a subtype with a null range for each - -- dimension, using the bounds from the context subtype (if the subtype - -- is constrained). If the subtype is unconstrained, then the bounds - -- are determined in much the same way as the bounds for a null string - -- literal with no applicable index constraint. + -- The recursive method used to construct an aggregate's bounds in + -- Resolve_Array_Aggregate cannot work for null array aggregates. This + -- function constructs an appropriate list of ranges and stores its first + -- element in Aggregate_Bounds (N). --------------------------------- -- Delta aggregate processing -- @@ -4540,7 +4539,8 @@ package body Sem_Aggr is Set_Parent (Constr, N); - -- Create a constrained subtype with null dimensions + -- Populate the list with null ranges. The relevant RM clauses are + -- RM 4.3.3 (26.1) and RM 4.3.3 (26). Index := First_Index (Typ); while Present (Index) loop
From: Ronan Desplanques <desplanques@adacore.com> The documentation comments for Sem_Aggr.Resolve_Null_Array_Aggregate suggested that this subprogram created a subtype, which it didn't. This patch replaces those comments with ones that better match the behavior. gcc/ada/ * sem_aggr.adb (Resolve_Null_Array_Aggregate): Update documentation comments. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_aggr.adb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)