freeze.adb (Freeze_Array_Type): Remove always true test and unreachable 'else' arm.
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 6 Jan 2015 10:35:08 +0000 (10:35 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Tue, 6 Jan 2015 10:35:08 +0000 (11:35 +0100)
2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>

* freeze.adb (Freeze_Array_Type) <Complain_CS>: Remove always
true test and unreachable 'else' arm.

From-SVN: r219254

gcc/ada/ChangeLog
gcc/ada/freeze.adb

index 861d0c87f45a878733055c8634ccc1abb4f39eb0..6e363c35f19a16a2761be24ae802ca7ab8094ba5 100644 (file)
@@ -1,3 +1,8 @@
+2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * freeze.adb (Freeze_Array_Type) <Complain_CS>: Remove always
+       true test and unreachable 'else' arm.
+
 2015-01-06  Vincent Celier  <celier@adacore.com>
 
        * prj-conf.adb (Check_Target): Improve error message when
index a2fcddc645a7ff54d188f54a3d2f011fb5c86ba1..c07bb563c52502f46efd53cc8818933ed97c0a74 100644 (file)
@@ -2450,27 +2450,18 @@ package body Freeze is
                           Get_Attribute_Definition_Clause
                             (FS, Attribute_Component_Size);
 
-                        if Known_Static_Esize (Ctyp) then
-                           Error_Msg_N
-                             ("incorrect component size for "
-                              & T & " components", Clause);
-                           Error_Msg_Uint_1 := Esize (Ctyp);
-                           Error_Msg_N
-                             ("\only allowed value is^", Clause);
-
-                        else
-                           Error_Msg_N
-                             ("component size cannot be given for "
-                              & T & " components", Clause);
-                        end if;
+                        Error_Msg_N
+                          ("incorrect component size for "
+                           & T & " components", Clause);
+                        Error_Msg_Uint_1 := Esize (Ctyp);
+                        Error_Msg_N
+                          ("\only allowed value is^", Clause);
 
                      else
                         Error_Msg_N
                           ("cannot pack " & T & " components",
                            Get_Rep_Pragma (FS, Name_Pack));
                      end if;
-
-                     return;
                   end Complain_CS;
 
                   --  Start of processing for Alias_Atomic_Check