sem_ch9.adb (Allows_Lock_Free_Implementation): Restrict implicit dereferences of access values.
2012-07-30 Vincent Pucci <pucci@adacore.com> * sem_ch9.adb (Allows_Lock_Free_Implementation): Restrict implicit dereferences of access values. From-SVN: r189975
This commit is contained in:
parent
5aea1e76a8
commit
b5059fa089
2 changed files with 12 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
|||
2012-07-30 Vincent Pucci <pucci@adacore.com>
|
||||
|
||||
* sem_ch9.adb (Allows_Lock_Free_Implementation): Restrict implicit
|
||||
dereferences of access values.
|
||||
|
||||
2012-07-27 Iain Sandoe <iain@codesourcery.com>
|
||||
|
||||
* system-darwin-ppc64.ads: Add Support_Atomic_Primitives, set to True.
|
||||
|
|
|
@ -411,12 +411,15 @@ package body Sem_Ch9 is
|
|||
|
||||
return Abandon;
|
||||
|
||||
-- Explicit dereferences restricted (i.e. dereferences of
|
||||
-- access values).
|
||||
-- Dereferences of access values restricted
|
||||
|
||||
elsif Kind = N_Explicit_Dereference then
|
||||
elsif Kind = N_Explicit_Dereference
|
||||
or else (Kind = N_Selected_Component
|
||||
and then Is_Access_Type (Etype (Prefix (N))))
|
||||
then
|
||||
if Lock_Free_Given then
|
||||
Error_Msg_N ("explicit dereference not allowed", N);
|
||||
Error_Msg_N ("dereference of access value " &
|
||||
"not allowed", N);
|
||||
return Skip;
|
||||
end if;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue