]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Simplify membership test for operators
authorPiotr Trojanek <trojanek@adacore.com>
Thu, 2 Jul 2020 12:05:30 +0000 (14:05 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 19 Oct 2020 09:53:34 +0000 (05:53 -0400)
gcc/ada/

* exp_ch6.adb (May_Fold): Detect all operators, i.e. both binary
and unary ones.

gcc/ada/exp_ch6.adb

index 0ad59e8e0106b2d2e9593fd235c12c49730c3586..a1e545c6997e33fb4176fa857b0eb0c81fb96c78 100644 (file)
@@ -2971,9 +2971,7 @@ package body Exp_Ch6 is
          function May_Fold (N : Node_Id) return Traverse_Result is
          begin
             case Nkind (N) is
-               when N_Binary_Op
-                  | N_Unary_Op
-               =>
+               when N_Op =>
                   return OK;
 
                when N_Expanded_Name