[Ada] Complain about missing -gnat2020 switch on iterator_filter

Pierre-Marie de Rodat derodat@adacore.com
Tue Dec 15 11:42:41 GMT 2020


Reuse Error_Msg_Ada_2020_Feature to complain about a missing -gnat2020
switch when compiling iterator_filter that would be legal in Ada 2020,
but the compiler is expecting an earlier version of the language.

A small enhancement; opportunity spotted while adding support for
iterator filters in GNATprove.

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

gcc/ada/

	* par-ch5.adb (P_Loop_Parameter_Specification): Complain about
	missing -gnat2020 switch.
	(P_Iterator_Specification): Likewise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 924 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20201215/a234700a/attachment-0001.bin>


More information about the Gcc-patches mailing list