From: Ronan Desplanques <[email protected]>
This patch changes a table in the reference manual so that the Ada code
inside is properly highlighted and uses the usual casing conventions.
gcc/ada/ChangeLog:
* doc/gnat_rm/representation_clauses_and_pragmas.rst: Improve table.
* gnat_rm.texi: Regenerate.
* gnat_ugn.texi: Regenerate.
Tested on x86_64-pc-linux-gnu, committed on master.
---
.../representation_clauses_and_pragmas.rst | 39 ++++++++++---------
gcc/ada/gnat_rm.texi | 20 +++++-----
gcc/ada/gnat_ugn.texi | 2 +-
3 files changed, 32 insertions(+), 29 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 177f5bbfcd2..8e46b378f65 100644
--- a/gcc/ada/doc/gnat_rm/representation_clauses_and_pragmas.rst
+++ b/gcc/ada/doc/gnat_rm/representation_clauses_and_pragmas.rst
@@ -1,5 +1,8 @@
.. role:: switch(samp)
+.. role:: ada(code)
+ :language: ada
+
.. _Representation_Clauses_and_Pragmas:
**********************************
@@ -560,24 +563,24 @@ description of the ``Object_Size`` attribute.
To get a feel for the difference, consider the following examples (note
that in each case the base is ``Short_Short_Integer`` with a size of 8):
-+---------------------------------------------+-------------+-------------+
-|Type or subtype declaration | Object_Size | Value_Size|
-+=============================================+=============+=============+
-|``type x1 is range 0 .. 5;`` | 8 | 3 |
-+---------------------------------------------+-------------+-------------+
-|``type x2 is range 0 .. 5;`` | 16 | 12 |
-|``for x2'size use 12;`` | | |
-+---------------------------------------------+-------------+-------------+
-|``subtype x3 is x2 range 0 .. 3;`` | 16 | 2 |
-+---------------------------------------------+-------------+-------------+
-|``subtype x4 is x2'base range 0 .. 10;`` | 8 | 4 |
-+---------------------------------------------+-------------+-------------+
-|``dynamic : x2'Base range -64 .. +63;`` | | |
-+---------------------------------------------+-------------+-------------+
-|``subtype x5 is x2 range 0 .. dynamic;`` | 16 | 3* |
-+---------------------------------------------+-------------+-------------+
-|``subtype x6 is x2'base range 0 .. dynamic;``| 8 | 7* |
-+---------------------------------------------+-------------+-------------+
++------------------------------------------------+-------------+-------------+
+|Type or subtype declaration | Object_Size | Value_Size|
++================================================+=============+=============+
+|:ada:`type X1 is range 0 .. 5;` | 8 | 3 |
++------------------------------------------------+-------------+-------------+
+|:ada:`type X2 is range 0 .. 5; | 16 | 12 |
+|for X2'Size use 12;` | | |
++------------------------------------------------+-------------+-------------+
+|:ada:`subtype X3 is X2 range 0 .. 3;` | 16 | 2 |
++------------------------------------------------+-------------+-------------+
+|:ada:`subtype X4 is X2'Base range 0 .. 10;` | 8 | 4 |
++------------------------------------------------+-------------+-------------+
+|:ada:`Dynamic : X2'Base range -64 .. +63;` | | |
++------------------------------------------------+-------------+-------------+
+|:ada:`subtype X5 is X2 range 0 .. Dynamic;` | 16 | 3* |
++------------------------------------------------+-------------+-------------+
+|:ada:`subtype X6 is X2'Base range 0 .. Dynamic;`| 8 | 7* |
++------------------------------------------------+-------------+-------------+
Note: the entries marked '*' are not actually specified by the Ada
Reference Manual, which has nothing to say about size in the dynamic
diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi
index a198200d91e..49346f39115 100644
--- a/gcc/ada/gnat_rm.texi
+++ b/gcc/ada/gnat_rm.texi
@@ -19,7 +19,7 @@
@copying
@quotation
-GNAT Reference Manual , Nov 18, 2025
+GNAT Reference Manual , Dec 05, 2025
AdaCore
@@ -19606,7 +19606,7 @@ To get a feel for the difference, consider the
following examples (note
that in each case the base is @code{Short_Short_Integer} with a size of 8):
-@multitable {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}
{xxxxxxxxxxxxxxx} {xxxxxxxxxxxxxxx}
+@multitable {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}
{xxxxxxxxxxxxxxx} {xxxxxxxxxxxxxxx}
@headitem
Type or subtype declaration
@@ -19621,7 +19621,7 @@ Value_Size
@item
-@code{type x1 is range 0 .. 5;}
+@code{type X1 is range 0 .. 5;}
@tab
@@ -19633,8 +19633,8 @@ Value_Size
@item
-@code{type x2 is range 0 .. 5;}
-@code{for x2'size use 12;}
+@code{type X2 is range 0 .. 5;
+for X2'Size use 12;}
@tab
@@ -19646,7 +19646,7 @@ Value_Size
@item
-@code{subtype x3 is x2 range 0 .. 3;}
+@code{subtype X3 is X2 range 0 .. 3;}
@tab
@@ -19658,7 +19658,7 @@ Value_Size
@item
-@code{subtype x4 is x2'base range 0 .. 10;}
+@code{subtype X4 is X2'Base range 0 .. 10;}
@tab
@@ -19670,7 +19670,7 @@ Value_Size
@item
-@code{dynamic : x2'Base range -64 .. +63;}
+@code{Dynamic : X2'Base range -64 .. +63;}
@tab
@@ -19678,7 +19678,7 @@ Value_Size
@item
-@code{subtype x5 is x2 range 0 .. dynamic;}
+@code{subtype X5 is X2 range 0 .. Dynamic;}
@tab
@@ -19690,7 +19690,7 @@ Value_Size
@item
-@code{subtype x6 is x2'base range 0 .. dynamic;}
+@code{subtype X6 is X2'Base range 0 .. Dynamic;}
@tab
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index 22357216892..8acb916d7e8 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -30270,8 +30270,8 @@ to permit their use in free software.
@printindex ge
-@anchor{gnat_ugn/gnat_utility_programs switches-related-to-project-files}@w{
}
@anchor{d2}@w{ }
+@anchor{gnat_ugn/gnat_utility_programs switches-related-to-project-files}@w{
}
@c %**end of body
@bye
--
2.51.0