Filter out nodes not coming from source before emitting the warning.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

        * sem_aggr.adb (Resolve_Array_Aggregate): Filter out nodes not
        coming from source before emitting the warning.
diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb
--- a/gcc/ada/sem_aggr.adb
+++ b/gcc/ada/sem_aggr.adb
@@ -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" &


Reply via email to