diff options
author | Robert Dewar <dewar@adacore.com> | 2009-04-09 10:38:54 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-09 12:38:54 +0200 |
commit | 923e6ff331d3e4c0109529937c5ee589dfbe93b8 (patch) | |
tree | 31ba08971e0c8db8e92b164c64a7ddadbd742ba1 /gcc/ada/errutil.adb | |
parent | beb50807addf7817dafe8c229f9e9d9a09f5b828 (diff) | |
download | gcc-923e6ff331d3e4c0109529937c5ee589dfbe93b8.zip gcc-923e6ff331d3e4c0109529937c5ee589dfbe93b8.tar.gz gcc-923e6ff331d3e4c0109529937c5ee589dfbe93b8.tar.bz2 |
binderr.adb, [...]: New circuitry for handling Maximum_Messages.
2009-04-09 Robert Dewar <dewar@adacore.com>
* binderr.adb, errout.adb, errutil.adb: New circuitry for handling
Maximum_Messages.
* erroutc.adb, erroutc.ads (Warnings_Suppressed): Now tests global
warning status as well.
* opt.ads (Maximum_Messages): New name for Maximum_Errors.
* switch-b.adb, switch-c.adb: Change name Maximum_Errors to
Maximum_Messages.
* bindusg.adb, usage.adb: Update line for -gnatm switch
* gnat_ugn.texi: Update documentation for -gnatmnn compiler switch and
-mnn binder switch.
* sem_ch10.adb: Minor reformatting.
From-SVN: r145822
Diffstat (limited to 'gcc/ada/errutil.adb')
-rw-r--r-- | gcc/ada/errutil.adb | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/gcc/ada/errutil.adb b/gcc/ada/errutil.adb index 222f73b..480a355 100644 --- a/gcc/ada/errutil.adb +++ b/gcc/ada/errutil.adb @@ -548,13 +548,18 @@ package body Errutil is Set_Standard_Output; end if; - if Maximum_Errors /= 0 - and then Total_Errors_Detected + Warnings_Detected = Maximum_Errors - then - Set_Standard_Error; - Write_Str ("fatal error: maximum errors reached"); - Write_Eol; - Set_Standard_Output; + if Maximum_Messages /= 0 then + if Warnings_Detected >= Maximum_Messages then + Set_Standard_Error; + Write_Line ("maximum number of warnings detected"); + Warning_Mode := Suppress; + end if; + + if Total_Errors_Detected >= Maximum_Messages then + Set_Standard_Error; + Write_Line ("fatal error: maximum errors reached"); + Set_Standard_Output; + end if; end if; if Warning_Mode = Treat_As_Error then |