diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-01-04 16:37:07 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-01-04 21:01:34 +0100 |
commit | 577172e2a52076f4099fcdf4bf8a69649488f514 (patch) | |
tree | 8d6b1e848417b97446134c5e24d80191ce90d87c /src/vhdl/translate | |
parent | 591f3ffe260582cd8057a3470bb1580fea98ebbc (diff) | |
download | ghdl-577172e2a52076f4099fcdf4bf8a69649488f514.tar.gz ghdl-577172e2a52076f4099fcdf4bf8a69649488f514.tar.bz2 ghdl-577172e2a52076f4099fcdf4bf8a69649488f514.zip |
errorout: discard disabled warnings.
Fix #729
Diffstat (limited to 'src/vhdl/translate')
-rw-r--r-- | src/vhdl/translate/ortho_front.adb | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/vhdl/translate/ortho_front.adb b/src/vhdl/translate/ortho_front.adb index f17713b0f..09c44c7aa 100644 --- a/src/vhdl/translate/ortho_front.adb +++ b/src/vhdl/translate/ortho_front.adb @@ -221,11 +221,16 @@ package body Ortho_Front is Flag_Expect_Failure := True; return 1; elsif Opt'Length > 7 and then Opt (1 .. 7) = "--ghdl-" then - if Options.Parse_Option (Opt (7 .. Opt'Last)) then - return 1; - else - return 0; - end if; + declare + subtype Str_Type is String (1 .. Opt'Last - 6); + begin + -- The option paraeter must be normalized (starts at index 1). + if Options.Parse_Option (Str_Type (Opt (7 .. Opt'Last))) then + return 1; + else + return 0; + end if; + end; elsif Options.Parse_Option (Opt.all) then return 1; else |