[Ada] Disallow Predicate_Failure without predicate

Pierre-Marie de Rodat derodat@adacore.com
Wed Jul 8 14:57:34 GMT 2020


This patch checks RM-3.2.4(14.2/4), which requires Predicate_Failure to
be specified only on a subtype with a previous predicate specification
(for Static_Predicate or Dynamic_Predicate). We apply the same rule to
the GNAT-specific Predicate aspect.

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

gcc/ada/

	* sem_ch13.adb (Predicate_Failure): Check that the type has
	predicates.  Remove the setting of Has_Delayed_Aspects and
	Freeze_Node, because (if the code is legal) it should have
	already been done by the predicate aspect.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 1524 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200708/75ba4ba0/attachment-0001.bin>


More information about the Gcc-patches mailing list