]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Fix spurious warning about redundant parentheses in range bound
authorPiotr Trojanek <trojanek@adacore.com>
Tue, 7 Jan 2025 09:42:35 +0000 (10:42 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Mon, 13 Jan 2025 10:52:58 +0000 (11:52 +0100)
commitef4448e0a0508db63581c27238d39e634268b5a2
tree5911ebc8530d2f65c6a14b6aa39d785ee1240895
parentc6989fbbf2f195e874245409635a856d74bf6945
ada: Fix spurious warning about redundant parentheses in range bound

Use the same logic for warning about redundant parentheses in lower and upper
bounds of a discrete range. This fixes a spurious warning that, if followed,
would render the code illegal.

gcc/ada/ChangeLog:

* par-ch3.adb (P_Discrete_Range): Detect redundant parentheses in the
lower bound like in the upper bound.
gcc/ada/par-ch3.adb