public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Ada] Ada 2022: Class-wide types and formal abstract subprograms
@ 2021-10-25 15:08 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-10-25 15:08 UTC (permalink / raw)
  To: gcc-patches; +Cc: Javier Miranda

[-- Attachment #1: Type: text/plain, Size: 902 bytes --]

Ada 2022 specifies that when the controlling type of a formal abstract
subprogram declaration is a formal type, and the actual type is a
class-wide type T'Class, the actual subprogram can be an implicitly
declared subprogram corresponding to a primitive operation of type T
(AI12-0165-1/05).

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

gcc/ada/

	* sem_ch8.adb (Build_Class_Wide_Wrapper): Previous version split
	in two subprograms to factorize its functionality:
	Find_Suitable_Candidate, and Build_Class_Wide_Wrapper. These
	routines are also placed in the new subprogram
	Handle_Instance_With_Class_Wide_Type.
	(Handle_Instance_With_Class_Wide_Type): New subprogram that
	encapsulates all the code that handles instantiations with
	class-wide types.
	(Analyze_Subprogram_Renaming): Adjust code to invoke the new
	nested subprogram Handle_Instance_With_Class_Wide_Type; adjust
	documentation.

[-- Attachment #2: patch.diff.gz --]
[-- Type: application/gzip, Size: 9550 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-25 15:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-25 15:08 [Ada] Ada 2022: Class-wide types and formal abstract subprograms Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).