From b73adb97ac20a5fbf55d406c28ca27bb499052fc Mon Sep 17 00:00:00 2001 From: charlet Date: Mon, 1 Oct 2012 08:11:09 +0000 Subject: 2012-10-01 Thomas Quinot * make.adb: Minor documentation fix: error messages are sent to stderr, not stdout. 2012-10-01 Hristian Kirtchev * checks.ads, checks.adb (Apply_Parameter_Aliasing_Checks): New routine. (Apply_Parameter_Validity_Checks): New routines. * exp_ch6.adb (Expand_Call): Add aliasing checks to detect overlapping objects. * freeze.adb: Add with and use clauses for Checks and Validsw. (Freeze_Entity): Add checks to detect proper initialization of scalars. * sem_ch4.adb: Add with and use clauses for Checks and Validsw. (Analyze_Call): Add aliasing checks to detect overlapping objects. * sem_ch13.adb: Add with and use clauses for Validsw. (Analyze_Aspect_Specifications): Add checks to detect proper initialization of scalars. * sem_prag.adb (Chain_PPC): Correct the extraction of the subprogram name. * sem_util.adb (Is_Object_Reference): Attribute 'Result now produces an object. * usage.adb (Usage): Add usage lines for validity switches 'l', 'L', 'v' and 'V'. * validsw.adb (Reset_Validity_Check_Options): Include processing for flags Validity_Check_Non_Overlapping_Params and Validity_Check_Valid_Scalars_On_Params. Code reformatting. (Save_Validity_Check_Options): Include processing for flags Validity_Check_Non_Overlapping_Params and Validity_Check_Valid_Scalars_On_Params. (Set_Validity_Check_Options): Add processing for validity switches 'a', 'l', 'L', 'n', 'v' and 'V'. Code reformatting. * validsw.ads: Add new flags Validity_Check_Non_Overlapping_Params and Validity_Check_Valid_Scalars_On_Params along with comments on usage. 2012-10-01 Thomas Quinot * namet.ads, xsnamest.adb, prj-env.adb, sem_warn.adb, errout.ads: Minor reformatting. * prj-part.adb: Add comment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191890 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/checks.ads | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'gcc/ada/checks.ads') diff --git a/gcc/ada/checks.ads b/gcc/ada/checks.ads index 83a67dcb814..850bf84186a 100644 --- a/gcc/ada/checks.ads +++ b/gcc/ada/checks.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2012, 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- -- @@ -154,6 +154,21 @@ package Checks is -- formals, the check is performed only if the corresponding actual is -- constrained, i.e., whether Lhs'Constrained is True. + procedure Apply_Parameter_Aliasing_Checks (Call : Node_Id); + -- Given a subprogram call Call, introduce a check to verify that none of + -- the actual parameters overlap. + + procedure Apply_Parameter_Validity_Checks (Subp : Entity_Id); + -- Given a subprogram Subp, add both a pre and post condition pragmas that + -- verify the validity of formal parameters and function results. + + procedure Apply_Parameter_Validity_Checks + (Subp : Entity_Id; + Prag : Node_Id); + -- Given a subprogram Subp and a pre or post condition pragma Prag, augment + -- the expression of the pragma to verify the validity of qualifying formal + -- parameter and function results. + procedure Apply_Predicate_Check (N : Node_Id; Typ : Entity_Id); -- N is an expression to which a predicate check may need to be applied -- for Typ, if Typ has a predicate function. The check is applied only -- cgit v1.2.1