diff options
author | Justin Squirek <squirek@adacore.com> | 2017-01-23 11:31:25 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2017-01-23 12:31:25 +0100 |
commit | 2a02fa985d8c474e0855f1354746f54a2b3fc749 (patch) | |
tree | 0e13958e1d021ac4f170c15a3c063e837a665a94 | |
parent | 15e2e3f57e376cd285f50a9a6c92a2712e53e917 (diff) | |
download | gcc-2a02fa985d8c474e0855f1354746f54a2b3fc749.zip gcc-2a02fa985d8c474e0855f1354746f54a2b3fc749.tar.gz gcc-2a02fa985d8c474e0855f1354746f54a2b3fc749.tar.bz2 |
sem_ch3.adb (Analyze_Declarations): Correct comments
2017-01-23 Justin Squirek <squirek@adacore.com>
* sem_ch3.adb (Analyze_Declarations): Correct comments
* freeze.adb (Find_Constant): Add detection of deferred constants
so they are not incorrectly flagged as premature.
From-SVN: r244785
-rw-r--r-- | gcc/ada/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/ada/freeze.adb | 1 | ||||
-rw-r--r-- | gcc/ada/sem_ch3.adb | 2 |
3 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 8a676d8..c279bce 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2017-01-23 Justin Squirek <squirek@adacore.com> + + * sem_ch3.adb (Analyze_Declarations): Correct comments + * freeze.adb (Find_Constant): Add detection of deferred constants + so they are not incorrectly flagged as premature. + 2017-01-23 Ed Schonberg <schonberg@adacore.com> * scans.ads: New token At_Sign. Remove '@' from list of illegal diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index c1dbd33..c8eef9c 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -1356,6 +1356,7 @@ package body Freeze is N_Object_Declaration and then not Is_Imported (Entity (Nod)) and then not Has_Completion (Entity (Nod)) + and then not Is_Frozen (Entity (Nod)) then Error_Msg_NE ("premature use of& in call or instance", N, Entity (Nod)); diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 9cc64b3..fb42f6a 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -2637,7 +2637,7 @@ package body Sem_Ch3 is -- Check for an edge case that may cause premature freezing of a -- private type. - -- If there is an array type which uses a private type from an + -- If there is an type which depends on a private type from an -- enclosing package that is in the same scope as a non-completing -- expression function then we cannot freeze here. |