Skip to content
Snippets Groups Projects
Commit 2a38c233 authored by Bob Duff's avatar Bob Duff Committed by Marc Poulhiès
Browse files

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.
parent fd52383f
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment