From patchwork Thu Jun 20 08:52:51 2024 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: 92487 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F2031388A01D for ; Thu, 20 Jun 2024 08:54:31 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by sourceware.org (Postfix) with ESMTPS id 89A7E3888C7D for ; Thu, 20 Jun 2024 08:53:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 89A7E3888C7D 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 89A7E3888C7D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::430 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718873614; cv=none; b=h1TngZSZOLp0iVu/uOd4l06ht+7SHzE5DJGtjkY9FB/6nG1AEiqw5Hy4PfvXfDkPLM3+oM4uqR+hF77f1XUWnQkK5b6oUIWUw7GFHcef71TWFjeXxGn9dk3fQDt47GFyp4LcVS/Kdu/qiSuZbdggMGQe6F3WvvTnBnDOlo6gmnE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718873614; c=relaxed/simple; bh=pV5U4JpNYn4CmPVs7DcpHK63PJiB0lv/t0VrDCASUyw=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Gy2sYDiKjDfYBJ3shrHJikqu60Xz22YgFDcFsjvmWUkYttppELUtG0AtjL/hUOZF7tqRtnL8eOP+0rPZlKYD8NhiLZvA7pP5QenQNkQFMyC62Jz3CO0CG+5LxLzds0fJdQyjVfdvNG+/aepyBHMrgtICyqNSvVeBTrHZvf+MKdM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-3629c517da9so714705f8f.2 for ; Thu, 20 Jun 2024 01:53:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718873611; x=1719478411; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=9oMmeWUqQdZa3gjvTaepViQc+Kcx/kABlCjzHVqtVxo=; b=OLIYVVLVHFu6Txxs6Y2JjMRzO927KqWKpfKrpqWIA+9bYyiMigB2XlPZTYK0CgJLdW AchIgCje7uPmuKd0/RAg/u5JBcl92RvYErq9A/2MX+3OTtmjWsBedH8yFMKw6n4vLTT4 FSFp4VUVa7dgzWLx5qxdjk+nQK8mn+WfgkCQH5NYw64yzoQrNTvfrUHIb/lDQCqJJqeH m/pKcGbLRbNECuywkF87mmc944ZagZE38rBvLu6UHdof5LEEWD6LhRSXoBhHu+whCYk/ IuS3Qft74VgvGq5ZNirPvL3SOGHqTXgY+Hs97VgLBDJmwonM4mFpSXYutpU94Q8lRtV+ uSRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718873611; x=1719478411; 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=9oMmeWUqQdZa3gjvTaepViQc+Kcx/kABlCjzHVqtVxo=; b=Y2HUSWGcW3kSQNOTKTKkYMNNqI0us0/sLIdEoK5Rj0EaJcrTXw1LapIAlhX8pby+04 y/KrS2zsrWyHFbqAT7+TbI2lS5Jo/UI4sYTl//8Pqq8smrn+sqyLJLTaNcn+lXm6ImMs yfGa2XItjmmjMalBZb5BN9JuesH49qZNdZlYDk+gb8a8n3JPSzBEO7gAXeirvkdceSUU LeHbfRLth7Vg/vLQ6ScEI4AUrC4APQLP2RQNsUsPHYXEqoRxACvikAl5ZhgVQfPPvcwd 9/Sya5Jwj+V4OZDbDO8NP1Fpg8yR0bKvcxdFg39skKoZ8RKv7mPEqbytcG65s6MXRW9i Ah2Q== X-Gm-Message-State: AOJu0YzLVpqiv8ClfAjo8v4hyzWN+hEjDHWvigdBkdL0HiNkDmXXLelA aGzUoYXtww2a4bB95V/ap1RcAv+W8ToOoCl7PRPLjb4mprXx6SwgAOXYddLzcGM1sDHKnxpK80s = X-Google-Smtp-Source: AGHT+IGkEZMDWckQt2QAqWvTWNDkdvGbX5ZLDQJyfPmKpmy581WGaGI+IIINzRzNbDeYQ3q+AJwrKw== X-Received: by 2002:adf:e84e:0:b0:361:78c8:2eb6 with SMTP id ffacd0b85a97d-363175b904emr3945019f8f.25.1718873610811; Thu, 20 Jun 2024 01:53:30 -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 ffacd0b85a97d-363c795febfsm3305522f8f.104.2024.06.20.01.53.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jun 2024 01:53:30 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Piotr Trojanek Subject: [COMMITTED 01/30] ada: Fix list of attributes defined by Ada 2022 Date: Thu, 20 Jun 2024 10:52:51 +0200 Message-ID: <20240620085321.2412421-1-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 MIME-Version: 1.0 X-Spam-Status: No, score=-13.7 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org From: Piotr Trojanek Recognize references to attributes Put_Image and Object_Size as language-defined in Ada 2022 and implementation-defined in earlier versions of Ada. Other attributes listed in Ada 2022 RM, K.2 and currently implemented in GNAT are correctly categorized. This change only affects code with restriction No_Implementation_Attributes. gcc/ada/ * sem_attr.adb (Attribute_22): Add Put_Image and Object_Size. * sem_attr.ads (Attribute_Impl_Def): Remove Object_Size. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_attr.adb | 4 +++- gcc/ada/sem_attr.ads | 11 ----------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 9c3bc62d321..c2bb094492d 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -185,7 +185,9 @@ package body Sem_Attr is (Attribute_Enum_Rep | Attribute_Enum_Val | Attribute_Index | - Attribute_Preelaborable_Initialization => True, + Attribute_Object_Size | + Attribute_Preelaborable_Initialization | + Attribute_Put_Image => True, others => False); -- The following array contains all attributes that imply a modification diff --git a/gcc/ada/sem_attr.ads b/gcc/ada/sem_attr.ads index 52359e40ef6..17dce1fb0b0 100644 --- a/gcc/ada/sem_attr.ads +++ b/gcc/ada/sem_attr.ads @@ -381,17 +381,6 @@ package Sem_Attr is -- other composite object passed by reference, there is no other way -- of specifying that a zero address should be passed. - ----------------- - -- Object_Size -- - ----------------- - - Attribute_Object_Size => True, - -- Type'Object_Size is the same as Type'Size for all types except - -- fixed-point types and discrete types. For fixed-point types and - -- discrete types, this attribute gives the size used for default - -- allocation of objects and components of the size. See section in - -- Einfo ("Handling of Type'Size values") for further details. - ------------------------- -- Passed_By_Reference -- -------------------------