aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/switch-c.adb
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2023-12-19 10:23:55 +0100
committerMarc Poulhiès <poulhies@adacore.com>2024-05-06 11:11:27 +0200
commite5a71415c32db32bf2c20a597f6191990ed1a0be (patch)
tree6968ce82288b49be243ba25365da03b6646e2e7a /gcc/ada/switch-c.adb
parentbd2462a8473b7ee7cabd4040553ae13606273723 (diff)
downloadgcc-e5a71415c32db32bf2c20a597f6191990ed1a0be.zip
gcc-e5a71415c32db32bf2c20a597f6191990ed1a0be.tar.gz
gcc-e5a71415c32db32bf2c20a597f6191990ed1a0be.tar.bz2
ada: Replace redundant conditions with assertions
Fix warnings from the CodePeer. The code structure is essentially: if A and B then ... elsif not A and not B then ... elsif A then ... elsif B then ... -- this condition is redundant end if; and it causes CodePeer to say "exception is raised in a conditional branch", which most likely means that the condition is redundant. gcc/ada/ * make.adb (Scan_Make_Arg): Remove redundant condition. * switch-b.adb (Scan_Debug_Switches): Likewise. * switch-c.adb (Scan_Front_End_Switches): Likewise.
Diffstat (limited to 'gcc/ada/switch-c.adb')
-rw-r--r--gcc/ada/switch-c.adb2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/switch-c.adb b/gcc/ada/switch-c.adb
index 7668fce..43b69f1 100644
--- a/gcc/ada/switch-c.adb
+++ b/gcc/ada/switch-c.adb
@@ -274,7 +274,7 @@ package body Switch.C is
Osint.Fail ("RTS path not valid: missing "
& "adainclude directory");
- elsif RTS_Lib_Path_Name = null then
+ else pragma Assert (RTS_Lib_Path_Name = null);
Osint.Fail ("RTS path not valid: missing "
& "adalib directory");
end if;