diff options
author | Robert Dewar <dewar@adacore.com> | 2014-02-25 15:52:52 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-02-25 16:52:52 +0100 |
commit | e7ba564fca6cb914e202ed4807142b7008bcde0c (patch) | |
tree | 12a5a685674be8dfe39778e861e961ac374d255c /gcc/ada/exp_ch9.adb | |
parent | 2886a49530f3c37c1265224a4f5a63ab91a3bd19 (diff) | |
download | gcc-e7ba564fca6cb914e202ed4807142b7008bcde0c.zip gcc-e7ba564fca6cb914e202ed4807142b7008bcde0c.tar.gz gcc-e7ba564fca6cb914e202ed4807142b7008bcde0c.tar.bz2 |
rtsfind.adb (Is_RTE): Protect against entity with no scope field (previously this call blew up on the...
2014-02-25 Robert Dewar <dewar@adacore.com>
* rtsfind.adb (Is_RTE): Protect against entity with no scope
field (previously this call blew up on the Standard entity).
* sem_attr.adb (Analyze_Attribute, case Access): Remove
test for No_Abort_Statements, this is now handled in
Set_Entity_With_Checks.
* exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
* sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
Set_Entity_With_Checks.
(Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
Add checks for No_Abort_Statements.
2014-02-25 Robert Dewar <dewar@adacore.com>
* exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
Check_Restriction is OK.
From-SVN: r208148
Diffstat (limited to 'gcc/ada/exp_ch9.adb')
-rw-r--r-- | gcc/ada/exp_ch9.adb | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb index e1b0267..0103cfa 100644 --- a/gcc/ada/exp_ch9.adb +++ b/gcc/ada/exp_ch9.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2013, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2014, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -6330,11 +6330,16 @@ package body Exp_Ch9 is end if; end if; - -- It is not a boolean variable or literal, so check the restriction - -- and otherwise emit warning if barrier contains global entities and - -- is thus potentially unsynchronized. + -- It is not a boolean variable or literal, so check the restriction. + -- Note that it is safe to be calling Check_Restriction from here, even + -- though this is part of the expander, since Expand_Entry_Barrier is + -- called from Sem_Ch9 even in -gnatc mode. Check_Restriction (Simple_Barriers, Cond); + + -- Emit warning if barrier contains global entities and is thus + -- potentially unsynchronized. + Check_Unprotected_Barrier (Cond); end Expand_Entry_Barrier; @@ -9079,6 +9084,12 @@ package body Exp_Ch9 is -- warning on a protected type declaration. if not Comes_From_Source (Prot_Typ) then + + -- It's ok to be checking this restriction at expansion + -- time, because this is only for the restricted profile, + -- which is not subject to strict RM conformance, so it + -- is OK to miss this check in -gnatc mode. + Check_Restriction (No_Implicit_Heap_Allocations, Priv); elsif Restriction_Active (No_Implicit_Heap_Allocations) then |