aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/erroutc.ads
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-02-25 16:48:05 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2014-02-25 16:48:05 +0100
commit0c3985a955aa99d2970234e2eeb622a6aca2c94c (patch)
treec657e55a67e37b4e6235e11e4f02a6b1350e7adc /gcc/ada/erroutc.ads
parent5acb4d2943c9e6a4ceac29f12f969f0fa4d09f34 (diff)
downloadgcc-0c3985a955aa99d2970234e2eeb622a6aca2c94c.zip
gcc-0c3985a955aa99d2970234e2eeb622a6aca2c94c.tar.gz
gcc-0c3985a955aa99d2970234e2eeb622a6aca2c94c.tar.bz2
[multiple changes]
2014-02-25 Robert Dewar <dewar@adacore.com> * sem_ch3.adb (Array_Type_Declaration): Check for case of using type name as index. * lib.ads: Minor reformatting. * einfo.ads: Minor reformatting. 2014-02-25 Doug Rupp <rupp@adacore.com> * sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS use Short_Descriptor(S) as the argument passing mechanism. 2014-02-25 Eric Botcazou <ebotcazou@adacore.com> * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0. 2014-02-25 Robert Dewar <dewar@adacore.com> * atree.ads (Warnings_Treated_As_Errors): New variable. * errout.adb (Error_Msg_Internal): Set Warn_Err flag in error object (Initialize): Initialize Warnings_As_Errors_Count (Write_Error_Summary): Include count of warnings treated as errors. * erroutc.adb (Warning_Treated_As_Error): New function. (Matches): Function moved to outer level of package. * erroutc.ads (Error_Msg_Object): Add Warn_Err flag. (Warning_Treated_As_Error): New function. * gnat_rm.texi: Document pragma Treat_Warning_As_Error. * opt.adb: Add handling of Warnings_As_Errors_Count[_Config]. * opt.ads (Config_Switches_Type): Add entry for Warnings_As_Errors_Count. (Warnings_As_Errors_Count): New variable. (Warnings_As_Errors): New array. * par-prag.adb: Add dummy entry for Warning_As_Error. * sem_prag.adb (Analyze_Pragma): Implement new pragma Warning_As_Error. * snames.ads-tmpl: Add entries for Warning_As_Error pragma. From-SVN: r208145
Diffstat (limited to 'gcc/ada/erroutc.ads')
-rw-r--r--gcc/ada/erroutc.ads13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/ada/erroutc.ads b/gcc/ada/erroutc.ads
index 75bc208..fa4db90 100644
--- a/gcc/ada/erroutc.ads
+++ b/gcc/ada/erroutc.ads
@@ -195,6 +195,10 @@ package Erroutc is
Warn : Boolean;
-- True if warning message (i.e. insertion character ? appeared)
+ Warn_Err : Boolean;
+ -- True if this is a warning message which is to be treated as an error
+ -- as a result of a match with a Warning_As_Error pragma.
+
Warn_Chr : Character;
-- Warning character, valid only if Warn is True
-- ' ' -- ? appeared on its own in message
@@ -375,6 +379,10 @@ package Erroutc is
-- redundant. If so, the message to be deleted and all its continuations
-- are marked with the Deleted flag set to True.
+ function Get_Warning_Tag (Id : Error_Msg_Id) return String;
+ -- Given an error message ID, return tag showing warning message class, or
+ -- the null string if this option is not enabled or this is not a warning.
+
procedure Output_Error_Msgs (E : in out Error_Msg_Id);
-- Output source line, error flag, and text of stored error message and all
-- subsequent messages for the same line and unit. On return E is set to be
@@ -553,6 +561,11 @@ package Erroutc is
-- the corresponding warning string is returned (or the null string if no
-- Warning argument was present in the pragma).
+ function Warning_Treated_As_Error (Msg : String) return Boolean;
+ -- Returns True if the warning message Msg matches any of the strings
+ -- given by Warning_As_Error pragmas, as stored in the Warnings_As_Errors
+ -- table by Set_Warning_As_Error.
+
type Error_Msg_Proc is
access procedure (Msg : String; Flag_Location : Source_Ptr);
procedure Validate_Specific_Warnings (Eproc : Error_Msg_Proc);