]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Handle attributes related to Ada 2012 iterators as internal
authorPiotr Trojanek <trojanek@adacore.com>
Tue, 26 Mar 2024 15:23:41 +0000 (16:23 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Tue, 7 Jan 2025 12:33:33 +0000 (13:33 +0100)
commita1b92ccf90b7376dbe36716d75fb270434797ddc
tree8c63d471a2f63f51ba38f3d54e0948d50181d834
parent69dfa02bdb9eaadc24552f280a390a0737386a54
ada: Handle attributes related to Ada 2012 iterators as internal

Use existing machinery for internal attributes to handle attributes
related to Ada 2012 iterators. All these attributes exist exclusively
as a mean to delay processing.

Code cleanup. The only change in behavior is the wording of error
emitted when one of the internal attributes appears in source code:
from "illegal attribute" (which used to be emitted in the analysis)
to "unrecognized attribute (which is emitted by the parser).

gcc/ada/ChangeLog:

* exp_attr.adb (Expand_N_Attribute_Reference): Remove explicit
handling of attributes related to Ada 2012 iterators.
* sem_attr.adb (Analyze_Attribute, Eval_Attribute): Likewise;
move attribute Reduce according to alphabetic order.
* snames.adb-tmpl (Get_Attribute_Id): Add support for new internal
attributes.
* snames.ads-tmpl: Recognize names of new internal attributes.
(Attribute_Id): Recognize new internal attributes.
(Internal_Attribute_Id): Likewise.
(Is_Internal_Attribute_Name): Avoid duplication in comment.
gcc/ada/exp_attr.adb
gcc/ada/sem_attr.adb
gcc/ada/snames.adb-tmpl
gcc/ada/snames.ads-tmpl