]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Spurious warning about hiding in generic instantiation
authorGary Dismukes <dismukes@adacore.com>
Wed, 11 Aug 2021 22:41:28 +0000 (18:41 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Fri, 1 Oct 2021 06:13:38 +0000 (06:13 +0000)
gcc/ada/

* sem_util.adb (Enter_Name): Suppress hiding warning when in an
instance.

gcc/ada/sem_util.adb

index 98e687791071bc8c9cbc1ea7f024e0a697419cd0..0c0d34ba6b0c112860b3a39ba6113c5d44152d92 100644 (file)
@@ -8656,6 +8656,10 @@ package body Sem_Util is
         and then Comes_From_Source (C)
         and then Comes_From_Source (Def_Id)
 
+        --  Don't warn within a generic instantiation
+
+        and then not In_Instance
+
         --  Don't warn unless entity in question is in extended main source
 
         and then In_Extended_Main_Source_Unit (Def_Id)