OSDN Git Service

2005-03-29 Robert Dewar <dewar@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 29 Mar 2005 16:17:25 +0000 (16:17 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 29 Mar 2005 16:17:25 +0000 (16:17 +0000)
* par-ch12.adb (P_Generic): Give better msg for illegal private generic
child.

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

gcc/ada/par-ch12.adb

index 56ec4a1..ae6b6cd 100644 (file)
@@ -153,7 +153,11 @@ package body Ch12 is
 
       Decl_Loop : loop
          P_Pragmas_Opt (Decls);
-         Ignore (Tok_Private);
+
+         if Token = Tok_Private then
+            Error_Msg_S ("generic private child packages not permitted");
+            Scan; -- past PRIVATE
+         end if;
 
          if Token = Tok_Use then
             Append (P_Use_Clause, Decls);