diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-29 16:15:45 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-29 16:15:45 +0000 |
commit | 1843cecac270adb73f35b5420c1a1b43db1d455c (patch) | |
tree | e6b0e275d222d8952cb61f29f30b8e056a79aee2 /gcc/ada/a-tgdico.ads | |
parent | e33a28e8b2f9a6c11c3eb81348ad4b14dc58ae4a (diff) | |
download | gcc-1843cecac270adb73f35b5420c1a1b43db1d455c.tar.gz |
2005-03-29 Gary Dismukes <dismukes@adacore.com>
Robert Dewar <dewar@adacore.com>
* exp_intr.adb (Expand_Dispatching_Constructor_Call): New procedure to
expand a call to an instance of
Ada.Tags.Generic_Dispatching_Constructor into a dispatching call to the
Constructor actual of the instance. A class-wide membership
check is also generated, to ensure that the tag passed to the instance
denotes a type in the class.
(Expand_Intrinsic_Call): Call Expand_Dispatching_Constructor in the case
of Name_Generic_Dispatching_Constructor.
* Makefile.rtl: Add a-tgdico.ads to the list of library units (new Ada
05 unit for AI-260-02).
* a-tgdico.ads: New file.
* impunit.adb (Non_Imp_File_Names_05): Add entry "a-tgdico" for new
predefined Ada 05 generic unit Ada.Tags.Generic_Dispatching_Constructor.
* snames.ads, snames.adb (Preset_Names): Add entry for
Generic_Dispatching_Constructor.
PR ada/20300
* sem_ch8.adb (Find_Direct_Name): Go to root type for check of
character type cases.
(Analyze_Subprogram_Renaming): Add special handling for
the case of renaming of stream attributes when the renaming denotes a
generic formal subprogram association for an abstract formal subprogram.
Check that the attribute is a primitive stream attribute (and not
a class-wide stream attribute) and then rewrite the attribute name
as the name of the appropriate compiler-generated stream primitive.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97172 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/a-tgdico.ads')
-rw-r--r-- | gcc/ada/a-tgdico.ads | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/ada/a-tgdico.ads b/gcc/ada/a-tgdico.ads new file mode 100644 index 00000000000..8534d9f2957 --- /dev/null +++ b/gcc/ada/a-tgdico.ads @@ -0,0 +1,29 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT COMPILER COMPONENTS -- +-- -- +-- ADA.TAGS.GENERIC_DISPATCHING_CONSTRUCTOR -- +-- -- +-- S p e c -- +-- -- +-- This specification is adapted from the Ada Reference Manual for use with -- +-- GNAT. In accordance with the copyright of that document, you can freely -- +-- copy and modify this specification, provided that if you redistribute a -- +-- modified version, any changes that you have made are clearly indicated. -- +-- -- +------------------------------------------------------------------------------ + +generic + type T (<>) is abstract tagged limited private; + type Parameters (<>) is limited private; + with function Constructor (Params : access Parameters) return T is abstract; + +function Ada.Tags.Generic_Dispatching_Constructor + (The_Tag : Tag; Params : access Parameters) return T'Class; + +-- pragma Preelaborate (Generic_Dispatching_Constructor); +-- Commented out temporarily because various other predefined units do not +-- yet have proper categorization as specified by AI-362 (such as Ada.Tags, +-- Ada.Exceptions, etc.). + +pragma Import (Intrinsic, Generic_Dispatching_Constructor); |