From 12c5f1efb5d038d8638f517b8d73970573fbdaee Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Fri, 1 Aug 2014 15:26:17 +0200 Subject: [multiple changes] 2014-08-01 Ed Schonberg * 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 * gnatcmd.adb: Minor reformatting. 2014-08-01 Robert Dewar * 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. From-SVN: r213457 --- gcc/ada/errutil.adb | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'gcc/ada/errutil.adb') diff --git a/gcc/ada/errutil.adb b/gcc/ada/errutil.adb index 0c47f21..7eb85a4 100644 --- a/gcc/ada/errutil.adb +++ b/gcc/ada/errutil.adb @@ -309,6 +309,10 @@ package body Errutil is 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; @@ -536,19 +540,19 @@ package body Errutil 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_Int (Warnings_Detected - Info_Messages); Write_Str (" warning"); - if Warnings_Detected /= 1 then + if Warnings_Detected - Info_Messages /= 1 then Write_Char ('s'); end if; if Warning_Mode = Treat_As_Error then Write_Str (" (treated as error"); - if Warnings_Detected /= 1 then + if Warnings_Detected - Info_Messages /= 1 then Write_Char ('s'); end if; @@ -575,8 +579,9 @@ package body Errutil is end if; 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; -- Prevent displaying the same messages again in the future @@ -596,6 +601,7 @@ package body Errutil is Serious_Errors_Detected := 0; Total_Errors_Detected := 0; Warnings_Detected := 0; + Info_Messages := 0; Cur_Msg := No_Error_Msg; -- Initialize warnings table, if all warnings are suppressed, supply -- cgit v1.1