diff options
Diffstat (limited to 'gcc/ada/sem_prag.adb')
-rw-r--r-- | gcc/ada/sem_prag.adb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index d699fd4eb9a..1e4bbe4b26c 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -4672,6 +4672,15 @@ package body Sem_Prag is then null; end if; + + -- Inline is a program unit pragma (RM 10.1.5) and cannot + -- appear in a formal part to apply to a formal subprogram. + + elsif Nkind (Decl) in N_Formal_Subprogram_Declaration + and then List_Containing (Decl) = List_Containing (N) + then + Error_Msg_N + ("Inline cannot apply to a formal subprogram", N); end if; end if; |