]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Remove redundant parentheses inside unary operators (cont.)
authorPiotr Trojanek <trojanek@adacore.com>
Fri, 10 Jan 2025 21:08:36 +0000 (22:08 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Mon, 13 Jan 2025 10:53:00 +0000 (11:53 +0100)
GNAT already emits a style warning when redundant parentheses appear inside
logical and short-circuit operators. A similar warning will be soon emitted for
unary operators as well. This patch removes the redundant parentheses to avoid
build errors.

gcc/ada/ChangeLog:

* libgnat/a-strunb.ads: Remove redundant parentheses inside NOT
operators.

gcc/ada/libgnat/a-strunb.ads

index 5a1427c31a23e874422d1928a8f1fc5bcd9fa765..60d57954e5c98eae960679d02d725b7e7d1cf57c 100644 (file)
@@ -432,8 +432,8 @@ is
                       then J <= Index'Result - 1
                       else J - 1 in Index'Result
                                     .. Length (Source) - Pattern'Length)
-                  then not (Search.Match
-                    (To_String (Source), Pattern, Mapping, J)))),
+                  then not Search.Match
+                    (To_String (Source), Pattern, Mapping, J))),
 
         --  Otherwise, 0 is returned
 
@@ -485,8 +485,8 @@ is
                       then J <= Index'Result - 1
                       else J - 1 in Index'Result
                                     .. Length (Source) - Pattern'Length)
-                  then not (Search.Match
-                    (To_String (Source), Pattern, Mapping, J)))),
+                  then not Search.Match
+                    (To_String (Source), Pattern, Mapping, J))),
 
         --  Otherwise, 0 is returned
 
@@ -591,8 +591,8 @@ is
                       then J in From .. Index'Result - 1
                       else J - 1 in Index'Result
                                     .. From - Pattern'Length)
-                  then not (Search.Match
-                    (To_String (Source), Pattern, Mapping, J)))),
+                  then not Search.Match
+                    (To_String (Source), Pattern, Mapping, J))),
 
         --  Otherwise, 0 is returned
 
@@ -655,8 +655,8 @@ is
                       then J in From .. Index'Result - 1
                       else J - 1 in Index'Result
                                     .. From - Pattern'Length)
-                  then not (Search.Match
-                    (To_String (Source), Pattern, Mapping, J)))),
+                  then not Search.Match
+                    (To_String (Source), Pattern, Mapping, J))),
 
         --  Otherwise, 0 is returned