[Ada] New No_Local_Tagged_Types restriction
authorMarc Poulhiès <poulhies@adacore.com>
Tue, 1 Feb 2022 11:20:51 +0000 (12:20 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 11 May 2022 08:53:21 +0000 (08:53 +0000)
commit4cfd39b0ff56c20db588385ee7be9853278ea142
tree8998e730fa1ca002f23084b7c27f43554c152c3f
parentc63b798f88aa82de32789b6a2ae5f387e58165c7
[Ada] New No_Local_Tagged_Types restriction

Add new configuration restriction No_Local_Tagged_Types. This new
restriction ensures at compile time that all tagged types are only
declared at the library level.

gcc/ada/

* libgnat/s-rident.ads (Restriction_Id): Add
No_Local_Tagged_Types, update comment for adding new GNAT
specific restriction.
* restrict.ads (Implementation_Restriction): Add
No_Local_Tagged_Types.
* sem_ch3.adb (Analyze_Full_Type_Declaration): Add check for
tagged type at library level.
* doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
Add No_Local_Tagged_Types description.
* gnat_rm.texi: Regenerate.
gcc/ada/doc/gnat_rm/standard_and_implementation_defined_restrictions.rst
gcc/ada/gnat_rm.texi
gcc/ada/libgnat/s-rident.ads
gcc/ada/restrict.ads
gcc/ada/sem_ch3.adb