aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch7.adb
diff options
context:
space:
mode:
authorPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2017-11-09 13:09:17 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2017-11-09 13:09:17 +0000
commit65e5747ef72a7e1180727e6bf03fff9ad2dd097e (patch)
treebcbbc4c0bc36e6d55147e0e94896a83f1d2ccccb /gcc/ada/sem_ch7.adb
parentd7a9512ea9131eed5202e670577741f768626244 (diff)
downloadgcc-65e5747ef72a7e1180727e6bf03fff9ad2dd097e.zip
gcc-65e5747ef72a7e1180727e6bf03fff9ad2dd097e.tar.gz
gcc-65e5747ef72a7e1180727e6bf03fff9ad2dd097e.tar.bz2
[multiple changes]
2017-11-09 Ed Schonberg <schonberg@adacore.com> * sem_ch12.adb (Analyze_Generic_Package_Declaration): Handle properly the pragma Compile_Time_Error when it appears in a generic package declaration and uses an expanded name to denote the current unit. 2017-11-09 Jerome Lambourg <lambourg@adacore.com> * libgnarl/s-taprop__qnx.adb: Fix incorrect casing for pthread_self. * tracebak.c: Add support for tracebacks in QNX. 2017-11-09 Eric Botcazou <ebotcazou@adacore.com> * exp_aggr.adb (Aggr_Size_OK): Bump base limit from 50000 to 500000. 2017-11-09 Yannick Moy <moy@adacore.com> * erroutc.adb, set_targ.adb: Remove pragma Annotate for CodePeer justification. 2017-11-09 Joel Brobecker <brobecker@adacore.com> * doc/gnat_ugn/platform_specific_information.rst: Document packages needed on GNU/Linux by GNAT. * gnat_ugn.texi: Regenerate. 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com> * contracts.adb (Analyze_Contracts): Remove the three parameter version. This routine now only analyzes contracts and does not perform any freezing actions. (Analyze_Previous_Contracts): Removed. (Freeze_Previous_Contracts): New routine. * contracts.ads (Analyze_Previous_Contracts): Removed. (Freeze_Previous_Contracts): New routine. * sem_ch3.adb (Analyze_Declarations): Analyze the contract of an enclosing package spec regardless of whether the list denotes the visible or private declarations. Fix the removal of partial state refinements when the context is a package spec. * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Freeze previous contracts. * sem_ch7.adb (Analyze_Package_Body_Helper): Freeze previous contracts. * sem_ch9.adb (Analyze_Entry_Body): Freeze previous contracts. (Analyze_Protected_Body): Freeze previous contracts. (Analyze_Task_Body): Freeze previous contracts. * sem_prag.adb: Comment reformatting. 2017-11-09 Bob Duff <duff@adacore.com> * libgnarl/g-thread.ads, libgnarl/g-thread.adb: (Make_Independent): Export this so users can use it without importing System.Tasking.Utilities. * libgnarl/s-tassta.adb (Vulnerable_Complete_Task): Relax assertion that fails when Make_Independent is called on a user task. * libgnarl/s-taskin.ads (Master_Of_Task): Avoid unusual capitalization style ((style) bad casing of "Master_of_Task"). From-SVN: r254580
Diffstat (limited to 'gcc/ada/sem_ch7.adb')
-rw-r--r--gcc/ada/sem_ch7.adb18
1 files changed, 7 insertions, 11 deletions
diff --git a/gcc/ada/sem_ch7.adb b/gcc/ada/sem_ch7.adb
index dc00cf9..f50b866 100644
--- a/gcc/ada/sem_ch7.adb
+++ b/gcc/ada/sem_ch7.adb
@@ -707,9 +707,9 @@ package body Sem_Ch7 is
end if;
end if;
- -- A [generic] package body "freezes" the contract of the nearest
- -- enclosing package body and all other contracts encountered in the
- -- same declarative part up to and excluding the package body:
+ -- A [generic] package body freezes the contract of the nearest
+ -- enclosing package body and all other contracts encountered in
+ -- the same declarative part up to and excluding the package body:
-- package body Nearest_Enclosing_Package
-- with Refined_State => (State => Constit)
@@ -726,21 +726,21 @@ package body Sem_Ch7 is
-- This ensures that any annotations referenced by the contract of a
-- [generic] subprogram body declared within the current package body
- -- are available. This form of "freezing" is decoupled from the usual
+ -- are available. This form of freezing is decoupled from the usual
-- Freeze_xxx mechanism because it must also work in the context of
-- generics where normal freezing is disabled.
- -- Only bodies coming from source should cause this type of "freezing".
+ -- Only bodies coming from source should cause this type of freezing.
-- Instantiated generic bodies are excluded because their processing is
-- performed in a separate compilation pass which lacks enough semantic
-- information with respect to contract analysis. It is safe to suppress
- -- the "freezing" of contracts in this case because this action already
+ -- the freezing of contracts in this case because this action already
-- took place at the end of the enclosing declarative part.
if Comes_From_Source (N)
and then not Is_Generic_Instance (Spec_Id)
then
- Analyze_Previous_Contracts (N);
+ Freeze_Previous_Contracts (N);
end if;
-- A package body is Ghost when the corresponding spec is Ghost. Set
@@ -876,10 +876,6 @@ package body Sem_Ch7 is
Declare_Inherited_Private_Subprograms (Spec_Id);
end if;
- -- A package body "freezes" the contract of its initial declaration.
- -- This analysis depends on attribute Corresponding_Spec being set. Only
- -- bodies coming from source shuld cause this type of "freezing".
-
if Present (Declarations (N)) then
Analyze_Declarations (Declarations (N));
Inspect_Deferred_Constant_Completion (Declarations (N));