diff options
author | Bob Duff <duff@adacore.com> | 2019-12-13 09:03:50 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2019-12-13 09:03:50 +0000 |
commit | e841d4d8b3d1e64fe2f31329c8644ceca341874f (patch) | |
tree | aed108db93f82ae274c1278b8bea90bd77d2f1b3 /gcc/ada/impunit.ads | |
parent | 90366d65738e17da9998dc5618d6e970b6ee3b48 (diff) | |
download | gcc-e841d4d8b3d1e64fe2f31329c8644ceca341874f.zip gcc-e841d4d8b3d1e64fe2f31329c8644ceca341874f.tar.gz gcc-e841d4d8b3d1e64fe2f31329c8644ceca341874f.tar.bz2 |
[Ada] Ada2020: Update Impunit for Ada 202X
2019-12-13 Bob Duff <duff@adacore.com>
gcc/ada/
* impunit.ads: Add Ada_202X_Unit.
* impunit.adb: Add a table Non_Imp_File_Names_2X analogous to
the other tables. Add code to search this table.
* opt.ads: Add Warn_On_Ada_202X_Compatibility flag, currently
always True.
* sem_ch10.adb (Analyze_With_Clause): Give a warning if an Ada
2020 unit is with-ed when Ada_Version < Ada_2020. Change 'if'
to 'case': Full coverage rules rule.
From-SVN: r279346
Diffstat (limited to 'gcc/ada/impunit.ads')
-rw-r--r-- | gcc/ada/impunit.ads | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/gcc/ada/impunit.ads b/gcc/ada/impunit.ads index 466cb86..7e6ea61 100644 --- a/gcc/ada/impunit.ads +++ b/gcc/ada/impunit.ads @@ -45,19 +45,13 @@ package Impunit is -- This is not a predefined unit, so no checks are needed Ada_95_Unit, - -- This unit is defined in the Ada 95 RM, and can be freely with'ed in - -- both Ada 95 mode and Ada 05 mode. Note that in Ada 83 mode, no child - -- units are allowed, so you can't even name such a unit. - Ada_2005_Unit, - -- This unit is defined in the Ada 2005 RM. Withing this unit from an - -- Ada 95 mode program will generate a warning (again, strictly speaking - -- this should be an error, but that seems over-strenuous). - - Ada_2012_Unit); - -- This unit is defined in the Ada 2012 RM. Withing this unit from an - -- Ada 95 or 2005 mode program will generate a warning (again, strictly - -- speaking this should be an error, but that seems over-strenuous). + Ada_2012_Unit, + Ada_202X_Unit); + -- This unit is defined in the Ada RM of the given year. This is used to + -- give a warning when withing a unit from a wrong mode (e.g. withing an + -- Ada_2012_Unit when compiling with -gnat95). Note that in Ada 83 mode, + -- no child units are allowed, so you can't even name such a unit. function Get_Kind_Of_Unit (U : Unit_Number_Type) return Kind_Of_Unit; -- Given the unit number of a unit, this function determines the type |