summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_warn.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_warn.adb')
-rw-r--r--gcc/ada/sem_warn.adb9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ada/sem_warn.adb b/gcc/ada/sem_warn.adb
index 7ec5201c039..f6f5020118a 100644
--- a/gcc/ada/sem_warn.adb
+++ b/gcc/ada/sem_warn.adb
@@ -674,6 +674,15 @@ package body Sem_Warn is
if Unit = Spec_Unit then
Set_Unreferenced_In_Spec (Item);
+ -- In No_Run_Time_Mode, we remove the bodies of non-
+ -- inlined subprograms, which may lead to spurious
+ -- warnings, clearly undesirable.
+
+ elsif No_Run_Time
+ and then Is_Predefined_File_Name (Unit_File_Name (Unit))
+ then
+ null;
+
-- Otherwise simple unreferenced message
else