aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch7.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_ch7.adb')
-rw-r--r--gcc/ada/sem_ch7.adb4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch7.adb b/gcc/ada/sem_ch7.adb
index 2e035c7..be62256 100644
--- a/gcc/ada/sem_ch7.adb
+++ b/gcc/ada/sem_ch7.adb
@@ -1148,6 +1148,10 @@ package body Sem_Ch7 is
if Is_Comp_Unit then
Set_Body_Required (Parent (N), Body_Required);
+
+ if Legacy_Elaboration_Checks and not Body_Required then
+ Set_Suppress_Elaboration_Warnings (Id);
+ end if;
end if;
End_Package_Scope (Id);