summaryrefslogtreecommitdiff
path: root/gcc/ada/par-ch12.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/par-ch12.adb')
-rw-r--r--gcc/ada/par-ch12.adb6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ada/par-ch12.adb b/gcc/ada/par-ch12.adb
index 56ec4a15f39..ae6b6cd48d5 100644
--- a/gcc/ada/par-ch12.adb
+++ b/gcc/ada/par-ch12.adb
@@ -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);