diff options
author | pmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4> | 2018-01-11 08:55:52 +0000 |
---|---|---|
committer | pmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4> | 2018-01-11 08:55:52 +0000 |
commit | 69a227e49b0a5b3e80cf44b0232496b9419a9fb0 (patch) | |
tree | ed4741920d80ba135a51595bea4de21ce8080c44 /gcc/ada/ChangeLog | |
parent | 612930c18db496480bc9c1346ea14b7b446e75c2 (diff) |
[Ada] Detection of illegal constituent assignments
This patch modifies the analysis of assignment statements to detect an illegal
attempt to alter the value of single protected type Part_Of constituent when
inside a protected function.
2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
gcc/ada/
* sem_ch5.adb (Analyze_Assignment): Assignments to variables that act
as Part_Of consituents of single protected types are illegal when they
take place inside a protected function.
(Diagnose_Non_Variable_Lhs): Use Within_Function to check for an
enclosing function.
(Is_Protected_Part_Of_Constituent): New routine.
(Within_Function): New routine.
gcc/testsuite/
* gnat.dg/protected_func.adb, gnat.dg/protected_func.ads: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@256520 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/ChangeLog')
-rw-r--r-- | gcc/ada/ChangeLog | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 415a42c3efa..cd66210109b 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,13 @@ +2018-01-11 Hristian Kirtchev <kirtchev@adacore.com> + + * sem_ch5.adb (Analyze_Assignment): Assignments to variables that act + as Part_Of consituents of single protected types are illegal when they + take place inside a protected function. + (Diagnose_Non_Variable_Lhs): Use Within_Function to check for an + enclosing function. + (Is_Protected_Part_Of_Constituent): New routine. + (Within_Function): New routine. + 2018-01-11 Arnaud Charlet <charlet@adacore.com> Bump copyright notices to 2018. |