AI12-0194 specifies that language-defined aspects aren't permitted
on entry bodies, which is already effectively enforced by GNAT,
however the error message given when Max_Entry_Queue_Length is applied
to an entry body is potentially confusing, because it says that the
aspect "must apply to a protected entry", and we improve that by
revising it to say "must apply to a protected entry declaration".
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_prag.adb (Analyze_Pragma, Pragma_Max_Entry_Queue_Length):
Refine error message to indicate that the pragma must apply to
an entry declaration, not just an entry.
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -19452,7 +19452,8 @@ package body Sem_Prag is
-- Otherwise the pragma is associated with an illegal construct
else
- Error_Pragma ("pragma % must apply to a protected entry");
+ Error_Pragma
+ ("pragma % must apply to a protected entry declaration");
return;
end if;