From: Arnaud Charlet <charlet@adacore.com>
To: gcc-patches@gcc.gnu.org
Cc: Robert Dewar <dewar@adacore.com>
Subject: [Ada] Document recognition of : in place of #
Date: Tue, 06 Jan 2015 09:24:00 -0000 [thread overview]
Message-ID: <20150106092442.GA16996@adacore.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 489 bytes --]
This adds an RM reference to J.2 for the run-time routines that allow
colon as a replacement for hash in based notation. Comment changes
only, no external effect, so no test.
Tested on x86_64-pc-linux-gnu, committed on trunk
2015-01-06 Robert Dewar <dewar@adacore.com>
* s-valllu.adb, a-tiinau.adb, a-timoau.adb, a-ztinau.adb, a-ztmoau.adb,
s-valuns.adb, s-valrea.adb, a-wtflau.adb, a-tiflau.adb, a-ztflau.adb,
a-wtinau.adb, a-wtmoau.adb: Document recognition of : in place of #.
[-- Attachment #2: difs --]
[-- Type: text/plain, Size: 13216 bytes --]
Index: s-valllu.adb
===================================================================
--- s-valllu.adb (revision 219191)
+++ s-valllu.adb (working copy)
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2012, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -119,9 +119,10 @@
Ptr.all := P;
- -- Deal with based case
+ -- Deal with based case. We recognize either the standard '#' or the
+ -- allowed alternative replacement ':' (see RM J.2(3)).
- if P < Max and then (Str (P) = ':' or else Str (P) = '#') then
+ if P < Max and then (Str (P) = '#' or else Str (P) = ':') then
Base_Char := Str (P);
P := P + 1;
Base := Uval;
Index: a-tiinau.adb
===================================================================
--- a-tiinau.adb (revision 219191)
+++ a-tiinau.adb (working copy)
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -166,7 +166,8 @@
if Loaded then
- -- Deal with based literal (note : is ok replacement for #)
+ -- Deal with based literal. We recognize either the standard '#' or
+ -- the allowed alternative replacement ':' (see RM J.2(3)).
Load (File, Buf, Ptr, '#', ':', Loaded);
Index: a-timoau.adb
===================================================================
--- a-timoau.adb (revision 219191)
+++ a-timoau.adb (working copy)
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -173,6 +173,10 @@
Load_Digits (File, Buf, Ptr, Loaded);
if Loaded then
+
+ -- Deal with based case. We recognize either the standard '#' or the
+ -- allowed alternative replacement ':' (see RM J.2(3)).
+
Load (File, Buf, Ptr, '#', ':', Loaded);
if Loaded then
Index: a-ztinau.adb
===================================================================
--- a-ztinau.adb (revision 219191)
+++ a-ztinau.adb (working copy)
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -165,6 +165,10 @@
Load_Digits (File, Buf, Ptr, Loaded);
if Loaded then
+
+ -- Deal with based case. We recognize either the standard '#' or the
+ -- allowed alternative replacement ':' (see RM J.2(3)).
+
Load (File, Buf, Ptr, '#', ':', Loaded);
if Loaded then
Index: a-ztmoau.adb
===================================================================
--- a-ztmoau.adb (revision 219191)
+++ a-ztmoau.adb (working copy)
@@ -173,6 +173,10 @@
Load_Digits (File, Buf, Ptr, Loaded);
if Loaded then
+
+ -- Deal with based case. We recognize either the standard '#' or the
+ -- allowed alternative replacement ':' (see RM J.2(3)).
+
Load (File, Buf, Ptr, '#', ':', Loaded);
if Loaded then
Index: s-valuns.adb
===================================================================
--- s-valuns.adb (revision 219191)
+++ s-valuns.adb (working copy)
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2012, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -119,9 +119,10 @@
Ptr.all := P;
- -- Deal with based case
+ -- Deal with based case. We recognize either the standard '#' or the
+ -- allowed alternative replacement ':' (see RM J.2(3)).
- if P < Max and then (Str (P) = ':' or else Str (P) = '#') then
+ if P < Max and then (Str (P) = '#' or else Str (P) = ':') then
Base_Char := Str (P);
P := P + 1;
Base := Uval;
Index: s-valrea.adb
===================================================================
--- s-valrea.adb (revision 219191)
+++ s-valrea.adb (working copy)
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2012, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -183,9 +183,10 @@
Bad_Value (Str);
end if;
- -- Deal with based case
+ -- Deal with based case. We reognize either the standard '#' or the
+ -- allowed alternative replacement ':' (see RM J.2(3)).
- if P < Max and then (Str (P) = ':' or else Str (P) = '#') then
+ if P < Max and then (Str (P) = '#' or else Str (P) = ':') then
declare
Base_Char : constant Character := Str (P);
Digit : Natural;
Index: a-wtflau.adb
===================================================================
--- a-wtflau.adb (revision 219191)
+++ a-wtflau.adb (working copy)
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -124,7 +124,8 @@
return;
end if;
- -- Based cases
+ -- Deal with based case. We recognize either the standard '#' or the
+ -- allowed alternative replacement ':' (see RM J.2(3)).
Load (File, Buf, Ptr, '#', ':', Loaded);
Index: a-tiflau.adb
===================================================================
--- a-tiflau.adb (revision 219191)
+++ a-tiflau.adb (working copy)
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -124,7 +124,8 @@
return;
end if;
- -- Based cases
+ -- Based cases. We recognize either the standard '#' or the
+ -- allowed alternative replacement ':' (see RM J.2(3)).
Load (File, Buf, Ptr, '#', ':', Loaded);
Index: a-ztflau.adb
===================================================================
--- a-ztflau.adb (revision 219191)
+++ a-ztflau.adb (working copy)
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -124,7 +124,8 @@
return;
end if;
- -- Based cases
+ -- Deal with based case. We recognize either the standard '#' or the
+ -- allowed alternative replacement ':' (see RM J.2(3)).
Load (File, Buf, Ptr, '#', ':', Loaded);
Index: a-wtinau.adb
===================================================================
--- a-wtinau.adb (revision 219191)
+++ a-wtinau.adb (working copy)
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -165,6 +165,10 @@
Load_Digits (File, Buf, Ptr, Loaded);
if Loaded then
+
+ -- Deal with based case. We recognize either the standard '#' or the
+ -- allowed alternative replacement ':' (see RM J.2(3)).
+
Load (File, Buf, Ptr, '#', ':', Loaded);
if Loaded then
Index: a-wtmoau.adb
===================================================================
--- a-wtmoau.adb (revision 219191)
+++ a-wtmoau.adb (working copy)
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -173,6 +173,10 @@
Load_Digits (File, Buf, Ptr, Loaded);
if Loaded then
+
+ -- Deal with based case. We recognize either the standard '#' or the
+ -- allowed alternative replacement ':' (see RM J.2(3)).
+
Load (File, Buf, Ptr, '#', ':', Loaded);
if Loaded then
reply other threads:[~2015-01-06 9:24 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=20150106092442.GA16996@adacore.com \
--to=charlet@adacore.com \
--cc=dewar@adacore.com \
--cc=gcc-patches@gcc.gnu.org \
/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).