aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch5.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_ch5.adb')
-rw-r--r--gcc/ada/sem_ch5.adb6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb
index e7f464e..a29aece 100644
--- a/gcc/ada/sem_ch5.adb
+++ b/gcc/ada/sem_ch5.adb
@@ -1580,8 +1580,14 @@ package body Sem_Ch5 is
-- Warn on redundant if statement that has no effect
+ -- Note, we could also check empty ELSIF parts ???
+
if Warn_On_Redundant_Constructs
+ -- If statement must be from source
+
+ and then Comes_From_Source (N)
+
-- Condition must not have obvious side effect
and then Has_No_Obvious_Side_Effects (Condition (N))