6.5.1 Pragma No_Return
No_Return indicates that a procedure cannot return normally; it may propagate
an exception or loop forever.
The form of a pragma
No_Return, which is a representation pragma (see 13.1
is as follows:
shall denote one or more procedures or generic procedures; the denoted
entities are non-returning
. The procedure_local_name
shall not denote a null procedure nor an instance of a generic unit.
A return statement shall not apply to a non-returning
procedure or generic procedure.
A procedure shall be non-returning if it overrides
a dispatching non-returning procedure.
to the places where Legality Rules normally apply (see 12.3
this rule applies also in the private part of an instance of a generic
If a renaming-as-body completes a non-returning procedure
declaration, then the renamed procedure shall be non-returning.
If a generic procedure is non-returning, then so
are its instances. If a procedure declared within a generic unit is non-returning,
then so are the corresponding copies of that procedure in instances.
If the body of a non-returning procedure completes
normally, Program_Error is raised at the point of the call.
procedure Fail(Msg : String); -- raises Fatal_Error exception
-- Inform compiler and reader that procedure never returns normally