diff options
author | Bob Duff <duff@adacore.com> | 2024-12-09 12:20:34 -0500 |
---|---|---|
committer | Marc Poulhiès <dkm@gcc.gnu.org> | 2025-01-06 10:14:46 +0100 |
commit | 2a38c2330fd498dd929fedff32023050e223c039 (patch) | |
tree | 5705e351a65e6be0ba7dc1afa3f00ac2e473243b /gcc/fortran | |
parent | fd52383f3f90de94e048e7902437b08eafa4adac (diff) | |
download | gcc-2a38c2330fd498dd929fedff32023050e223c039.zip gcc-2a38c2330fd498dd929fedff32023050e223c039.tar.gz gcc-2a38c2330fd498dd929fedff32023050e223c039.tar.bz2 |
ada: null procedure cannot be used as compilation unit
This patch gives a syntax error if a null procedure is used as
a compilation unit. The error was already given during semantic
analysis; now it is given in the parser, which is more convenient
for other tools like gprbuild, because the -gnats switch now
gives the error.
Note that the old message "null procedure cannot be declared at library
level" was wrong; "library level" is not the same thing as "is a library
unit".
gcc/ada/ChangeLog:
* par-ch10.adb (P_Compilation_Unit): Give an error for "is null".
* sem_ch10.adb (Analyze_Subunit): Remove check for "is null"
as a subunit.
* sem_ch6.adb (Analyze_Subprogram_Declaration):
Remove check for "is null" as a library unit.
Diffstat (limited to 'gcc/fortran')
0 files changed, 0 insertions, 0 deletions