diff options
author | Viljar Indus <indus@adacore.com> | 2024-08-01 15:59:00 +0300 |
---|---|---|
committer | Marc Poulhiès <dkm@gcc.gnu.org> | 2024-08-23 10:51:04 +0200 |
commit | dce0d46490cc3f929a5636902f47e2410719e33c (patch) | |
tree | 17235f1c2a58a26d5f237dcd586bb23b525695d6 /COPYING3.LIB | |
parent | 92a9b5527b21b7af8aaaa3cea8553d9b3224f29a (diff) | |
download | gcc-dce0d46490cc3f929a5636902f47e2410719e33c.zip gcc-dce0d46490cc3f929a5636902f47e2410719e33c.tar.gz gcc-dce0d46490cc3f929a5636902f47e2410719e33c.tar.bz2 |
ada: Emit a warning on inheritly limited types
Record types that do not have a limited keyword but have a
member with a limited type are also considered to be limited types.
This can be confusing to understand for newer Ada users. It is
better to emit a warning in this scenario and suggest that the
type should be marked with a limited keyword. This diagnostic will
be acticated when the -gnatw_l switch is used.
gcc/ada/
* sem_ch3.adb: Add method Check_Inherited_Limted_Record for
emitting the warning for an inherited limited type.
* warnsw.adb: Add processing for the -gnatw_l switch that
triggeres the inheritly limited type warning.
* warnsw.ads: same as above.
* doc/gnat_ugn/building_executable_programs_with_gnat.rst: Add
entry for -gnatw_l switch.
* gnat_ugn.texi: Regenerate.
Diffstat (limited to 'COPYING3.LIB')
0 files changed, 0 insertions, 0 deletions