]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Apply restriction No_Implementation_Attributes to source nodes only
authorPiotr Trojanek <trojanek@adacore.com>
Mon, 25 Mar 2024 21:49:58 +0000 (22:49 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Mon, 20 May 2024 07:47:04 +0000 (09:47 +0200)
commit32aa8b92c59d9c8343a618c7d1614bed7b0e107d
treea569c2eb0af5784bcf4f5d65ddf67ce542ac0898
parent4ed963a52a0a7349f0beb765ee0802857d1752eb
ada: Apply restriction No_Implementation_Attributes to source nodes only

Restriction No_Implementation_Attributes must not be applied to nodes
that come from expansion. In particular, it must not be applied to
Object_Size, which is implementation-defined attribute before Ada 2022,
but appears in expansion of tagged types since Ada 95.

gcc/ada/

* sem_attr.adb (Analyze_Attribute): Move IF statement that
checks restriction No_Implementation_Attributes for Ada 2005,
2012 and Ada 2022 attributes inside Comes_From_Source condition
that checks the same restriction for Ada 83 attributes.
gcc/ada/sem_attr.adb