X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gcc%2Fada%2Ferrutil.adb;h=f877fafe228d28a109a5b94df5fc40a371e4b8e7;hb=39f4e199a51bc4ff869d273937d363902cc963c3;hp=b70f18d2ce8db210a17fb794ce6c0a33337d45b8;hpb=9de61fcb9b63fabbe305dab069bf49d8d1e6195a;p=gcc.git diff --git a/gcc/ada/errutil.adb b/gcc/ada/errutil.adb index b70f18d2ce8..f877fafe228 100644 --- a/gcc/ada/errutil.adb +++ b/gcc/ada/errutil.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1991-2005, Free Software Foundation, Inc. -- +-- Copyright (C) 1991-2007, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -582,6 +582,12 @@ package body Errutil is -- an initial dummy entry covering all possible source locations. Warnings.Init; + + if Warning_Mode = Suppress then + Warnings.Increment_Last; + Warnings.Table (Warnings.Last).Start := Source_Ptr'First; + Warnings.Table (Warnings.Last).Stop := Source_Ptr'Last; + end if; end Initialize; ------------------------ @@ -675,7 +681,12 @@ package body Errutil is -- Check for insertion character if C = '%' then - Set_Msg_Insertion_Name; + if P <= Text'Last and then Text (P) = '%' then + P := P + 1; + Set_Msg_Insertion_Name_Literal; + else + Set_Msg_Insertion_Name; + end if; elsif C = '$' then