[Ada] AI12-0138: Iterators and other nonoverridable aspects

Pierre-Marie de Rodat derodat@adacore.com
Tue Jun 15 10:20:52 GMT 2021


This Ada202X AI, as well as AI12-0396 and AI12-0423, clarifies the
notion of nonoverridable aspects, as well as the rules for confirming
inheritance of such aspects. This patch refines the check for confirming
specifications to allow, e.g. renamed discriminants to carry an
Implicit_Dereference aspect specification on a type extension.

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

gcc/ada/

	* sem_util.adb (Is_Confirming): Separate the handling of
	Implicit_Dereference, for which no pragma is generated but which
	is already checked for legality in Sem_Ch13, including renamed
	discriminants in a derived type.
	(Is_Confirming, Same_Name): For expanded names, only check
	matching of selector, because prefix may correspond to original
	and derived types with different names and/or scopes. Semantic
	checks on aspect expression have already verified its legality.
	Add comments regarding possible gaps in RM description of the
	feature.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 2599 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210615/5f275906/attachment.bin>


More information about the Gcc-patches mailing list