]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Couple of small cleanups in semantic analysis of aspects
authorEric Botcazou <ebotcazou@adacore.com>
Thu, 9 May 2024 18:18:57 +0000 (20:18 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Fri, 14 Jun 2024 07:34:17 +0000 (09:34 +0200)
commit464f0cb46a17cd4b941f0b3182323a883c59dcf3
tree8cb1441a2fc9cc6ed39e0eadea96c4e57a8974a0
parentd3fe0ffdd22bcabcbf03ee936d89ab971fbc74c4
ada: Couple of small cleanups in semantic analysis of aspects

The first cleanup is to expose a consistent interface from Sem_Ch13 for the
analysis of aspects at various points of the program.  The second cleanup is
to fix the awkward implementation of the analysis of the specification for
the aspects Stable_Properties, Designated_Storage_Model, Storage_Model_Type
and Aggregate, which are always delayed, and the incorrect placement of that
of the aspect Local_Restrictions, which is never delayed.

gcc/ada/

* freeze.adb (Freeze_All): Call Check_Aspects_At_End_Of_Declarations
to perform the visibility check for aspects.
* sem_ch13.ads (Check_Aspects_At_End_Of_Declarations): Declare.
(Check_Aspect_At_Freeze_Point): Move to...
(Check_Aspect_At_End_Of_Declarations): Move to...
* sem_ch13.adb  (Check_Aspect_At_Freeze_Point): ...here.
(Check_Aspect_At_End_Of_Declarations): ...here.
(Analyze_Aspect_Specifications): Remove peculiar processing for
Stable_Properties, Designated_Storage_Model, Storage_Model_Type
and Aggregate.  Move that of Local_Restrictions around.  Reset
Aitem at the beginning of the loop for each aspect.
(Check_Aspects_At_End_Of_Declarations): New procedure.
gcc/ada/freeze.adb
gcc/ada/sem_ch13.adb
gcc/ada/sem_ch13.ads