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. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_prag.adb (Analyze_Pragma): Remove redundant call to Set_Error_Posted.