aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/errutil.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2017-04-28 15:47:23 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2017-04-28 15:47:23 +0200
commit66c19cd4fd18119948678367c10f57a5331a10e4 (patch)
tree8fd431e0dfdeda4e3601e79cea6a62d6190bf620 /gcc/ada/errutil.adb
parent7a95dfa774e27a837fbdce29186511de5bb3936e (diff)
downloadgcc-66c19cd4fd18119948678367c10f57a5331a10e4.zip
gcc-66c19cd4fd18119948678367c10f57a5331a10e4.tar.gz
gcc-66c19cd4fd18119948678367c10f57a5331a10e4.tar.bz2
[multiple changes]
2017-04-28 Javier Miranda <miranda@adacore.com> * atree.ads (Info_Messages): Removed. (Warning_Info_Messages): New counter. (Report_Info_Messages): New counter. * err_vars.ads Update documentation. * errout.adb (Delete_Warning_And_Continuations): Update Info_Message occurrences. (Error_Msg_Internal): Update Info_Message occurrences. (Delete_Warning): Update Info_Message occurrences. (Write_Error_Summary): Update Info_Message occurrences. (Output_Messages): Update Info_Message occurrences. (To_Be_Removed): Update Info_Message occurrences. (Reset_Warnings): Update Info_Message occurrences. * errutil.adb (Error_Msg): Update Info_Message occurrences. (Finalize): Update Info_Message occurrences. (Initialize): Update Info_Message occurrences. * erroutc.adb (Delete_Msg): Update Info_Message occurrences. (Compilation_Errors): Update Info_Message_Occurences. 2017-04-28 Eric Botcazou <ebotcazou@adacore.com> * exp_ch3.adb (Build_Init_Statements): Likewise on Nam. * freeze.adb (Check_Component_Storage_Order): And on Comp_Byte_Aligned. * sem_aggr.adb (Resolve_Record_Aggregate): Initialize Box_Node. * sem_attr.adb (Loop_Entry): Initialize Encl_Loop. * sem_ch12.adb (Build_Operator_Wrapper): Add pragma Warnings on Expr. * sem_ch13.adb (Validate_Address_Clauses): Initialize Y_Alignment and Y_Size. * sem_eval.adb (Why_Not_Static): Initialize Typ. * sem_prag.adb (Analyze_Pragma): Add pragma Warnings on Str. From-SVN: r247390
Diffstat (limited to 'gcc/ada/errutil.adb')
-rw-r--r--gcc/ada/errutil.adb23
1 files changed, 13 insertions, 10 deletions
diff --git a/gcc/ada/errutil.adb b/gcc/ada/errutil.adb
index 057ce76..498833a 100644
--- a/gcc/ada/errutil.adb
+++ b/gcc/ada/errutil.adb
@@ -305,12 +305,14 @@ package body Errutil 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
@@ -548,19 +550,19 @@ package body Errutil 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 - Info_Messages);
+ Write_Int (Warnings_Detected - Warning_Info_Messages);
Write_Str (" warning");
- if Warnings_Detected - Info_Messages /= 1 then
+ if Warnings_Detected - Warning_Info_Messages /= 1 then
Write_Char ('s');
end if;
if Warning_Mode = Treat_As_Error then
Write_Str (" (treated as error");
- if Warnings_Detected - Info_Messages /= 1 then
+ if Warnings_Detected - Warning_Info_Messages /= 1 then
Write_Char ('s');
end if;
@@ -586,13 +588,13 @@ package body Errutil is
end if;
end if;
- -- 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;
-- Prevent displaying the same messages again in the future
@@ -612,7 +614,8 @@ package body Errutil is
Serious_Errors_Detected := 0;
Total_Errors_Detected := 0;
Warnings_Detected := 0;
- Info_Messages := 0;
+ Warning_Info_Messages := 0;
+ Report_Info_Messages := 0;
Cur_Msg := No_Error_Msg;
-- Initialize warnings table, if all warnings are suppressed, supply