]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Cleanup validity of boolean operators
authorPiotr Trojanek <trojanek@adacore.com>
Tue, 30 Jul 2024 14:17:29 +0000 (16:17 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Fri, 23 Aug 2024 08:51:04 +0000 (10:51 +0200)
commitff356c0ab4cf514eaffc847df3c8717a5ee705d6
tree3b346053ea8fcec84850e761f609dd3a8c902b8c
parentf67d108dbcd499cd6db6cb59484c400301e4ebd9
ada: Cleanup validity of boolean operators

Move detection of always valid expressions from routine
Ensure_Valid (which inserts validity checks) to Expr_Known_Valid
(which decides their validity). In particular, this patch removes
duplicated detection of boolean operators, which were recognized
in both these routines.

Code cleanup; behavior is unaffected.

gcc/ada/

* checks.adb (Ensure_Valid): Remove detection of boolean and
short-circuit operators.
(Expr_Known_Valid): Detect short-circuit operators; detection of
boolean operators was already done in this routine.
gcc/ada/checks.adb