From patchwork Thu Jun 15 08:04:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Marc_Poulhi=C3=A8s?= X-Patchwork-Id: 108342 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp472487vqr; Thu, 15 Jun 2023 01:19:37 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6KncvQmOwasUteembUPzp3CCEmeroNcHCdYd42VHzjRh8f+OZT68U++5Suul6EPOzcoT8z X-Received: by 2002:a17:907:70a:b0:96f:a935:8997 with SMTP id xb10-20020a170907070a00b0096fa9358997mr19246482ejb.12.1686817177162; Thu, 15 Jun 2023 01:19:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686817177; cv=none; d=google.com; s=arc-20160816; b=nltGUZT6SU5CeSSUOwXUkh0j0KBBQcvmFY39LbuOcoKciOZjIOj0B7Pe8lY+/wjAQg +57GjnkaLVopbMZadBsnAT8WVkEu0nB49h0iPK+9PmwthN/uT/RJr1cNvWD4Wjy57O7b ScA/aeiKQM15AEOEOsurrsFWL7P59lKTh6wKXPZ8EKFaZWy0p66q5/otnpgxpEEhDnHt cS8kB1FocFea6f3SLpbrL8j47amaFaRl9aItIOBL6oDiIoJPdboVvYPzxmMt1F4hVtXT wUlo8uO37PMDP+tl836+FmiqfU/U21m2f4iV8/8iXcxayiy6o9o18svn5E3XN3bYNIHl d1yA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=p5Ew6HBWtKYD8k5Wpgs8UdltGcrzj1dJk23lq8rGVEA=; b=KZaZAUhgH7Sk1Q1+PbtTvD4qe3DActuUOkT9RSTHYyTZogK57GpDR9KuH1PXR1g7tG Mof5qFBZj7oEce/Cqs5TitDHpWuOl/iHM0XAGDRxyBrisK48O45wo+14J1w/BvZiwcZZ i5TJSzOjCbsr6iLW35xcodof7Y5iKQVbMJOhaE5ZJN07zaqq9fM4LfgQhNFICdrz0MTy uIE/XbVHHCA8ApD3uEh0Enkm97hvzjcnSu+01pxC7ZHNHMmmrQp/tKq2w/MMSHT8tXeR ohdGhonncPQSqYTxyC+j6nupefMv/Mcu6xU4mPYvX0NqKKdhH5QB2S1cUvls6pe4rE4w ylpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Rfo0QzuT; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id qx11-20020a170906fccb00b00982b9e0f271si100325ejb.620.2023.06.15.01.19.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jun 2023 01:19:37 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Rfo0QzuT; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C8C473959C59 for ; Thu, 15 Jun 2023 08:11:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C8C473959C59 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686816695; bh=p5Ew6HBWtKYD8k5Wpgs8UdltGcrzj1dJk23lq8rGVEA=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=Rfo0QzuTDY5YB/LvRf7g3CE0KwIjzv45tSEb0FAj8a71kZyUjLZ5JeCD9uyD/Q9gj 9faPhzYFsckJJYQPzH+TWj9anB6fjLLJDZgJXNgwa010pvitdCLXXD3fBQfZgjcoQf VGsEDlrGy0VJf701LCt7nHlfulOOFTSp4BaY3pUk= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by sourceware.org (Postfix) with ESMTPS id 9EA2B3857028 for ; Thu, 15 Jun 2023 08:04:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9EA2B3857028 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-4f649db9b25so9945753e87.0 for ; Thu, 15 Jun 2023 01:04:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686816274; x=1689408274; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=p5Ew6HBWtKYD8k5Wpgs8UdltGcrzj1dJk23lq8rGVEA=; b=IKyzmNe4R3dZuZC7yN5h/f4mqaMqns7IYFrUO8rwBFJsbx/WA37JkHso0BbwWniaXS 8wPGp0Nw07ea3a9fNpLyxl6XRAAWZonoJyxMILdIuGpvHcBp4OBucEBbg/Wt9v+QuyWd uqDBXr53PwEVKCtWxZIEivggliJPlNbAyiA6acTwTSI6UueY2JWkV10bbcubi9VYIORR RJ9sPnUYGEoAgfTgeyYdUWtF6/Mp0omxZw1icVg4Oa+AeonSgN2aTolGgqmj1pl9u4/z JTHkRAn2R8y08lKZdJGcGveNScvQvnLk468Dx7ZRSrQiBiwkOMNjrYuUeZxmhVvH1BbE goSg== X-Gm-Message-State: AC+VfDyB21G3bAlx+gZL1j4Msx78pKz8hjII4N3dyYY77CkxDT26g5wP IDNlD3BncNYsH0PE70twB1NP1iIT5woy3sRcJnIOWg== X-Received: by 2002:a19:d611:0:b0:4f7:434b:70b4 with SMTP id n17-20020a19d611000000b004f7434b70b4mr6469563lfg.41.1686816274091; Thu, 15 Jun 2023 01:04:34 -0700 (PDT) Received: from poulhies-Precision-5550.telnowedge.local (lmontsouris-659-1-24-67.w81-250.abo.wanadoo.fr. [81.250.175.67]) by smtp.gmail.com with ESMTPSA id o6-20020a05600c378600b003f7cb42fa20sm19701498wmr.42.2023.06.15.01.04.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jun 2023 01:04:33 -0700 (PDT) To: gcc-patches@gcc.gnu.org Cc: Ronan Desplanques Subject: [COMMITTED] ada: Make minor improvements to user's guide Date: Thu, 15 Jun 2023 10:04:32 +0200 Message-Id: <20230615080432.940230-1-poulhies@adacore.com> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 X-Spam-Status: No, score=-13.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: =?utf-8?q?Marc_Poulhi=C3=A8s_via_Gcc-patches?= From: =?utf-8?q?Marc_Poulhi=C3=A8s?= Reply-To: =?utf-8?q?Marc_Poulhi=C3=A8s?= Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768756008319745854?= X-GMAIL-MSGID: =?utf-8?q?1768756008319745854?= From: Ronan Desplanques gcc/ada/ * doc/gnat_ugn/about_this_guide.rst: Fix typo. Uniformize punctuation. * doc/gnat_ugn/the_gnat_compilation_model.rst: Uniformize punctuation. Fix capitalization. Fix indentation of code block. Fix RST formatting syntax errors. * gnat_ugn.texi: Regenerate. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/doc/gnat_ugn/about_this_guide.rst | 8 ++-- .../gnat_ugn/the_gnat_compilation_model.rst | 24 +++++------ gcc/ada/gnat_ugn.texi | 41 +++++++++---------- 3 files changed, 36 insertions(+), 37 deletions(-) diff --git a/gcc/ada/doc/gnat_ugn/about_this_guide.rst b/gcc/ada/doc/gnat_ugn/about_this_guide.rst index 33476264231..18cfb0291b6 100644 --- a/gcc/ada/doc/gnat_ugn/about_this_guide.rst +++ b/gcc/ada/doc/gnat_ugn/about_this_guide.rst @@ -38,17 +38,17 @@ This guide contains the following chapters: using the GNU make utility with GNAT. * :ref:`GNAT_Utility_Programs` explains the various utility programs that - are included in the GNAT environment + are included in the GNAT environment. * :ref:`GNAT_and_Program_Execution` covers a number of topics related to - running, debugging, and tuning the performace of programs developed - with GNAT + running, debugging, and tuning the performance of programs developed + with GNAT. Appendices cover several additional topics: * :ref:`Platform_Specific_Information` describes the different run-time library implementations and also presents information on how to use - GNAT on several specific platforms + GNAT on several specific platforms. * :ref:`Example_of_Binder_Output_File` shows the source code for the binder output file for a sample program. diff --git a/gcc/ada/doc/gnat_ugn/the_gnat_compilation_model.rst b/gcc/ada/doc/gnat_ugn/the_gnat_compilation_model.rst index 77a2055f642..c7f15b4612d 100644 --- a/gcc/ada/doc/gnat_ugn/the_gnat_compilation_model.rst +++ b/gcc/ada/doc/gnat_ugn/the_gnat_compilation_model.rst @@ -168,7 +168,7 @@ GNAT also supports several other 8-bit coding schemes: *ISO 8859-15 (Latin-9)* ISO 8859-15 (Latin-9) letters allowed in identifiers, with uppercase and - lowercase equivalence + lowercase equivalence. .. index:: code page 437 (IBM PC) @@ -1778,8 +1778,8 @@ default, that contains calls to the elaboration procedures of those compilation unit that require them, followed by a call to the main program. This Ada program is compiled to generate the object file for the main program. The name of -the Ada file is :file:`b~xxx`.adb` (with the corresponding spec -:file:`b~xxx`.ads`) where ``xxx`` is the name of the +the Ada file is :file:`b~xxx.adb` (with the corresponding spec +:file:`b~xxx.ads`) where ``xxx`` is the name of the main program unit. Finally, the linker is used to build the resulting executable program, @@ -3590,7 +3590,7 @@ Convention identifiers are recognized by GNAT: Ada compiler for further details on elaboration. However, it is not possible to mix the tasking run time of GNAT and - HP Ada 83, All the tasking operations must either be entirely within + HP Ada 83, all the tasking operations must either be entirely within GNAT compiled sections of the program, or entirely within HP Ada 83 compiled sections of the program. @@ -3715,14 +3715,14 @@ Convention identifiers are recognized by GNAT: to perform dimensional checks: - .. code-block:: ada + .. code-block:: ada - type Distance is new Long_Float; - type Time is new Long_Float; - type Velocity is new Long_Float; - function "/" (D : Distance; T : Time) - return Velocity; - pragma Import (Intrinsic, "/"); + type Distance is new Long_Float; + type Time is new Long_Float; + type Velocity is new Long_Float; + function "/" (D : Distance; T : Time) + return Velocity; + pragma Import (Intrinsic, "/"); This common idiom is often programmed with a generic definition and an explicit body. The pragma makes it simpler to introduce such declarations. @@ -3858,7 +3858,7 @@ considered: * Using GNAT and G++ from two different GCC installations: If both - compilers are on the :envvar`PATH`, the previous method may be used. It is + compilers are on the :envvar:`PATH`, the previous method may be used. It is important to note that environment variables such as :envvar:`C_INCLUDE_PATH`, :envvar:`GCC_EXEC_PREFIX`, :envvar:`BINUTILS_ROOT`, and diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index f119e9fa743..88123df4332 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 , May 09, 2023 +GNAT User's Guide for Native Platforms , Jun 01, 2023 AdaCore @@ -590,12 +590,12 @@ using the GNU make utility with GNAT. @item @ref{b,,GNAT Utility Programs} explains the various utility programs that -are included in the GNAT environment +are included in the GNAT environment. @item @ref{c,,GNAT and Program Execution} covers a number of topics related to -running, debugging, and tuning the performace of programs developed -with GNAT +running, debugging, and tuning the performance of programs developed +with GNAT. @end itemize Appendices cover several additional topics: @@ -606,7 +606,7 @@ Appendices cover several additional topics: @item @ref{d,,Platform-Specific Information} describes the different run-time library implementations and also presents information on how to use -GNAT on several specific platforms +GNAT on several specific platforms. @item @ref{e,,Example of Binder Output File} shows the source code for the binder @@ -1288,7 +1288,7 @@ lowercase equivalence. @item `ISO 8859-15 (Latin-9)' ISO 8859-15 (Latin-9) letters allowed in identifiers, with uppercase and -lowercase equivalence +lowercase equivalence. @end table @geindex code page 437 (IBM PC) @@ -3231,8 +3231,8 @@ default, that contains calls to the elaboration procedures of those compilation unit that require them, followed by a call to the main program. This Ada program is compiled to generate the object file for the main program. The name of -the Ada file is @code{b~xxx}.adb` (with the corresponding spec -@code{b~xxx}.ads`) where @code{xxx} is the name of the +the Ada file is @code{b~xxx.adb} (with the corresponding spec +@code{b~xxx.ads}) where @code{xxx} is the name of the main program unit. Finally, the linker is used to build the resulting executable program, @@ -5366,7 +5366,7 @@ elaboration of the GNAT components. Consult the documentation of the other Ada compiler for further details on elaboration. However, it is not possible to mix the tasking run time of GNAT and -HP Ada 83, All the tasking operations must either be entirely within +HP Ada 83, all the tasking operations must either be entirely within GNAT compiled sections of the program, or entirely within HP Ada 83 compiled sections of the program. @end table @@ -5537,24 +5537,20 @@ The corresponding operator declaration must have parameters and result type that have the same root numeric type (for example, all three are long_float types). This simplifies the definition of operations that use type checking to perform dimensional checks: -@end itemize @example - type Distance is new Long_Float; - type Time is new Long_Float; - type Velocity is new Long_Float; - function "/" (D : Distance; T : Time) - return Velocity; - pragma Import (Intrinsic, "/"); +type Distance is new Long_Float; +type Time is new Long_Float; +type Velocity is new Long_Float; +function "/" (D : Distance; T : Time) + return Velocity; +pragma Import (Intrinsic, "/"); +@end example This common idiom is often programmed with a generic definition and an explicit body. The pragma makes it simpler to introduce such declarations. It incurs no overhead in compilation time or code size, because it is implemented as a single machine instruction. -@end example - - -@itemize * @item General subprogram entities. This is used to bind an Ada subprogram @@ -5724,7 +5720,10 @@ $ gnatmake ada_unit -largs file1.o file2.o --LINK=g++ @item Using GNAT and G++ from two different GCC installations: If both -compilers are on the :envvar`PATH`, the previous method may be used. It is +compilers are on the +@geindex PATH +@geindex environment variable; PATH +@code{PATH}, the previous method may be used. It is important to note that environment variables such as @geindex C_INCLUDE_PATH @geindex environment variable; C_INCLUDE_PATH