This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] ada: Do not allow "use" of something which is not a package
- From: Samuel Tardieu <sam at rfc1149 dot net>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 20 Nov 2007 15:56:08 +0100
- Subject: [PATCH] ada: Do not allow "use" of something which is not a package
- Organisation: RFC1149 (see http://www.rfc1149.net/)
Compiled and regtested on i686-pc-linux-gnu.
PR ada/28733
* sem_ch8.adb (Analyze_Use_Package): Do not allow "use" of something
which is not an entity (and hence not a package).
---
gcc/ada/sem_ch8.adb | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb
index 8a5ae00..6b56f0c 100644
--- a/gcc/ada/sem_ch8.adb
+++ b/gcc/ada/sem_ch8.adb
@@ -2169,6 +2169,8 @@ package body Sem_Ch8 is
Use_One_Package (Pack, N);
end if;
end if;
+ else
+ Error_Msg_N ("& is not a package", Pack_Name);
end if;
Next (Pack_Name);
--
1.5.3.5