This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] Ada 2012 legality checks on uses of names of protected procedures


Ada 2012 AI05-0225 clarifies that most uses of the  names of protected
procedures and entries require that the target object (explicit or implicit)
be a variable. This applies to calls, generic actuals, and prefixes of 'Access.
It applies in particular to such uses within the body a protected function.

Example is ACATS Test b950001.

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

2012-10-01  Ed Schonberg  <schonberg@adacore.com>

	* sem_util.ads sem_util.adb (Check_Internal_Protected_Use):
	reject use of protected procedure or entry within the body of
	a protected function of the same protected type, when usage is
	a call, an actual in an instantiation, a or prefix of 'Access.
	* sem_ch8.adb (Analyze_Subprogram_Renaming): Verify that target
	object in renaming of protected procedure is a variable, and
	apply Check_Internal_Protected_Use.
	* sem_res.adb (Analyze_Call, Analyze_Entry_Call): apply
	Check_Internal_Protected_Use rather than on-line code.
	* sem_attr.adb (Analyze_Access_Attribute): Verify that target
	object in accsss to protected procedure is a variable, and apply
	Check_Internal_Protected_Use.

Attachment: difs
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]