diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-05-06 08:11:41 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-05-06 08:11:41 +0000 |
commit | 38b9cc41f84542f78353a1f9919a471ff1ff1002 (patch) | |
tree | 7b40ce34cdf446910efb8a5c3d278df8429b4f5a /gcc/ada/gnat_rm.texi | |
parent | ce4896fb361b815d4018cf46510eedaff8191081 (diff) | |
download | gcc-38b9cc41f84542f78353a1f9919a471ff1ff1002.tar.gz |
2009-05-06 Gary Dismukes <dismukes@adacore.com>
* sem_aggr.adb (Resolve_Record_Aggregate): In step 5, get the
Underlying_Type before retrieving the type definition for gathering
components, to account for the case where the type is private.
2009-05-06 Tristan Gingold <gingold@adacore.com>
* g-comlin.ads: Fix minor typos (Getopt instead of Get_Opt).
2009-05-06 Thomas Quinot <quinot@adacore.com>
* g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
g-socthi-vxworks.ads, g-socthi-mingw.adb g-socthi-mingw.ads,
g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads, g-socket.adb
(GNAT.Sockets.Thin.C_Sendmsg, GNAT.Sockets.Thin.C_Recvmsg,
Windows versions): Fix incorrect base
address of Iovec (it's Msg_Iov, not Msg_Iov'Address).
(GNAT.Sockets.Thin.C_Sendto, GNAT.Sockets.Thin.C_Recvfrom): Use a
System.Address for the To parameter instead of a Sockaddr_In_Access, to
achieve independance from AF_INET family, and also to allow this
parameter to be retrieved from a Msghdr for the Windows case where
these routines are used to implement C_Sendmsg and C_Recvmsg.
2009-05-06 Bob Duff <duff@adacore.com>
* g-expect.adb, g-expect.ads: Minor reformatting
* sdefault.ads: Minor comment fix
* g-expect-vms.adb: Minor reformatting
* table.ads, table.adb (Append_All): New convenience procedure for
appending a whole array.
* comperr.adb (Compiler_Abort): Mention the -gnatd.n switch in the bug
box message. Call Osint.Dump_Source_File_Names to print out the file
list, instead of rummaging around in various data structures.
* debug.adb: New switch -gnatd.n, to print source file names as they
are read.
* alloc.ads: Add parameters for Osint.File_Name_Chars.
* osint.ads, osint.adb (Dump_Source_File_Names): New procedure to print
out source file names during a "bug box".
(Include_Dir_Default_Prefix): Use memo-izing to avoid repeated new/free.
(Read_Source_File): Print out the file name, if requested via -gnatd.n.
If it's not part of the runtimes, store it for later printing by
Dump_Source_File_Names.
2009-05-06 Javier Miranda <miranda@adacore.com>
* gnat_rm.texi (CPP_Constructor): Avoid duplication of the
documentation and add reference to the GNAT user guide for further
details.
2009-05-06 Javier Miranda <miranda@adacore.com>
* gnat_ugn.texi: Complete documentation for CPP_Constructor and remove
also wrong examples that use extension aggregates.
2009-05-06 Albert Lee <lee@adacore.com>
* s-oscons-tmplt.c (System.OS_Constants): Do not use special definition
of Msg_Iovlen_T for VMS.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147148 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/gnat_rm.texi')
-rw-r--r-- | gcc/ada/gnat_rm.texi | 48 |
1 files changed, 3 insertions, 45 deletions
diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi index 509717f681d..0f7bd74b0a0 100644 --- a/gcc/ada/gnat_rm.texi +++ b/gcc/ada/gnat_rm.texi @@ -1502,7 +1502,7 @@ equality operators defined (such operations can be imported or declared as subprograms as required). Initialization is allowed only by constructor functions (see pragma @code{CPP_Constructor}). Such types are implicitly limited if not explicitly declared as limited or derived from a limited -type, and a warning is issued in that case. +type, and an error is issued in that case. Pragma @code{CPP_Class} is intended primarily for automatic generation using an automatic binding generator tool. @@ -1547,50 +1547,8 @@ where @var{T} is a tagged limited type imported from C++ with pragma The first form is the default constructor, used when an object of type @var{T} is created on the Ada side with no explicit constructor. The -second form covers all the non-default constructors of the type. -Constructors (including the copy constructor, which is simply a special -case of the second form in which the one and only argument is of type -@var{T}), can only appear in the following contexts: - -@itemize @bullet -@item -On the right side of an initialization of an object of type @var{T}. -@item -On the right side of an initialization of a record component of type @var{T}. -@item -In an extension aggregate for an object of a type derived from @var{T}. -@item -In an Ada 2005 limited aggregate. -@item -In an Ada 2005 nested limited aggregate. -@item -In an Ada 2005 limited aggregate that initializes an object built in -place by an extended return statement. -@end itemize - -@noindent -Although the constructor is described as a function that returns a value -on the Ada side, it is typically a procedure with an extra implicit -argument (the object being initialized) at the implementation -level. GNAT issues the appropriate call, whatever it is, to get the -object properly initialized. - -In the case of objects of derived types, in addition to the use of Ada -2005 limited aggregates and extended return statements, you may also -use one of the following two possible forms for declaring and creating -an object: - -@itemize @bullet -@item @code{New_Object : Derived_T} -@item @code{New_Object : Derived_T := (@var{constructor-call with} @dots{})} -@end itemize - -@noindent -In the first case the default constructor is called and extension fields -if any are initialized according to the default initialization -expressions in the Ada declaration. In the second case, the given -constructor is called and the extension aggregate indicates the explicit -values of the extension fields. +second form covers all the non-default constructors of the type. See +the GNAT users guide for details. If no constructors are imported, it is impossible to create any objects on the Ada side and the type is implicitly declared abstract. |