]> gcc.gnu.org Git - gcc.git/commit - gcc/ada/sem_util.adb
ada: Allow No_Caching on volatile types
authorYannick Moy <moy@adacore.com>
Fri, 25 Nov 2022 16:16:06 +0000 (17:16 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 6 Dec 2022 13:58:49 +0000 (14:58 +0100)
commit400d9fc1f04336118c3200e2af14a620e7ea1d95
treee5b73af6d4bb71aa52f994f402185f086e2df957
parent7dc44f280e7d1126b4d05e79c53b40df1afe334a
ada: Allow No_Caching on volatile types

SPARK RM now allow the property No_Caching on volatile types, to
indicate that they should be considered volatile for compilation, but
not by GNATprove's analysis.

gcc/ada/

* contracts.adb (Add_Contract_Item): Allow No_Caching on types.
(Check_Type_Or_Object_External_Properties): Check No_Caching.
Check that non-effectively volatile types does not contain an
effectively volatile component (instead of just a volatile
component).
(Analyze_Object_Contract): Remove shared checking of No_Caching.
* sem_prag.adb (Analyze_External_Property_In_Decl_Part): Adapt checking
of No_Caching for types.
(Analyze_Pragma): Allow No_Caching on types.
* sem_util.adb (Has_Effectively_Volatile_Component): New query function.
(Is_Effectively_Volatile): Type with Volatile and No_Caching is not
effectively volatile.
(No_Caching_Enabled): Remove assertion to apply to all entities.
* sem_util.ads: Same.
gcc/ada/contracts.adb
gcc/ada/sem_prag.adb
gcc/ada/sem_util.adb
gcc/ada/sem_util.ads
This page took 0.057769 seconds and 5 git commands to generate.