[Ada] Sem_Ch4: minor code cleanup
authorJavier Miranda <miranda@adacore.com>
Mon, 16 Jul 2018 14:10:13 +0000 (14:10 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 16 Jul 2018 14:10:13 +0000 (14:10 +0000)
2018-07-16  Javier Miranda  <miranda@adacore.com>

gcc/ada/

* sem_ch4.adb (Analyze_Membership_Op): Code cleanup.

From-SVN: r262704

gcc/ada/ChangeLog
gcc/ada/sem_ch4.adb

index 5e2ae1f23e0565f65c18c3b48ee8bd6566ac737b..f692dd8724fe40823d7265cd419638c725b48356 100644 (file)
@@ -1,3 +1,7 @@
+2018-07-16  Javier Miranda  <miranda@adacore.com>
+
+       * sem_ch4.adb (Analyze_Membership_Op): Code cleanup.
+
 2018-07-16  Javier Miranda  <miranda@adacore.com>
 
        * exp_attr.adb (Expand_N_Attribute_Reference ['Count]): Do not
index 1b8d8cb19688ce6a2e60a6343c35577c420de910..def317d916c75ebf5abf904025387c5e98beaa6e 100644 (file)
@@ -3031,15 +3031,9 @@ package body Sem_Ch4 is
       Analyze_Expression (L);
 
       if No (R) then
-         if Ada_Version >= Ada_2012 then
-            Analyze_Set_Membership;
-            Check_Function_Writable_Actuals (N);
-         else
-            Error_Msg_N
-              ("multiple choices in membership tests only allowed in Ada 2012",
-               N);
-         end if;
-
+         pragma Assert (Ada_Version >= Ada_2012);
+         Analyze_Set_Membership;
+         Check_Function_Writable_Actuals (N);
          return;
       end if;