]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Warn about redundant parentheses inside unary operators
authorPiotr Trojanek <trojanek@adacore.com>
Wed, 8 Jan 2025 13:00:50 +0000 (14:00 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Mon, 13 Jan 2025 10:52:59 +0000 (11:52 +0100)
commit686bd4e0bc484f9612038d51d07708ff8a4ff75b
treeef1b631157fe4cbbd1dd86a31b3d576a8a5e43f8
parent34943af17e3ed7963bb8b85757e24b300aa03cce
ada: Warn about redundant parentheses inside unary operators

GNAT already emits a style warning when redundant parentheses appear inside
logical and short-circuit operators. A similar warning is now emitted for
unary operators as well.

gcc/ada/ChangeLog:

* par-ch4.adb (P_Factor): Warn when the operand of a unary operator
doesn't require parentheses.
gcc/ada/par-ch4.adb