OSDN Git Service

2009-07-22 Robert Dewar <dewar@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 22 Jul 2009 15:21:51 +0000 (15:21 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 22 Jul 2009 15:21:51 +0000 (15:21 +0000)
* g-socket.ads: Minor reformatting

2009-07-22  Gary Dismukes  <dismukes@adacore.com>

* sem_warn.adb (Warn_On_Unreferenced_Entity): Add warning messages that
include the entity kind for following cases of unreferenced entities:
E_Label, E_Discriminant, E_Package, E_Exception, and Formal_Object_Kind.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149940 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/g-socket.ads
gcc/ada/sem_warn.adb

index 2b98844..d2b6375 100644 (file)
@@ -1,3 +1,13 @@
+2009-07-22  Robert Dewar  <dewar@adacore.com>
+
+       * g-socket.ads: Minor reformatting
+
+2009-07-22  Gary Dismukes  <dismukes@adacore.com>
+
+       * sem_warn.adb (Warn_On_Unreferenced_Entity): Add warning messages that
+       include the entity kind for following cases of unreferenced entities:
+       E_Label, E_Discriminant, E_Package, E_Exception, and Formal_Object_Kind.
+
 2009-07-22  Ed Falis  <falis@adacore.com>
 
        * s-vxwext-kernel.adb, s-vxwext-kernel.ads: Replace use of taskStop
index a260d90..a6445e0 100644 (file)
@@ -1146,7 +1146,7 @@ private
       --  Highest socket in set. Last = No_Socket denotes an empty set (which
       --  is the default initial value).
 
-      Set  : aliased Fd_Set;
+      Set : aliased Fd_Set;
       --  Underlying socket set. Note that the contents of this component is
       --  undefined if Last = No_Socket.
    end record;
index 1551acf..e580f47 100644 (file)
@@ -3981,31 +3981,46 @@ package body Sem_Warn is
                   end if;
                end if;
 
-            when E_Out_Parameter    =>
+            when E_Out_Parameter =>
                null;
 
-            when E_Named_Integer    |
-                 E_Named_Real       =>
+            when E_Discriminant =>
+               Error_Msg_N ("?discriminant & is not referenced!", E);
+
+            when E_Named_Integer |
+                 E_Named_Real    =>
                Error_Msg_N ("?named number & is not referenced!", E);
 
+            when Formal_Object_Kind =>
+               Error_Msg_N ("?formal object & is not referenced!", E);
+
             when E_Enumeration_Literal =>
                Error_Msg_N ("?literal & is not referenced!", E);
 
-            when E_Function         =>
+            when E_Function =>
                Error_Msg_N ("?function & is not referenced!", E);
 
-            when E_Procedure         =>
+            when E_Procedure =>
                Error_Msg_N ("?procedure & is not referenced!", E);
 
+            when E_Package =>
+               Error_Msg_N ("?package & is not referenced!", E);
+
+            when E_Exception =>
+               Error_Msg_N ("?exception & is not referenced!", E);
+
+            when E_Label =>
+               Error_Msg_N ("?label & is not referenced!", E);
+
             when E_Generic_Procedure =>
                Error_Msg_N -- CODEFIX
                  ("?generic procedure & is never instantiated!", E);
 
-            when E_Generic_Function  =>
+            when E_Generic_Function =>
                Error_Msg_N -- CODEFIX
                  ("?generic function & is never instantiated!", E);
 
-            when Type_Kind          =>
+            when Type_Kind =>
                Error_Msg_N ("?type & is not referenced!", E);
 
             when others =>