]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Warning for out-of-order record representation clauses
authorpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 20 Aug 2019 09:49:02 +0000 (09:49 +0000)
committerpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 20 Aug 2019 09:49:02 +0000 (09:49 +0000)
commitd5253a27eb3203abb1d374377039c0de216ab02c
treeda58597813cb45bdeb79cc8caeb9e07beb493ab9
parenta8e38e22c16c0aafceba62afa8c7ab23206760d9
[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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@274723 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ada/ChangeLog
gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst
gcc/ada/gnat_ugn.texi
gcc/ada/sem_ch13.adb
gcc/ada/warnsw.adb
gcc/ada/warnsw.ads