diff options
author | Yannick Moy <moy@adacore.com> | 2011-08-04 13:35:20 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-04 15:35:20 +0200 |
commit | dac3bede918b07ddb13d2efae1fbda9f4d81468f (patch) | |
tree | 3271b6f6746528c923b82c8e00d9fe866622065a /gcc/ada/aspects.adb | |
parent | 6a2e5d0f3d52360a6a0f036a19cedffbd4b8bd42 (diff) | |
download | gcc-dac3bede918b07ddb13d2efae1fbda9f4d81468f.zip gcc-dac3bede918b07ddb13d2efae1fbda9f4d81468f.tar.gz gcc-dac3bede918b07ddb13d2efae1fbda9f4d81468f.tar.bz2 |
gnat_rm.texi: Document new pragma and aspect.
2011-08-04 Yannick Moy <moy@adacore.com>
* gnat_rm.texi: Document new pragma and aspect.
* aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
(No_Duplicates_Allowed): new constant array defining whether duplicates
aspects of each kind can appear on the same declaration.
* einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
field, which points to a node holding the previous Spec_PPC_List.
* exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
through the indirection with Contract.
* exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
* par-prag.adb (Prag): do nothing on Test_Case pragma
* sem.adb (Analyze): abort on N_Contract, on which Analyze should not
be called directly.
* sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
component Ensures of Test_Case.
* sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
(Analyze_Generic_Subprogram_Declaration,
Analyze_Subprogram_Instantiation,
Analyze_Abstract_Subprogram_Declaration,
Analyze_Subprogram_Body_Helper,
Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
insert contract in subprogram node at point of definition
* sem_ch13.adb
(Aspect_Loop): do not raise error on duplicate Test_Case aspect
(Analyze_Aspect_Specifications): analyze Test_Case aspect and create
corresponding pragma
(Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
* sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
similar to the analysis of pre/post
(Derive_Subprogram): insert contract in subprogram node at point of
derivation.
* sem_prag.adb, sem_prag.ads
(Check_Arg_Is_String_Literal, Check_Identifier):
new checking procedures to be called in treatment of pragmas
(Check_Test_Case): new procedure to check that a Test_Case aspect or
pragma is well-formed. This does not check currently that 'Result is
used only in the Ensures component of a Test_Case.
(Analyze_Pragma): add case for Test_Case
(Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
components of a Test_Case.
(Preanalyze_TC_Args): new procedure to preanalyze the boolean
expressions in the 3rd (and 4th if present) arguments of a Test_Case
pragma, treated as spec expressions.
(Sig_Flags): add value -1 for Test_Case.
* sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
Get_Requires_From_Test_Case_Pragma): getters for both expression
components of a Test_Case.
* sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
indirection between an entry or [generic] subprogram entity and its
pre/post + test-cases.
(Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
get/set for fields of an N_Contract node.
* snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
names and pragma for Test_Case.
* sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
From-SVN: r177384
Diffstat (limited to 'gcc/ada/aspects.adb')
-rwxr-xr-x | gcc/ada/aspects.adb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ada/aspects.adb b/gcc/ada/aspects.adb index aafe74b..7495a2d 100755 --- a/gcc/ada/aspects.adb +++ b/gcc/ada/aspects.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2010, Free Software Foundation, Inc. -- +-- Copyright (C) 2010-2011, 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- -- @@ -222,6 +222,7 @@ package body Aspects is Aspect_Stream_Size => Aspect_Stream_Size, Aspect_Suppress => Aspect_Suppress, Aspect_Suppress_Debug_Info => Aspect_Suppress_Debug_Info, + Aspect_Test_Case => Aspect_Test_Case, Aspect_Type_Invariant => Aspect_Invariant, Aspect_Unchecked_Union => Aspect_Unchecked_Union, Aspect_Universal_Aliasing => Aspect_Universal_Aliasing, |