public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Pierre-Marie de Rodat <derodat@adacore.com>
To: gcc-patches@gcc.gnu.org
Cc: Tom Tromey <tromey@adacore.com>
Subject: [Ada] Update the character type comment in exp_dbug.ads
Date: Tue, 17 Sep 2019 08:07:00 -0000	[thread overview]
Message-ID: <20190917080634.GA37632@adacore.com> (raw)

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

The character type comment in exp_dbug.ads documented the QU and QW
encodings, but did not document the plain "Qc" encoding, where 'c' is
the character itself.  This patch updates the comment to follow the
implementation.

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

2019-09-17  Tom Tromey  <tromey@adacore.com>

gcc/ada/

	* exp_dbug.ads: Update character type comment.

[-- Attachment #2: patch.diff --]
[-- Type: text/x-diff, Size: 1539 bytes --]

--- gcc/ada/exp_dbug.ads
+++ gcc/ada/exp_dbug.ads
@@ -1452,18 +1452,21 @@ package Exp_Dbug is
    --  a character literal, the name is encoded as described in the following
    --  paragraph.
 
-   --  A name QUhh, where each 'h' is a lower-case hexadecimal digit, stands
-   --  for a character whose Unicode encoding is hh, and QWhhhh likewise stands
-   --  for a wide character whose encoding is hhhh. The representation values
-   --  are encoded as for ordinary enumeration literals (and have no necessary
-   --  relationship to the values encoded in the names).
+   --  The characters 'a'..'z' and '0'..'9' are represented as Qc, where 'c'
+   --  stands for the character itself.  A name QUhh, where each 'h' is a
+   --  lower-case hexadecimal digit, stands for a character whose Unicode
+   --  encoding is hh, and QWhhhh likewise stands for a wide character whose
+   --  encoding is hhhh. The representation values are encoded as for ordinary
+   --  enumeration literals (and have no necessary relationship to the values
+   --  encoded in the names).
 
    --  For example, given the type declaration
 
-   --    type x is (A, 'C', B);
+   --    type x is (A, 'C', 'b');
 
    --  the second enumeration literal would be named QU43 and the value
-   --  assigned to it would be 1.
+   --  assigned to it would be 1, and the third enumeration literal would be
+   --  named Qb and the value assigned to it would be 2.
 
    -----------------------------------------------
    -- Secondary Dispatch tables of tagged types --


                 reply	other threads:[~2019-09-17  8:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190917080634.GA37632@adacore.com \
    --to=derodat@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=tromey@adacore.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).