diff options
Diffstat (limited to 'gcc/ada/stylesw.adb')
-rw-r--r-- | gcc/ada/stylesw.adb | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/gcc/ada/stylesw.adb b/gcc/ada/stylesw.adb index 1213da8..b0b351d 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' => |