aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/errout.ads
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-02-20 14:42:58 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2014-02-20 14:42:58 +0100
commit0c7e0c3254341de04e877a58c44aba23203cf04a (patch)
tree06f0b8e4cb0b54d598438a7815c9bfa918bedb20 /gcc/ada/errout.ads
parente449429213d601e60b19d1d5db6dd761df98c2c5 (diff)
downloadgcc-0c7e0c3254341de04e877a58c44aba23203cf04a.zip
gcc-0c7e0c3254341de04e877a58c44aba23203cf04a.tar.gz
gcc-0c7e0c3254341de04e877a58c44aba23203cf04a.tar.bz2
[multiple changes]
2014-02-20 Ed Schonberg <schonberg@adacore.com> * sem_ch5.adb (Analyze_Iterator_Specification): Initialize properly the cursor type for subsequent volatile testing in SPARK mode, when domain is a formal container with an Iterabe aspect. 2014-02-20 Robert Dewar <dewar@adacore.com> * errout.adb (Set_Warnings_Mode_Off): Add Reason argument. (Set_Specific_Warning_Off): Add Reason argument. * errout.ads (Set_Warnings_Mode_Off): Add Reason argument. (Set_Specific_Warning_Off): Add Reason argument. * erroutc.adb (Warnings_Entry): Add Reason field (Specific_Warning_Entry): Add Reason field. (Warnings_Suppressed): return String_Id for Reason. (Warning_Specifically_Suppressed): return String_Id for Reason. * erroutc.ads (Warnings_Entry): Add Reason field. (Specific_Warning_Entry): Add Reason field. (Set_Specific_Warning_Off): Add Reason argument. (Set_Warnings_Mode_Off): Add Reason argument. (Warnings_Suppressed): return String_Id for Reason. (Warning_Specifically_Suppressed): return String_Id for Reason. * errutil.adb (Warnings_Suppressed): returns String_Id for Reason (Warning_Specifically_Suppressed): returns String_Id for Reason * gnat_rm.texi: Document that Warning parameter is string literal or a concatenation of string literals. * par-prag.adb: New handling for Reason argument. * sem_prag.adb (Analyze_Pragma, case Warning): New handling for Reason argument. * sem_util.ads, sem_util.adb (Get_Reason_String): New procedure. * sem_warn.ads (Warnings_Off_Entry): Add reason field. * stringt.adb: Set Null_String_Id. * stringt.ads (Null_String_Id): New constant. From-SVN: r207943
Diffstat (limited to 'gcc/ada/errout.ads')
-rw-r--r--gcc/ada/errout.ads19
1 files changed, 13 insertions, 6 deletions
diff --git a/gcc/ada/errout.ads b/gcc/ada/errout.ads
index 8e5874b..84d7490 100644
--- a/gcc/ada/errout.ads
+++ b/gcc/ada/errout.ads
@@ -806,10 +806,11 @@ package Errout is
-- ignored. A call with To=False restores the default treatment in which
-- error calls are treated as usual (and as described in this spec).
- procedure Set_Warnings_Mode_Off (Loc : Source_Ptr)
+ procedure Set_Warnings_Mode_Off (Loc : Source_Ptr; Reason : String_Id)
renames Erroutc.Set_Warnings_Mode_Off;
-- Called in response to a pragma Warnings (Off) to record the source
- -- location from which warnings are to be turned off.
+ -- location from which warnings are to be turned off. Reason is the
+ -- Reason from the pragma, or the null string if none is given.
procedure Set_Warnings_Mode_On (Loc : Source_Ptr)
renames Erroutc.Set_Warnings_Mode_On;
@@ -819,14 +820,20 @@ package Errout is
procedure Set_Specific_Warning_Off
(Loc : Source_Ptr;
Msg : String;
+ Reason : String_Id;
Config : Boolean;
Used : Boolean := False)
renames Erroutc.Set_Specific_Warning_Off;
-- This is called in response to the two argument form of pragma Warnings
- -- where the first argument is OFF, and the second argument is the prefix
- -- of a specific warning to be suppressed. The first argument is the start
- -- of the suppression range, and the second argument is the string from
- -- the pragma.
+ -- where the first argument is OFF, and the second argument is a string
+ -- which identifies a specific warning to be suppressed. The first argument
+ -- is the start of the suppression range, and the second argument is the
+ -- string from the pragma. Loc is the location of the pragma (which is the
+ -- start of the range to suppress). Reason is the reason string from the
+ -- pragma, or the null string if no reason is given. Config is True for the
+ -- configuration pragma case (where there is no requirement for a matching
+ -- OFF pragma). Used is set True to disable the check that the warning
+ -- actually has has the effect of suppressing a warning.
procedure Set_Specific_Warning_On
(Loc : Source_Ptr;