From 0d9583573b7fbb4ee3fc769f962dfdde8684d795 Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Sat, 16 Apr 2022 14:38:54 +0200 Subject: [Ada] Remove redundant marking of illegal pragma with error posted We flag illegal pragma Elaborate with a call to Error_Msg on the pragma argument, which in turn calls Set_Error_Posted on the enclosing statement, i.e. on the pragma itself. The explicit call to Set_Error_Posted on the pragma itself was redundant. Cleanup related to handling of illegal code when detecting uninitialized scalar objects. gcc/ada/ * sem_prag.adb (Analyze_Pragma): Remove redundant call to Set_Error_Posted. --- gcc/ada/sem_prag.adb | 1 - 1 file changed, 1 deletion(-) diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 0bee4a1..8cc42c6 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -16008,7 +16008,6 @@ package body Sem_Prag is end loop Innr; if Citem = N then - Set_Error_Posted (N); Error_Pragma_Arg ("argument of pragma% is not withed unit", Arg); end if; -- cgit v1.1