From 113a62d92e63e6b069f4bf764dfb71da6206c0e5 Mon Sep 17 00:00:00 2001 From: Robert Dewar Date: Wed, 22 Jan 2014 14:24:03 +0000 Subject: sem_ch3.adb, [...]: Minor reformatting. 2014-01-22 Robert Dewar * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting. 2014-01-22 Robert Dewar * sem_ch13.adb (Check_Pool_Size_Clash): New procedure (Analyze_Attribute_Definition_Clause, case Storage_Pool): call Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause, case Storage_Size): call Check_Pool_Size_Clash. From-SVN: r206923 --- gcc/ada/erroutc.adb | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'gcc/ada/erroutc.adb') diff --git a/gcc/ada/erroutc.adb b/gcc/ada/erroutc.adb index 81a3c6d..ba9b0d3 100644 --- a/gcc/ada/erroutc.adb +++ b/gcc/ada/erroutc.adb @@ -1207,20 +1207,20 @@ package body Erroutc is return; end if; - -- Nothing to do unless command line switch to suppress all warnings is - -- off or we are in GNATprove_Mode, and the last entry in the warnings - -- table covers this pragma Warnings (On), in which case adjust the end - -- point. - - if (Warnings.Last >= Warnings.First - and then Warnings.Table (Warnings.Last).Start <= Loc - and then Loc <= Warnings.Table (Warnings.Last).Stop) - and then - (Warning_Mode /= Suppress - or else - GNATprove_Mode) + -- If the last entry in the warnings table covers this pragma, then + -- we adjust the end point appropriately. + + if Warnings.Last >= Warnings.First + and then Warnings.Table (Warnings.Last).Start <= Loc + and then Loc <= Warnings.Table (Warnings.Last).Stop then - Warnings.Table (Warnings.Last).Stop := Loc; + -- We can normally skip this adjustment if we are suppressing all + -- warnings, but we do want to do it in gnatprove mode even then, + -- since we use the warning mechanism in gnatprove itself. + + if Warning_Mode /= Suppress or else GNATprove_Mode then + Warnings.Table (Warnings.Last).Stop := Loc; + end if; end if; end Set_Warnings_Mode_On; -- cgit v1.1