aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEtienne Servais <servais@adacore.com>2022-02-23 11:44:42 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2022-05-13 08:04:35 +0000
commit9e5b1b076a57feee4057460aac8aae451b42431e (patch)
tree53aece9cc8df2158a9f2cb132158f58e0efa230f /gcc
parent85df62468c26335d7d771f319620f7a51f58e448 (diff)
downloadgcc-9e5b1b076a57feee4057460aac8aae451b42431e.zip
gcc-9e5b1b076a57feee4057460aac8aae451b42431e.tar.gz
gcc-9e5b1b076a57feee4057460aac8aae451b42431e.tar.bz2
[Ada] Fix code example on representation clause
The column is superfluous, component names are missing. gcc/ada/ * doc/gnat_rm/representation_clauses_and_pragmas.rst: Fix code snippet. * gnat_rm.texi: Regenerate.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/doc/gnat_rm/representation_clauses_and_pragmas.rst6
-rw-r--r--gcc/ada/gnat_rm.texi6
2 files changed, 6 insertions, 6 deletions
diff --git a/gcc/ada/doc/gnat_rm/representation_clauses_and_pragmas.rst b/gcc/ada/doc/gnat_rm/representation_clauses_and_pragmas.rst
index a30ad5f..b0e131f 100644
--- a/gcc/ada/doc/gnat_rm/representation_clauses_and_pragmas.rst
+++ b/gcc/ada/doc/gnat_rm/representation_clauses_and_pragmas.rst
@@ -457,14 +457,14 @@ from Ada 83 to Ada 95 or Ada 2005. For example, consider:
.. code-block:: ada
- type Rec is record;
+ type Rec is record
A : Natural;
B : Natural;
end record;
for Rec use record
- at 0 range 0 .. Natural'Size - 1;
- at 0 range Natural'Size .. 2 * Natural'Size - 1;
+ A at 0 range 0 .. Natural'Size - 1;
+ B at 0 range Natural'Size .. 2 * Natural'Size - 1;
end record;
In the above code, since the typical size of ``Natural`` objects
diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi
index f7828ca..8997f63 100644
--- a/gcc/ada/gnat_rm.texi
+++ b/gcc/ada/gnat_rm.texi
@@ -18913,14 +18913,14 @@ typically 31. This means that code may change in behavior when moving
from Ada 83 to Ada 95 or Ada 2005. For example, consider:
@example
-type Rec is record;
+type Rec is record
A : Natural;
B : Natural;
end record;
for Rec use record
- at 0 range 0 .. Natural'Size - 1;
- at 0 range Natural'Size .. 2 * Natural'Size - 1;
+ A at 0 range 0 .. Natural'Size - 1;
+ B at 0 range Natural'Size .. 2 * Natural'Size - 1;
end record;
@end example