aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2022-05-19 20:42:42 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2022-07-05 08:28:21 +0000
commit5a387a2b8f58a238acfea6ec820a0fd44057a09a (patch)
tree364ba52f6b4ac37a9e14d97ba2ae598f1755ea61 /gcc/testsuite/gnat.dg
parentd2672ffea0a478b265f5ed0239723c8ba54e8d24 (diff)
downloadgcc-5a387a2b8f58a238acfea6ec820a0fd44057a09a.zip
gcc-5a387a2b8f58a238acfea6ec820a0fd44057a09a.tar.gz
gcc-5a387a2b8f58a238acfea6ec820a0fd44057a09a.tar.bz2
[Ada] Warn about obsolete uses of renamed Ada 83 packages
Ada 83 packages like Unchecked_Conversion or Text_IO are obsolete since Ada 95. GNAT now warns about their uses when warnings on obsolescent featured (Annex J) is active. gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst (Warning Message Control): Update description of switch -gnatwj. * gnat_ugn.texi: Regenerate. * sem_ch10.adb (Analyze_With_Clause): Warn on WITH clauses for obsolete renamed units; in Ada 83 mode do not consider predefined renamings to be obsolete. gcc/testsuite/ * gnat.dg/renaming1.adb: Update WITH clause. * gnat.dg/renaming1.ads: Likewise. * gnat.dg/warn29.adb: Likewise.
Diffstat (limited to 'gcc/testsuite/gnat.dg')
-rw-r--r--gcc/testsuite/gnat.dg/renaming1.adb8
-rw-r--r--gcc/testsuite/gnat.dg/renaming1.ads4
-rw-r--r--gcc/testsuite/gnat.dg/warn29.adb2
3 files changed, 7 insertions, 7 deletions
diff --git a/gcc/testsuite/gnat.dg/renaming1.adb b/gcc/testsuite/gnat.dg/renaming1.adb
index d033c9a..c85e50a 100644
--- a/gcc/testsuite/gnat.dg/renaming1.adb
+++ b/gcc/testsuite/gnat.dg/renaming1.adb
@@ -1,12 +1,12 @@
-- { dg-do compile}
-- { dg-options "-gnatwa" }
-with Text_IO;
-use Text_IO;
+with Ada.Text_IO;
+use Ada.Text_IO;
package body renaming1 is
- procedure Fo (A : Text_IO.File_Access) is
+ procedure Fo (A : Ada.Text_IO.File_Access) is
begin
- if A = Text_IO.Standard_Output then
+ if A = Ada.Text_IO.Standard_Output then
null;
end if;
end Fo;
diff --git a/gcc/testsuite/gnat.dg/renaming1.ads b/gcc/testsuite/gnat.dg/renaming1.ads
index 893f423..fba216a 100644
--- a/gcc/testsuite/gnat.dg/renaming1.ads
+++ b/gcc/testsuite/gnat.dg/renaming1.ads
@@ -1,4 +1,4 @@
-with Text_IO;
+with Ada.Text_IO;
package renaming1 is
- procedure Fo (A : Text_IO.File_Access);
+ procedure Fo (A : Ada.Text_IO.File_Access);
end;
diff --git a/gcc/testsuite/gnat.dg/warn29.adb b/gcc/testsuite/gnat.dg/warn29.adb
index ec3b9ee..eeb3a89 100644
--- a/gcc/testsuite/gnat.dg/warn29.adb
+++ b/gcc/testsuite/gnat.dg/warn29.adb
@@ -1,7 +1,7 @@
-- { dg-do compile }
-- { dg-options "-gnatwa" }
-with Text_IO; use Text_IO;
+with Ada.Text_IO; use Ada.Text_IO;
package body Warn29 is
procedure P (X : T; Y : Integer) is