[Ada] SPARK pointer support extended to local borrowers and observers

Pierre-Marie de Rodat derodat@adacore.com
Wed Jul 3 08:30:00 GMT 2019


SPARK rules allow local borrowers and observers to be declared. During
their lifetime, the access to the borrowed/observed object is
restricted.

There is no impact on compilation.

Tested on x86_64-pc-linux-gnu, committed on trunk

2019-07-03  Yannick Moy  <moy@adacore.com>

gcc/ada/

	* sem_spark.adb: Add support for locally borrowing and observing
	a path.
	(Get_Root_Object): Add parameter Through_Traversal to denote
	when we are interesting in getting to the traversed parameter.
	(Is_Prefix_Or_Almost): New function to support detection of
	illegal access to borrowed or observed paths.
	(Check_Pragma): Add analysis of assertion pragmas.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 46111 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190703/bb73126e/attachment.bin>


More information about the Gcc-patches mailing list