From: Marc Poulhiès Date: Fri, 26 Nov 2021 09:49:51 +0000 (+0100) Subject: [Ada] Fix obsolete array aggregate warning being triggered by expanded code X-Git-Tag: basepoints/gcc-13~2570 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a35fe64c7a89935599af3d4693494ca4578cd7f;p=thirdparty%2Fgcc.git [Ada] Fix obsolete array aggregate warning being triggered by expanded code 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 index 0d4af65e8a65..6e76e3d3c4d9 100644 --- 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" &