aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/scos.ads
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-08-05 16:18:09 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2011-08-05 16:18:09 +0200
commit44a10091cf20b5f4580c4e7bc33e8162acce97dc (patch)
tree1a26e8ca549a60121572a15150d39632dbafbb1a /gcc/ada/scos.ads
parentbb3c784c7dad97ec1ed3fafead1986d4319a5246 (diff)
downloadgcc-44a10091cf20b5f4580c4e7bc33e8162acce97dc.zip
gcc-44a10091cf20b5f4580c4e7bc33e8162acce97dc.tar.gz
gcc-44a10091cf20b5f4580c4e7bc33e8162acce97dc.tar.bz2
[multiple changes]
2011-08-05 Javier Miranda <miranda@adacore.com> * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support for renamings of predefined primitives. (In_Predef_Prims_DT): New subprogram. 2011-08-05 Ed Schonberg <schonberg@adacore.com> * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a possible interpretation of name is a reference type, add an interpretation that is the designated type of the reference discriminant of that type. * sem_res.adb (resolve): If the interpretation imposed by context is an implicit dereference, rewrite the node as the deference of the reference discriminant. * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type, Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from parent type or base type. * sem_ch4.adb (Process_Indexed_Component, Process_Overloaded_Indexed_Component, Indicate_Name_And_Type, Analyze_Overloaded_Selected_Component, Analyze_Selected_Component): Check for implicit dereference. (List_Operand_Interps): Indicate when an implicit dereference is ambiguous. * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference. 2011-08-05 Thomas Quinot <quinot@adacore.com> * scos.ads: Update documentation of SCO table. Pragma statements can now be marked as disabled (using 'p' instead of 'P' as the statement kind). * par_sco.ads, par_sco.adb: Implement the above change. (Process_Decisions_Defer): Generate a P decision for the first parameter of a dyadic pragma Debug. * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if necessary. * put_scos.adb: Code simplification based on above change. From-SVN: r177442
Diffstat (limited to 'gcc/ada/scos.ads')
-rw-r--r--gcc/ada/scos.ads30
1 files changed, 16 insertions, 14 deletions
diff --git a/gcc/ada/scos.ads b/gcc/ada/scos.ads
index 8799fbc..bdf5610 100644
--- a/gcc/ada/scos.ads
+++ b/gcc/ada/scos.ads
@@ -152,6 +152,7 @@ package SCOs is
-- E EXIT statement
-- F FOR loop statement (from FOR through end of iteration scheme)
-- I IF statement (from IF through end of condition)
+ -- p disabled PRAGMA
-- P PRAGMA
-- R extended RETURN statement
-- W WHILE loop statement (from WHILE through end of condition)
@@ -194,12 +195,12 @@ package SCOs is
-- Decisions are either simple or complex. A simple decision is a top
-- level boolean expression that has only one condition and that occurs
-- in the context of a control structure in the source program, including
- -- WHILE, IF, EXIT WHEN, or in an Assert, Check, Pre_Condition or
- -- Post_Condition pragma. For pragmas, decision SCOs are generated only
- -- if the corresponding pragma is enabled. Note that a top level boolean
- -- expression with only one condition that occurs in any other context,
- -- for example as right hand side of an assignment, is not considered to
- -- be a (simple) decision.
+ -- WHILE, IF, EXIT WHEN, or immediately within an Assert, Check,
+ -- Pre_Condition or Post_Condition pragma, or as the first argument of a
+ -- dyadic pragma Debug. Note that a top level boolean expression with
+ -- only one condition that occurs in any other context, for example as
+ -- right hand side of an assignment, is not considered to be a (simple)
+ -- decision.
-- A complex decision is a top level boolean expression that has more
-- than one condition. A complex decision may occur in any boolean
@@ -336,6 +337,10 @@ package SCOs is
-- entries appear in one logical statement sequence, continuation lines
-- are marked by Cc and appear immediately after the CC line.
+ -- Disabled pragmas
+
+ -- No SCO is generated for disabled pragmas.
+
---------------------------------------------------------------------
-- Internal table used to store Source Coverage Obligations (SCOs) --
---------------------------------------------------------------------
@@ -392,7 +397,7 @@ package SCOs is
-- Decision (PRAGMA)
-- C1 = 'P'
- -- C2 = 'e'/'d' for enabled/disabled
+ -- C2 = ' '
-- From = PRAGMA token
-- To = No_Source_Location
-- Last = unused
@@ -400,14 +405,11 @@ package SCOs is
-- Note: when the parse tree is first scanned, we unconditionally build
-- a pragma decision entry for any decision in a pragma (here as always
-- in SCO contexts, the only pragmas with decisions are Assert, Check,
- -- Precondition and Postcondition), and we mark the pragma as disabled.
- --
- -- During analysis, if the pragma is enabled, Set_SCO_Pragma_Enabled to
- -- mark the SCO decision table entry as enabled (C2 set to 'e'). Then
- -- in Put_SCOs, we only output the decision for a pragma if C2 is 'e'.
+ -- dyadic Debug, Precondition and Postcondition).
--
- -- When we read SCOs from an ALI file (in Get_SCOs), we always set C2
- -- to 'e', since clearly the pragma is enabled if it was written out.
+ -- During analysis, if the pragma is enabled, Set_SCO_Pragma_Enabled
+ -- marks the statement SCO table entry as enaabled (C1 changed from 'p'
+ -- to 'P') to cause the entry to be emitted in Put_SCOs.
-- Decision (Expression)
-- C1 = 'X'