aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gnat_ugn.texi
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2019-08-20 09:49:02 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-08-20 09:49:02 +0000
commit94f76dc10cdbdfcd5255b0c0cf15ab9056c0c514 (patch)
treeda58597813cb45bdeb79cc8caeb9e07beb493ab9 /gcc/ada/gnat_ugn.texi
parentafdc759841f8f4f464f3d5a2ba8e05e9a8e41d72 (diff)
downloadgcc-94f76dc10cdbdfcd5255b0c0cf15ab9056c0c514.zip
gcc-94f76dc10cdbdfcd5255b0c0cf15ab9056c0c514.tar.gz
gcc-94f76dc10cdbdfcd5255b0c0cf15ab9056c0c514.tar.bz2
[Ada] Warning for out-of-order record representation clauses
The compiler can now warn for out-of-order record representation clauses. A warning is given if the order of component declarations, component clauses, and bit-level layout do not all agree. The warning is disabled by default, and may be enabled by the -gnatw_r switch. 2019-08-20 Bob Duff <duff@adacore.com> gcc/ada/ * sem_ch13.adb (Component_Order_Check): New procedure to check for out-of-order clauses. * warnsw.ads, warnsw.adb: New -gnatw_r switch. * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Document new switch. * gnat_ugn.texi: Regenerate. From-SVN: r274723
Diffstat (limited to 'gcc/ada/gnat_ugn.texi')
-rw-r--r--gcc/ada/gnat_ugn.texi32
1 files changed, 30 insertions, 2 deletions
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index 3e0c857..c2dd053 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -10925,7 +10925,7 @@ of the pragma in the @cite{GNAT_Reference_manual}).
@emph{Activate most optional warnings.}
-This switch activates most optional warning messages. See the remaining list
+This switch activates most optional warning messages. See the remaining list
in this section for details on optional warning messages that can be
individually controlled. The warnings that are not turned on by this
switch are:
@@ -10970,6 +10970,9 @@ switch are:
@code{-gnatw.q} (questionable layout of record types)
@item
+@code{-gnatw_r} (out-of-order record representation clauses)
+
+@item
@code{-gnatw.s} (overridden size clause)
@item
@@ -12225,7 +12228,7 @@ opposed to renaming the function itself). The default is that these
warnings are given.
@end table
-@geindex -gnatwT (gcc)
+@geindex -gnatw.R (gcc)
@table @asis
@@ -12237,6 +12240,31 @@ warnings are given.
This switch suppresses warnings for object renaming function.
@end table
+@geindex -gnatw_r (gcc)
+
+
+@table @asis
+
+@item @code{-gnatw_r}
+
+@emph{Activate warnings for out-of-order record representation clauses.}
+
+This switch activates warnings for record representation clauses,
+if the order of component declarations, component clauses,
+and bit-level layout do not all agree.
+The default is that these warnings are not given.
+@end table
+
+@geindex -gnatw_R (gcc)
+
+
+@table @asis
+
+@item @code{-gnatw_R}
+
+@emph{Suppress warnings for out-of-order record representation clauses.}
+@end table
+
@geindex -gnatws (gcc)