summaryrefslogtreecommitdiff
path: root/gcc/ada/errout.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-01 13:26:17 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-01 13:26:17 +0000
commit7e246b24501096f768a72aa6d6f159cf1a0e8e63 (patch)
treede670a27c04cef0d1bd19abfe5073ab8db9ccbfb /gcc/ada/errout.adb
parentec0d407609bc0a519d7133a8d73ec05c0b2647ec (diff)
downloadgcc-7e246b24501096f768a72aa6d6f159cf1a0e8e63.tar.gz
2014-08-01 Ed Schonberg <schonberg@adacore.com>
* sem_ch5.adb (Analyze_Loop_Parameter_Specification): a) An attribute_reference to Loop_Entry denotes an iterator specification: its prefix is an object, as is the case for 'Old. b) If the domain of iteration is an expression whose type has the Iterable aspect defined, this is an iterator specification. 2014-08-01 Robert Dewar <dewar@adacore.com> * gnatcmd.adb: Minor reformatting. 2014-08-01 Robert Dewar <dewar@adacore.com> * atree.ads (Info_Messages): New counter. * err_vars.ads: Minor comment update. * errout.adb (Delete_Warning_And_Continuations): Deal with new Info_Messages counter. (Error_Msg_Internal): ditto. (Delete_Warning): ditto. (Initialize): ditto. (Write_Error_Summary): ditto. (Output_Messages): ditto. (To_Be_Removed): ditto. * erroutc.adb (Delete_Msg): Deal with Info_Messages counter. (Compilation_Errors): ditto. * errutil.adb (Error_Msg): Deal with Info_Messages counter. (Finalize): ditto. (Initialize): ditto. * sem_prag.adb (Analyze_Pragma): Minor comment addition. * gnat_ugn.texi: Document that -gnatwe does not affect info messages. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213457 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/errout.adb')
-rw-r--r--gcc/ada/errout.adb48
1 files changed, 38 insertions, 10 deletions
diff --git a/gcc/ada/errout.adb b/gcc/ada/errout.adb
index cae81b152bf..55b02eeaab9 100644
--- a/gcc/ada/errout.adb
+++ b/gcc/ada/errout.adb
@@ -261,8 +261,12 @@ package body Errout is
M.Deleted := True;
Warnings_Detected := Warnings_Detected - 1;
+ if M.Info then
+ Info_Messages := Info_Messages - 1;
+ end if;
+
if M.Warn_Err then
- Warnings_Treated_As_Errors := Warnings_Treated_As_Errors + 1;
+ Warnings_Treated_As_Errors := Warnings_Treated_As_Errors - 1;
end if;
end if;
@@ -1132,6 +1136,10 @@ package body Errout is
if Errors.Table (Cur_Msg).Warn or else Errors.Table (Cur_Msg).Style then
Warnings_Detected := Warnings_Detected + 1;
+ if Errors.Table (Cur_Msg).Info then
+ Info_Messages := Info_Messages + 1;
+ end if;
+
else
Total_Errors_Detected := Total_Errors_Detected + 1;
@@ -1340,8 +1348,12 @@ package body Errout is
Errors.Table (E).Deleted := True;
Warnings_Detected := Warnings_Detected - 1;
+ if Errors.Table (E).Info then
+ Info_Messages := Info_Messages - 1;
+ end if;
+
if Errors.Table (E).Warn_Err then
- Warnings_Treated_As_Errors := Warnings_Treated_As_Errors + 1;
+ Warnings_Treated_As_Errors := Warnings_Treated_As_Errors - 1;
end if;
end if;
end Delete_Warning;
@@ -1566,6 +1578,7 @@ package body Errout is
Total_Errors_Detected := 0;
Warnings_Treated_As_Errors := 0;
Warnings_Detected := 0;
+ Info_Messages := 0;
Warnings_As_Errors_Count := 0;
Cur_Msg := No_Error_Msg;
List_Pragmas.Init;
@@ -1656,8 +1669,7 @@ package body Errout is
begin
-- Extra blank line if error messages or source listing were output
- if Total_Errors_Detected + Warnings_Detected > 0
- or else Full_List
+ if Total_Errors_Detected + Warnings_Detected > 0 or else Full_List
then
Write_Eol;
end if;
@@ -1666,8 +1678,8 @@ package body Errout is
-- This normally goes to Standard_Output. The exception is when brief
-- mode is not set, verbose mode (or full list mode) is set, and
-- there are errors. In this case we send the message to standard
- -- error to make sure that *something* appears on standard error in
- -- an error situation.
+ -- error to make sure that *something* appears on standard error
+ -- in an error situation.
if Total_Errors_Detected + Warnings_Detected /= 0
and then not Brief_Output
@@ -1702,12 +1714,12 @@ package body Errout is
Write_Str (" errors");
end if;
- if Warnings_Detected /= 0 then
+ if Warnings_Detected - Info_Messages /= 0 then
Write_Str (", ");
Write_Int (Warnings_Detected);
Write_Str (" warning");
- if Warnings_Detected /= 1 then
+ if Warnings_Detected - Info_Messages /= 1 then
Write_Char ('s');
end if;
@@ -1727,6 +1739,16 @@ package body Errout is
end if;
end if;
+ if Info_Messages /= 0 then
+ Write_Str (", ");
+ Write_Int (Info_Messages);
+ Write_Str (" info message");
+
+ if Info_Messages > 1 then
+ Write_Char ('s');
+ end if;
+ end if;
+
Write_Eol;
Set_Standard_Output;
end Write_Error_Summary;
@@ -2027,8 +2049,9 @@ package body Errout is
Write_Max_Errors;
if Warning_Mode = Treat_As_Error then
- Total_Errors_Detected := Total_Errors_Detected + Warnings_Detected;
- Warnings_Detected := 0;
+ Total_Errors_Detected :=
+ Total_Errors_Detected + Warnings_Detected - Info_Messages;
+ Warnings_Detected := Info_Messages;
end if;
end Output_Messages;
@@ -2200,6 +2223,11 @@ package body Errout is
and then not Errors.Table (E).Uncond
then
Warnings_Detected := Warnings_Detected - 1;
+
+ if Errors.Table (E).Info then
+ Info_Messages := Info_Messages - 1;
+ end if;
+
return True;
-- No removal required