]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Warn about redundant parentheses in upper range bounds
authorPiotr Trojanek <trojanek@adacore.com>
Fri, 3 Jan 2025 15:02:01 +0000 (16:02 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Mon, 13 Jan 2025 10:52:57 +0000 (11:52 +0100)
commit518fd9e9b18913997b9ed8120d2a85c7bd3528f9
treedb31b1660cc5747ec63bc19ac20e48a427c23247
parentd2e3635aa1820346050b85009df82a60cdd8206f
ada: Warn about redundant parentheses in upper range bounds

Fix a glitch in condition that effectively caused detection of redundant
parentheses in upper range bounds to be dead code.

gcc/ada/ChangeLog:

* par-ch3.adb (P_Discrete_Range): Replace N_Subexpr, which was catching
all subexpressions, with kinds that catch nodes that require
parentheses to become "simple expressions".
gcc/ada/par-ch3.adb