summaryrefslogtreecommitdiffstats
path: root/gcc/ada/stylesw.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/stylesw.adb')
-rw-r--r--gcc/ada/stylesw.adb15
1 files changed, 9 insertions, 6 deletions
diff --git a/gcc/ada/stylesw.adb b/gcc/ada/stylesw.adb
index 1213da8987e..b0b351d4f32 100644
--- a/gcc/ada/stylesw.adb
+++ b/gcc/ada/stylesw.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2001, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2003, 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- --
@@ -24,8 +24,7 @@
-- --
------------------------------------------------------------------------------
-with Hostparm; use Hostparm;
-with Opt; use Opt;
+with Opt; use Opt;
package body Stylesw is
@@ -210,14 +209,18 @@ package body Stylesw is
Style_Max_Line_Length :=
Style_Max_Line_Length * 10 +
Character'Pos (Options (J)) - Character'Pos ('0');
+
+ if Style_Max_Line_Length > Int (Column_Number'Last) then
+ OK := False;
+ Err_Col := J;
+ return;
+ end if;
+
J := J + 1;
exit when J > Options'Last
or else Options (J) not in '0' .. '9';
end loop;
- Style_Max_Line_Length :=
- Int'Min (Style_Max_Line_Length, Hostparm.Max_Line_Length);
-
Style_Check_Max_Line_Length := Style_Max_Line_Length /= 0;
when 'o' =>
OpenPOWER on IntegriCloud