]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Fix obsolete array aggregate warning being triggered by expanded code
authorMarc Poulhiès <poulhies@adacore.com>
Fri, 26 Nov 2021 09:49:51 +0000 (10:49 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 2 Dec 2021 16:26:29 +0000 (16:26 +0000)
gcc/ada/

* sem_aggr.adb (Resolve_Array_Aggregate): Filter out nodes not
coming from source before emitting the warning.

gcc/ada/sem_aggr.adb

index 0d4af65e8a655f17811f3169e2a0718bc94c859b..6e76e3d3c4d973f6a3f887a89187088776f8f83a 100644 (file)
@@ -1807,6 +1807,7 @@ package body Sem_Aggr is
         and then not Is_Enum_Array_Aggregate (N)
         and then Is_Parenthesis_Aggregate (N)
         and then Nkind (Parent (N)) /= N_Qualified_Expression
+        and then Comes_From_Source (N)
       then
          Error_Msg_N
            ("?j?array aggregate using () is an" &