diff options
Diffstat (limited to 'gcc/ada/errout.adb')
-rw-r--r-- | gcc/ada/errout.adb | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/gcc/ada/errout.adb b/gcc/ada/errout.adb index 0ff4b4e9e34..204bd3221dc 100644 --- a/gcc/ada/errout.adb +++ b/gcc/ada/errout.adb @@ -277,7 +277,7 @@ package body Errout is Warnings_Detected := Warnings_Detected - 1; if M.Info then - Info_Messages := Info_Messages - 1; + Warning_Info_Messages := Warning_Info_Messages - 1; end if; if M.Warn_Err then @@ -1186,12 +1186,14 @@ package body Errout is -- Bump appropriate statistics counts if Errors.Table (Cur_Msg).Info then - Info_Messages := Info_Messages + 1; -- Could be (usually is) both "info" and "warning" if Errors.Table (Cur_Msg).Warn then + Warning_Info_Messages := Warning_Info_Messages + 1; Warnings_Detected := Warnings_Detected + 1; + else + Report_Info_Messages := Report_Info_Messages + 1; end if; elsif Errors.Table (Cur_Msg).Warn @@ -1420,7 +1422,7 @@ package body Errout is Warnings_Detected := Warnings_Detected - 1; if Errors.Table (E).Info then - Info_Messages := Info_Messages - 1; + Warning_Info_Messages := Warning_Info_Messages - 1; end if; if Errors.Table (E).Warn_Err then @@ -1785,12 +1787,12 @@ package body Errout is Write_Str (" errors"); end if; - if Warnings_Detected - Info_Messages /= 0 then + if Warnings_Detected - Warning_Info_Messages /= 0 then Write_Str (", "); Write_Int (Warnings_Detected); Write_Str (" warning"); - if Warnings_Detected - Info_Messages /= 1 then + if Warnings_Detected - Warning_Info_Messages /= 1 then Write_Char ('s'); end if; @@ -1810,12 +1812,12 @@ package body Errout is end if; end if; - if Info_Messages /= 0 then + if Warning_Info_Messages + Report_Info_Messages /= 0 then Write_Str (", "); - Write_Int (Info_Messages); + Write_Int (Warning_Info_Messages + Report_Info_Messages); Write_Str (" info message"); - if Info_Messages > 1 then + if Warning_Info_Messages + Report_Info_Messages > 1 then Write_Char ('s'); end if; end if; @@ -2119,13 +2121,13 @@ package body Errout is Write_Max_Errors; - -- Even though info messages are a subclass of warnings, they must not - -- be treated as errors when -gnatwe is in effect. + -- Even though Warning_Info_Messages are a subclass of warnings, they + -- must not be treated as errors when -gnatwe is in effect. if Warning_Mode = Treat_As_Error then Total_Errors_Detected := - Total_Errors_Detected + Warnings_Detected - Info_Messages; - Warnings_Detected := Info_Messages; + Total_Errors_Detected + Warnings_Detected - Warning_Info_Messages; + Warnings_Detected := Warning_Info_Messages; end if; end Output_Messages; @@ -2299,7 +2301,7 @@ package body Errout is Warnings_Detected := Warnings_Detected - 1; if Errors.Table (E).Info then - Info_Messages := Info_Messages - 1; + Warning_Info_Messages := Warning_Info_Messages - 1; end if; return True; @@ -2400,7 +2402,7 @@ package body Errout is begin Warnings_Treated_As_Errors := 0; Warnings_Detected := 0; - Info_Messages := 0; + Warning_Info_Messages := 0; Warnings_As_Errors_Count := 0; end Reset_Warnings; |