projects
/
platform
/
upstream
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6aca8cf
)
[Ada] Check entries for formals of mode IN appearing as global outputs
author
Piotr Trojanek
<trojanek@adacore.com>
Mon, 21 Dec 2020 23:58:21 +0000
(
00:58
+0100)
committer
Pierre-Marie de Rodat
<derodat@adacore.com>
Tue, 4 May 2021 09:17:30 +0000
(
05:17
-0400)
gcc/ada/
* sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context):
Extend check to protected entries.
gcc/ada/sem_prag.adb
patch
|
blob
|
history
diff --git
a/gcc/ada/sem_prag.adb
b/gcc/ada/sem_prag.adb
index
3009421
..
b13894c
100644
(file)
--- a/
gcc/ada/sem_prag.adb
+++ b/
gcc/ada/sem_prag.adb
@@
-2634,7
+2634,7
@@
package body Sem_Prag is
Context := Anonymous_Object (Context);
end if;
- if (Is_Subprogram (Context)
+ if (Is_Subprogram
_Or_Entry
(Context)
or else Ekind (Context) = E_Task_Type
or else Is_Single_Task_Object (Context))
and then
@@
-2659,7
+2659,7
@@
package body Sem_Prag is
("global item & cannot have mode In_Out or Output",
Item, Item_Id);
- if Is_Subprogram (Context) then
+ if Is_Subprogram
_Or_Entry
(Context) then
SPARK_Msg_NE
(Fix_Msg (Subp_Id, "\item already appears as input "
& "of subprogram &"), Item, Context);