[Ada] Simplify checks for library unit pragmas

Pierre-Marie de Rodat derodat@adacore.com
Thu Nov 26 08:41:00 GMT 2020


If a library unit pragma is ignored then Check_Valid_Library_Unit_Pragma
was rewriting it into a null statement; this null statement then was
then detected by at the callsites to terminate analysis of the pragma.

Now if a pragma is ignored, then Check_Valid_Library_Unit_Pragma raises
an exception and no action further is needed at the callsites.

Cleanup only; behaviour is unaffected.

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

gcc/ada/

	* sem_prag.adb (Check_Valid_Library_Unit_Pragma): Raise
	exception.
	(Analyze_Pragma): Remove detection of rewritten pragmas.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 3975 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20201126/06c524b7/attachment-0001.bin>


More information about the Gcc-patches mailing list