From patchwork Fri Oct 25 09:10:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marc_Poulhi=C3=A8s?= X-Patchwork-Id: 99536 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AD69D3858039 for ; Fri, 25 Oct 2024 09:13:40 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by sourceware.org (Postfix) with ESMTPS id BDBD03858414 for ; Fri, 25 Oct 2024 09:11:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BDBD03858414 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BDBD03858414 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::430 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729847510; cv=none; b=ArSv96K8r2qqMWwQP3QErDd5LiK7dsItsnqW0Ybe5HmqMbRfEZ2zut/e2y8gthzd1RDpHz7hp80rdn//8gkOtA5rH19qrffj1wh2mlv9yCOKmildqz5+s3Ixh+GDl6gmup/PFOoHFWr8taGZr5wc05+CAuN+29sddn5i2tTh+EU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729847510; c=relaxed/simple; bh=QMejGGX1uzrCXsPYldIvz/fU+qx1AuBmJfdfyZmxMiY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=hxwTf3gN7gircWLgD4Q2RXMHcVKYzka+5TY1jucsTx3R+3UQHi8Rf6jCCNPS4QbbbXlGbEbzoRJfzM+ZxWREabjiMcN1oRTEu6e9gZ/aIdNF6AGOomqUTSxQTkjbEKDGP9dfRTiD2DjGRgnDpcCGx2JwYpB8iHGOgULBikLvazo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-37d3ecad390so2127837f8f.1 for ; Fri, 25 Oct 2024 02:11:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1729847493; x=1730452293; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MiF1ogaGe8nQ8jy+OkD4/GErhJCZUtF3WeaeC3wLgUs=; b=iA6S02rONTJOB1HV5ki2hLuyWQhjhMWFiYWS5Lz+jbC31gKo8vmZm6w2sVoJgQfLK/ sWOGaubFl1CoTa6nmS/ghKzobSSgAP6r/x/t77zxfwaOK6OEoWicR/Lp0mm+kxsdhw8/ 73fNXl+UzRco4mWKU/6lBHnG5Sa05GUttfAqsLAyjpJfottNFtU8rLB7iDoLpe1pmcbb 8TAAKwhoKPaqmQAqyj3d7a2v5AqAcSHwMmt26oyTwriBXAfXSmiXlvY2HIz0d3uVeGvT ZJDFe4+uvfJ4DSw8ORWxsXGIIMTZuNqzmsWzoBAjhOgMCJ1HbZnwPUiCnBVKZh8f3kcN 9nIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729847493; x=1730452293; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MiF1ogaGe8nQ8jy+OkD4/GErhJCZUtF3WeaeC3wLgUs=; b=FzR0gJaXsAOoPThBYiq3zNoaQZqi8V0DLwW5qjYAbKhnE3H/m9N0iRU+16Lk13xYWD MfaJe9QsqLzGzsqhaIvsyoZstvAZ9TKeQMkP6D43Xxayr5/wAvE8yB3Ck90T7MSDNBNk NS6V727UWvN6XTPHaQ5YPykeeXhC9+lFZtJ6CFts1TLR95DgKtPr2272i1hLUBb8VPHa hESpkY54HL8Z90H17QKBB9ZLtJH9EZ9FEDTluEEV37zDmGIpommp57xa/LaOUnEeaMBN 15j/e1XE0q/RPGgHUbPSPLhechVMcozVbAShsT2pg3XgYdKmdMiZukPinpYDiEBX94J3 Dr7Q== X-Gm-Message-State: AOJu0Yw+nS87rY3J5V2HupCxUfB2gfZjRizJqRO4TzV31V9exJ5Dkm4+ NvD8uR4I788MVOvPEW2zGzW+MemCZD8rU7tobRoO3ALmM+eaJUhBoUJBcETiOZf8Ueg0hESTNnA = X-Google-Smtp-Source: AGHT+IFSTT4tn9/J5RUYxj3Gq31ClKSlvU7Fp6mMew8nW11hq5uQJLTEQEGY0DKvJwl+6SsfGgnRvg== X-Received: by 2002:a5d:4b46:0:b0:37d:321e:ef0c with SMTP id ffacd0b85a97d-3803ac21462mr3407795f8f.11.1729847493141; Fri, 25 Oct 2024 02:11:33 -0700 (PDT) Received: from localhost.localdomain ([2001:861:3382:1a90:2626:b78c:6271:6c01]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b47aa8sm1013079f8f.51.2024.10.25.02.11.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 02:11:31 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Bob Duff Subject: [COMMITTED 12/35] ada: Misc improvements to gnat RM Date: Fri, 25 Oct 2024 11:10:41 +0200 Message-ID: <20241025091107.485741-12-poulhies@adacore.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241025091107.485741-1-poulhies@adacore.com> References: <20241025091107.485741-1-poulhies@adacore.com> MIME-Version: 1.0 X-Spam-Status: No, score=-13.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org From: Bob Duff ...in the "GNAT language extensions" section. gcc/ada/ChangeLog: * doc/gnat_rm/gnat_language_extensions.rst: Minor wording improvments. * gnat_rm.texi: Regenerate. * gnat_ugn.texi: Regenerate. Tested on x86_64-pc-linux-gnu, committed on master. --- .../doc/gnat_rm/gnat_language_extensions.rst | 81 ++++++++++------- gcc/ada/gnat_rm.texi | 89 +++++++++++-------- gcc/ada/gnat_ugn.texi | 4 +- 3 files changed, 101 insertions(+), 73 deletions(-) diff --git a/gcc/ada/doc/gnat_rm/gnat_language_extensions.rst b/gcc/ada/doc/gnat_rm/gnat_language_extensions.rst index cccf60217d0..0e9bb7fc54e 100644 --- a/gcc/ada/doc/gnat_rm/gnat_language_extensions.rst +++ b/gcc/ada/doc/gnat_rm/gnat_language_extensions.rst @@ -14,8 +14,9 @@ There are two sets of language extensions: available to users early on. * The second is the experimental set. It includes the first, but also - experimental features, that are here because they're still in an early - prototyping phase. + experimental features, which are considered experimental because + they're still in an early prototyping phase. + These features might be removed or heavily modified at any time. How to activate the extended GNAT Ada superset ============================================== @@ -32,12 +33,12 @@ There are two ways to activate the extended GNAT Ada superset: As a configuration pragma, you can either put it at the beginning of a source file, or in a ``.adc`` file corresponding to your project. -* The ``-gnatX`` option, that you can pass to the compiler directly, will +* The ``-gnatX`` command-line option will activate the curated subset of extensions. .. attention:: You can activate the experimental set of extensions in addition by using either - the ``-gnatX0`` command line flag, or the pragma ``Extensions_Allowed`` with + the ``-gnatX0`` command-line option, or the pragma ``Extensions_Allowed`` with ``All_Extensions`` as an argument. However, it is not recommended you use this subset for serious projects; it is only meant as a technology preview for use in playground experiments. @@ -56,8 +57,8 @@ Local Declarations Without Block A ``basic_declarative_item`` may appear at the place of any statement. This avoids the heavy syntax of block_statements just to declare something locally. -The only valid kind of declarations for now are ``object_declaration``, -``object_renaming_declaration``, ``use_package_clause`` and +The only valid kinds of declarations for now are ``object_declaration``, +``object_renaming_declaration``, ``use_package_clause``, and ``use_type_clause``. For example: @@ -75,10 +76,11 @@ For example: It is generally a good practice to declare local variables (or constants) with as short a lifetime as possible. However, introducing a declare block to accomplish this is a relatively heavy syntactic load along with a traditional extra level -of indentation. The alternative syntax supported here allows declaring symbols -in any statement sequence. Lifetime of such local declarations is until the end of +of indentation. The alternative syntax supported here allows declarations +in any statement sequence. +The lifetime of such local declarations is until the end of the enclosing construct. The same enclosing construct cannot contain several -declarations of the same symbol; however, overriding symbols from higher-level +declarations of the same defining name; however, overriding symbols from higher-level scopes works similarly to the explicit ``declare`` block. If the enclosing construct allows an exception handler (such as an accept @@ -188,8 +190,8 @@ appear within parentheses after the name of the primitive operation. This same notation is already available for tagged types. This extension allows for untagged types. It is allowed for all primitive operations of the type -independent of whether they were originally declared in a package spec or its -private part, or were inherited and/or overridden as part of a derived type +independent of whether they were originally declared in a package spec, +or were inherited and/or overridden as part of a derived type declaration occurring anywhere, so long as the first parameter is of the type, or an access parameter designating the type. @@ -248,18 +250,17 @@ Here is an example of this feature: -- ... end Stacks; -.. todo:: - - I do not understand this feature enough to decide if the description above - is sufficient for documentation. - -Link to the original RFC: -https://github.com/AdaCore/ada-spark-rfcs/blob/master/prototyped/rfc-expression-functions-as-default-for-generic-formal-function-parameters.rst +If Stacks is instantiated with an explicit actual for Copy, +then that will be called when Copy is called in the generic body. +If the default is used (i.e. there is no actual corresponding to Copy), +then calls to Copy in the instance will simply return Item. String interpolation -------------------- The syntax for string literals is extended to support string interpolation. +An interpolated string literal starts with ``f``, immediately before +the first double-quote character. Within an interpolated string literal, an arbitrary expression, when enclosed in ``{ ... }``, is expanded at run time into the result of calling @@ -279,6 +280,12 @@ will be evaluated and included in the string. Put_Line (f"The name is {Name} and the sum is {X + Y}."); end Test_Interpolation; +This will print: + +.. code-block:: ada + + The name is Leo and the sum is 27. + In addition, an escape character (``\``) is provided for inserting certain standard control characters (such as ``\t`` for tabulation or ``\n`` for newline) or to escape characters with special significance to the @@ -302,9 +309,10 @@ escaped_character meaning ``\}`` ``}`` ================= ================= -Note that, unlike normal string literals, doubled characters have no +Note that, unlike normal string literals, doubled double-quote characters have no special significance. So to include a double-quote or a brace character in an interpolated string, they must be preceded by a ``\``. +Multiple interpolated strings are concatenated. For example: .. code-block:: ada @@ -314,6 +322,13 @@ For example: f" a double quote is \" and" & f" an open brace is \{"); +This will print: + +.. code-block:: ada + + X = 12 and Y = 15 and X+Y = 27 + a double quote is " and an open brace is { + Constrained attribute for generic objects ----------------------------------------- @@ -365,7 +380,7 @@ Here is an example of this feature: function F2 (V : Child) return Child; -- Primitive, but only controlling on the first parameter - end; + end Example; Note that ``function F2 (V : Child) return Child;`` differs from ``F2 (V : Child) return Child'Class;`` in that the return type is a specific, definite type. This @@ -412,11 +427,11 @@ Restricting the position of controlling parameter offers several advantages: One doesn't need to analyze all subprogram parameters to understand if the given subprogram is a primitive of a certain tagged type. -* A programmer is free to use any type, including classwide types, on other +* A programmer is free to use any type, including class-wide types, on other parameters of a subprogram, without the need to consider possible effects of overriding a primitive or creating new one. -* Return type of a function is never considered as a controlling parameter. +* The result of a function is never a controlling result. .. _Experimental_Language_Extensions: @@ -440,7 +455,7 @@ To do a conditional return in a procedure the following syntax should be used: procedure P (Condition : Boolean) is begin return when Condition; - end; + end P; This will return from the procedure if ``Condition`` is true. @@ -497,7 +512,7 @@ An exception message can also be added: Storage Model ------------- -This extends Storage Pools into a more efficient model allowing higher performances, +This extends Storage Pools into a more efficient model allowing higher performance, easier integration with low footprint embedded run-times and copying data between different pools of memory. The latter is especially useful when working with distributed memory models, in particular to support interactions with GPU. @@ -505,13 +520,13 @@ memory models, in particular to support interactions with GPU. Aspect Storage_Model_Type ^^^^^^^^^^^^^^^^^^^^^^^^^^ -A Storage model is a type which is associated with an aspect -"Storage_Model_Type", e.g.: +A Storage model is a type with a specified ``Storage_Model_Type`` +aspect, e.g.: .. code-block:: Ada type A_Model is null record - with Storage_Model_Type; + with Storage_Model_Type (...); Storage_Model_Type itself accepts six parameters: @@ -524,10 +539,10 @@ Storage_Model_Type itself accepts six parameters: - Storage_Size, a function returning the amount of memory left - Null_Address, a value for the null address value -By default, Address_Type is System.Address, and all other five subprograms are -performing native operations (e.g. the allocator is the native new allocator). +By default, Address_Type is System.Address, and the five subprograms +perform native operations (e.g. the allocator is the native ``new`` allocator). Users can decide to specify one or more of these. When an Address_Type is -specified and different than System.Address, the all other five subprograms have +specified to be other than System.Address, all of the subprograms have to be specified. The prototypes of these procedures are as follows: @@ -665,7 +680,7 @@ It allows to encompass the capabilities of storage pools, e.g.: -- Calls CUDA_Storage_Model.Deallocate; end; -Taking 'Address of an object with a specific memory model returns an object of +Taking ``'Address`` of an object with a specific memory model returns an object of the type of the address for that memory category, which may be different from System.Address. @@ -840,7 +855,7 @@ Subprogram parameters procedure P (V : access T; X : access constant T); -When the type of a formal parameter is of anonymous access then, from the caller's +When the type of a formal parameter is of an anonymous access type then, from the caller's perspective, its level is seen to be at least as deep as that of the type of the corresponding actual parameter (whatever that actual parameter might be) - meaning any actual can be used for an anonymous access parameter without the use @@ -1423,7 +1438,7 @@ Finalized tagged types Aspects are inherited by derived types and optionally overriden by those. The compiler-generated calls to the user-defined operations are then dispatching whenever it makes sense, i.e. the object in question is of -classwide type and the class includes at least one finalized-type. +class-wide type and the class includes at least one finalized tagged type. However note that for simplicity, it is forbidden to change the value of any of those new aspects in derived types. diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi index 732fdb01c1a..f648594df42 100644 --- a/gcc/ada/gnat_rm.texi +++ b/gcc/ada/gnat_rm.texi @@ -19,7 +19,7 @@ @copying @quotation -GNAT Reference Manual , Oct 07, 2024 +GNAT Reference Manual , Oct 17, 2024 AdaCore @@ -28905,8 +28905,9 @@ available to users early on. @item The second is the experimental set. It includes the first, but also -experimental features, that are here because they’re still in an early -prototyping phase. +experimental features, which are considered experimental because +they’re still in an early prototyping phase. +These features might be removed or heavily modified at any time. @end itemize @menu @@ -28942,7 +28943,7 @@ file, or in a @code{.adc} file corresponding to your project. @itemize * @item -The @code{-gnatX} option, that you can pass to the compiler directly, will +The @code{-gnatX} command-line option will activate the curated subset of extensions. @end itemize @@ -28950,7 +28951,7 @@ activate the curated subset of extensions. @quotation Attention You can activate the experimental set of extensions in addition by using either -the @code{-gnatX0} command line flag, or the pragma @code{Extensions_Allowed} with +the @code{-gnatX0} command-line option, or the pragma @code{Extensions_Allowed} with @code{All_Extensions} as an argument. However, it is not recommended you use this subset for serious projects; it is only meant as a technology preview for use in playground experiments. @@ -28985,8 +28986,8 @@ Features activated via @code{-gnatX} or A @code{basic_declarative_item} may appear at the place of any statement. This avoids the heavy syntax of block_statements just to declare something locally. -The only valid kind of declarations for now are @code{object_declaration}, -@code{object_renaming_declaration}, @code{use_package_clause} and +The only valid kinds of declarations for now are @code{object_declaration}, +@code{object_renaming_declaration}, @code{use_package_clause}, and @code{use_type_clause}. For example: @@ -29004,10 +29005,11 @@ end if; It is generally a good practice to declare local variables (or constants) with as short a lifetime as possible. However, introducing a declare block to accomplish this is a relatively heavy syntactic load along with a traditional extra level -of indentation. The alternative syntax supported here allows declaring symbols -in any statement sequence. Lifetime of such local declarations is until the end of +of indentation. The alternative syntax supported here allows declarations +in any statement sequence. +The lifetime of such local declarations is until the end of the enclosing construct. The same enclosing construct cannot contain several -declarations of the same symbol; however, overriding symbols from higher-level +declarations of the same defining name; however, overriding symbols from higher-level scopes works similarly to the explicit @code{declare} block. If the enclosing construct allows an exception handler (such as an accept @@ -29134,8 +29136,8 @@ appear within parentheses after the name of the primitive operation. This same notation is already available for tagged types. This extension allows for untagged types. It is allowed for all primitive operations of the type -independent of whether they were originally declared in a package spec or its -private part, or were inherited and/or overridden as part of a derived type +independent of whether they were originally declared in a package spec, +or were inherited and/or overridden as part of a derived type declaration occurring anywhere, so long as the first parameter is of the type, or an access parameter designating the type. @@ -29196,15 +29198,10 @@ private end Stacks; @end example -@cartouche -@quotation Todo -I do not understand this feature enough to decide if the description above -is sufficient for documentation. -@end quotation -@end cartouche - -Link to the original RFC: -@indicateurl{https://github.com/AdaCore/ada-spark-rfcs/blob/master/prototyped/rfc-expression-functions-as-default-for-generic-formal-function-parameters.rst} +If Stacks is instantiated with an explicit actual for Copy, +then that will be called when Copy is called in the generic body. +If the default is used (i.e. there is no actual corresponding to Copy), +then calls to Copy in the instance will simply return Item. @node String interpolation,Constrained attribute for generic objects,Expression defaults for generic formal functions,Curated Extensions @anchor{gnat_rm/gnat_language_extensions string-interpolation}@anchor{449} @@ -29212,6 +29209,8 @@ Link to the original RFC: The syntax for string literals is extended to support string interpolation. +An interpolated string literal starts with @code{f}, immediately before +the first double-quote character. Within an interpolated string literal, an arbitrary expression, when enclosed in @code{@{ ... @}}, is expanded at run time into the result of calling @@ -29231,6 +29230,12 @@ begin end Test_Interpolation; @end example +This will print: + +@example +The name is Leo and the sum is 27. +@end example + In addition, an escape character (@code{\}) is provided for inserting certain standard control characters (such as @code{\t} for tabulation or @code{\n} for newline) or to escape characters with special significance to the @@ -29345,9 +29350,10 @@ NUL @end multitable -Note that, unlike normal string literals, doubled characters have no +Note that, unlike normal string literals, doubled double-quote characters have no special significance. So to include a double-quote or a brace character in an interpolated string, they must be preceded by a @code{\}. +Multiple interpolated strings are concatenated. For example: @example @@ -29357,6 +29363,13 @@ Put_Line f" an open brace is \@{"); @end example +This will print: + +@example +X = 12 and Y = 15 and X+Y = 27 +a double quote is " and an open brace is @{ +@end example + @node Constrained attribute for generic objects,Static aspect on intrinsic functions,String interpolation,Curated Extensions @anchor{gnat_rm/gnat_language_extensions constrained-attribute-for-generic-objects}@anchor{44a} @subsection Constrained attribute for generic objects @@ -29413,7 +29426,7 @@ private function F2 (V : Child) return Child; -- Primitive, but only controlling on the first parameter -end; +end Example; @end example Note that @code{function F2 (V : Child) return Child;} differs from @code{F2 (V : Child) @@ -29466,16 +29479,16 @@ One doesn’t need to analyze all subprogram parameters to understand if the giv subprogram is a primitive of a certain tagged type. @item -A programmer is free to use any type, including classwide types, on other +A programmer is free to use any type, including class-wide types, on other parameters of a subprogram, without the need to consider possible effects of overriding a primitive or creating new one. @item -Return type of a function is never considered as a controlling parameter. +The result of a function is never a controlling result. @end itemize @node Experimental Language Extensions,,Curated Extensions,GNAT language extensions -@anchor{gnat_rm/gnat_language_extensions experimental-language-extensions}@anchor{6a}@anchor{gnat_rm/gnat_language_extensions id3}@anchor{44d} +@anchor{gnat_rm/gnat_language_extensions experimental-language-extensions}@anchor{6a}@anchor{gnat_rm/gnat_language_extensions id2}@anchor{44d} @section Experimental Language Extensions @@ -29510,7 +29523,7 @@ To do a conditional return in a procedure the following syntax should be used: procedure P (Condition : Boolean) is begin return when Condition; -end; +end P; @end example This will return from the procedure if @code{Condition} is true. @@ -29570,7 +29583,7 @@ end; @subsection Storage Model -This extends Storage Pools into a more efficient model allowing higher performances, +This extends Storage Pools into a more efficient model allowing higher performance, easier integration with low footprint embedded run-times and copying data between different pools of memory. The latter is especially useful when working with distributed memory models, in particular to support interactions with GPU. @@ -29587,12 +29600,12 @@ memory models, in particular to support interactions with GPU. @subsubsection Aspect Storage_Model_Type -A Storage model is a type which is associated with an aspect -“Storage_Model_Type”, e.g.: +A Storage model is a type with a specified @code{Storage_Model_Type} +aspect, e.g.: @example type A_Model is null record - with Storage_Model_Type; + with Storage_Model_Type (...); @end example Storage_Model_Type itself accepts six parameters: @@ -29623,10 +29636,10 @@ Storage_Size, a function returning the amount of memory left Null_Address, a value for the null address value @end itemize -By default, Address_Type is System.Address, and all other five subprograms are -performing native operations (e.g. the allocator is the native new allocator). +By default, Address_Type is System.Address, and the five subprograms +perform native operations (e.g. the allocator is the native @code{new} allocator). Users can decide to specify one or more of these. When an Address_Type is -specified and different than System.Address, the all other five subprograms have +specified to be other than System.Address, all of the subprograms have to be specified. The prototypes of these procedures are as follows: @@ -29766,7 +29779,7 @@ begin end; @end example -Taking ‘Address of an object with a specific memory model returns an object of +Taking @code{'Address} of an object with a specific memory model returns an object of the type of the address for that memory category, which may be different from System.Address. @@ -29967,7 +29980,7 @@ end; procedure P (V : access T; X : access constant T); @end example -When the type of a formal parameter is of anonymous access then, from the caller’s +When the type of a formal parameter is of an anonymous access type then, from the caller’s perspective, its level is seen to be at least as deep as that of the type of the corresponding actual parameter (whatever that actual parameter might be) - meaning any actual can be used for an anonymous access parameter without the use @@ -30567,7 +30580,7 @@ heap-allocated objects @end itemize @node No_Raise aspect,Inference of Dependent Types in Generic Instantiations,Generalized Finalization,Experimental Language Extensions -@anchor{gnat_rm/gnat_language_extensions id11}@anchor{45d}@anchor{gnat_rm/gnat_language_extensions no-raise-aspect}@anchor{45c} +@anchor{gnat_rm/gnat_language_extensions id10}@anchor{45d}@anchor{gnat_rm/gnat_language_extensions no-raise-aspect}@anchor{45c} @subsection No_Raise aspect @@ -30658,7 +30671,7 @@ private Aspects are inherited by derived types and optionally overriden by those. The compiler-generated calls to the user-defined operations are then dispatching whenever it makes sense, i.e. the object in question is of -classwide type and the class includes at least one finalized-type. +class-wide type and the class includes at least one finalized tagged type. However note that for simplicity, it is forbidden to change the value of any of those new aspects in derived types. diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index 9ba898435f2..6e8e0b5dc36 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -19,7 +19,7 @@ @copying @quotation -GNAT User's Guide for Native Platforms , Oct 07, 2024 +GNAT User's Guide for Native Platforms , Oct 17, 2024 AdaCore @@ -29695,8 +29695,8 @@ to permit their use in free software. @printindex ge -@anchor{d1}@w{ } @anchor{gnat_ugn/gnat_utility_programs switches-related-to-project-files}@w{ } +@anchor{d1}@w{ } @c %**end of body @bye