diff options
author | Ed Schonberg <schonberg@adacore.com> | 2017-04-25 13:28:14 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2017-04-25 15:28:14 +0200 |
commit | e1691d7e604001acf559885a0db261eaef0dc5d8 (patch) | |
tree | d24645f3ab59ca8707c75802915e62f8e2bd9d25 /gcc/ada/sem_util.ads | |
parent | 57f6e00c4611b78a71d060e6a5a10ac95ec0f8fd (diff) | |
download | gcc-e1691d7e604001acf559885a0db261eaef0dc5d8.zip gcc-e1691d7e604001acf559885a0db261eaef0dc5d8.tar.gz gcc-e1691d7e604001acf559885a0db261eaef0dc5d8.tar.bz2 |
sem_util.adb, [...] (From_Nested_Package): New predicate to determine whether a type is declared in a local package that...
2017-04-25 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb, sem_util.ads (From_Nested_Package): New predicate
to determine whether a type is declared in a local package that
has not yet been frozen.
* freeze.adb (Freeze_Before): Use new predicate to determine
whether a local package must be installed on the scope stack
in order to evaluate in the proper scope actions generated by
aspect specifications, such as Predicate
* sem_ch13.adb: Simplify code in Analyze_Aspects_At_Freeze_Point
using new predicate.
From-SVN: r247229
Diffstat (limited to 'gcc/ada/sem_util.ads')
-rw-r--r-- | gcc/ada/sem_util.ads | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads index a178755..e494f14 100644 --- a/gcc/ada/sem_util.ads +++ b/gcc/ada/sem_util.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2016, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2017, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -819,6 +819,13 @@ package Sem_Util is -- - "task" when Id is a single task object, task type or task body -- All other non-matching words remain as is + function From_Nested_Package (T : Entity_Id) return Boolean; + -- A type declared in a nested package may be frozen by a declaration + -- appearing after the package but before the package is frozen. If the + -- type has aspects that generate subprograms, these may contain references + -- to entities local to the nested package. In that case the package must + -- be installed on the scope stack to prevent spurious visibility errors. + procedure Gather_Components (Typ : Entity_Id; Comp_List : Node_Id; |