diff options
author | Steve Baird <baird@adacore.com> | 2022-11-09 15:53:49 -0800 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2022-11-21 11:10:31 +0100 |
commit | 84e80d556415c4c82081647e70e899506a7db9ba (patch) | |
tree | 249948aff7b3daea79c242a88b9f28d790f51548 /gcc/ada/doc | |
parent | 493e760dda4dac45eefac4185a7b04a1b8fc6c18 (diff) | |
download | gcc-84e80d556415c4c82081647e70e899506a7db9ba.zip gcc-84e80d556415c4c82081647e70e899506a7db9ba.tar.gz gcc-84e80d556415c4c82081647e70e899506a7db9ba.tar.bz2 |
ada: Improve documentation for -gnatw.h warnings
The -gnatw.h option enables warnings about "gaps" in record layout
specifications. In the case of a "partial" layout specification, where the
locations of some components are left unspecified, the resulting warnings
may be incomplete or incorrect. Document this implementation limitation.
gcc/ada/
* doc/gnat_ugn/building_executable_programs_with_gnat.rst: Improve
the description of how the -gnatw.h switch interacts with
"partial" record layout specifications (i.e., specifications where
the locations of some components are left unspecified).
* gnat_ugn.texi: Regenerate.
Diffstat (limited to 'gcc/ada/doc')
-rw-r--r-- | gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst b/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst index 87fb108..fe0b567 100644 --- a/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst +++ b/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst @@ -3221,8 +3221,13 @@ of the pragma in the :title:`GNAT_Reference_manual`). This switch activates warnings on component clauses in record representation clauses that leave holes (gaps) in the record layout. - If this warning option is active, then record representation clauses - should specify a contiguous layout, adding unused fill fields if needed. + If a record representation clause does not specify a location for + every component of the record type, then the warnings generated (or not + generated) are unspecified. For example, there may be gaps for which + either no warning is generated or a warning is generated that + incorrectly describes the location of the gap. This undesirable situation + can sometimes be avoided by adding (and specifying the location for) unused + fill fields. .. index:: -gnatw.H (gcc) |