summaryrefslogtreecommitdiff
path: root/gcc/ada/errutil.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/errutil.adb')
-rw-r--r--gcc/ada/errutil.adb9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/ada/errutil.adb b/gcc/ada/errutil.adb
index 8053bb51ae7..0d4af6c49c8 100644
--- a/gcc/ada/errutil.adb
+++ b/gcc/ada/errutil.adb
@@ -31,6 +31,7 @@ with Opt; use Opt;
with Output; use Output;
with Scans; use Scans;
with Sinput; use Sinput;
+with Stringt; use Stringt;
with Stylesw; use Stylesw;
package body Errutil is
@@ -599,9 +600,11 @@ package body Errutil is
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;
+ Warnings.Append
+ (New_Val =>
+ (Start => Source_Ptr'First,
+ Stop => Source_Ptr'Last,
+ Reason => Null_String_Id));
end if;
end Initialize;