[Ada] Emit error messages for null/generic nonreturning procedures

Pierre-Marie de Rodat derodat@adacore.com
Fri Nov 27 09:18:00 GMT 2020


This commit adds checks for rule 6.5.1 4/3 of the Ada RM which declares
nonreturning procedures and nonreturning generic procedure instances
illegal.

The reason this check is performed in sem_prag.adb rather than in
Check_Returns in sem_ch6.adb is that generic procedure instances won't
have their No_Return flag set yet when Check_Returns is called.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* sem_prag.adb (Analyze_Pragma): declare new Check_No_Return
	function and call it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 3967 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20201127/cfd0e633/attachment-0001.bin>


More information about the Gcc-patches mailing list