diff options
author | Steve Baird <baird@adacore.com> | 2022-08-12 17:04:38 -0700 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2022-09-06 09:14:23 +0200 |
commit | 71747dda9d491b8b28df20eaed84c71ca75f51d0 (patch) | |
tree | 1312ebe331a83136add4714f4cd2f6c4a2a3c1ec /gcc/ada/gcc-interface | |
parent | fc737a6c2001e303a3509df7b1125b8e3d7ea651 (diff) | |
download | gcc-71747dda9d491b8b28df20eaed84c71ca75f51d0.zip gcc-71747dda9d491b8b28df20eaed84c71ca75f51d0.tar.gz gcc-71747dda9d491b8b28df20eaed84c71ca75f51d0.tar.bz2 |
[Ada] Enable lock free protected implementation by default
In the past, the Lock_Free aspect of a protected type (including an
anonymous type) defaulted to False. In the case where an explicit
"Lock_Free => True" aspect specification would be legal, the aspect now
defaults to True (which means that a lock-free implementation is used to
implement the type's protected operations); this is like the previous
behavior of the compiler with the -gnatd9 switch specified. Support for
the Lock_Free attribute (which should not be confused with the Lock_Free
aspect) is removed.
gcc/ada/
* debug.adb: Remove comment regarding the -gnatd9 switch.
* doc/gnat_rm/implementation_defined_attributes.rst: Remove all
mention of the Lock_Free attribute.
* gnat_rm.texi, gnat_ugn.texi: Regenerate.
* exp_attr.adb, sem_attr.adb: Remove all mention of the former
Attribute_Lock_Free enumeration element of the Attribute_Id type.
* sem_ch9.adb
(Allows_Lock_Free_Implementation): Remove the Debug_Flag_9 test.
Return False in the case of a protected function whose result type
requires use of the secondary stack.
(Satisfies_Lock_Free_Requirements): This functions checks for
certain constructs and returns False if one is found. In the case
of a protected function, there is no need to check to see if the
protected object is being modified. So it is ok to omit *some*
checks in the case of a protected function. But other checks which
are required (e.g., the test for a reference to a variable that is
not part of the protected object) were being incorrectly omitted.
This could result in accepting "Lock_Free => True" aspect
specifications that should be rejected.
* snames.adb-tmpl: Name_Lock_Free no longer requires special
treatment in Get_Pragma_Id or Is_Pragma_Name (because it is no
longer an attribute name).
* snames.ads-tmpl: Move the declaration of Name_Lock_Free to
reflect the fact that it is no longer the name of an attribute.
Delete Attribute_Lock_Free from the Attribute_Id enumeration type.
Diffstat (limited to 'gcc/ada/gcc-interface')
0 files changed, 0 insertions, 0 deletions