]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Check default value aspects before resolving their expressions
authorPiotr Trojanek <trojanek@adacore.com>
Mon, 24 Jun 2024 13:25:06 +0000 (15:25 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Thu, 1 Aug 2024 15:14:36 +0000 (17:14 +0200)
commit8a22e9f1a105e82b01e85685611c0485d8e88234
treeb50b0360f7f50a2a08c5da5fb655599d09392c82
parentf46aaaecd99e80245bfaa90e08ff28a4d02d631b
ada: Check default value aspects before resolving their expressions

Check expressions of aspects Default_Value and Default_Component_Value
for references to the annotated types just before resolving these
expressions.

This patch fixes both an asymmetry in processing of those aspects and
adds a missing check in GNATprove on aspect Default_Component_Value.

gcc/ada/

* sem_ch13.adb (Check_Aspect_Too_Late): Move routine to top-level.
(Resolve_Aspect_Expressions): Check aspects Default_Value and
Default_Component_Value before resolving their expressions.
gcc/ada/sem_ch13.adb