diff options
Diffstat (limited to 'src/options.adb')
-rw-r--r-- | src/options.adb | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/options.adb b/src/options.adb index 553a95545..32d3ca6f1 100644 --- a/src/options.adb +++ b/src/options.adb @@ -41,10 +41,25 @@ package body Options is begin -- Handle -Werror. if Opt = "error" then - Warn_Error := Val; + for I in Msgid_Warnings loop + Warning_Error (I, Val); + end loop; return True; end if; + -- Handle -Werror=xxx + if Opt'Length >= 6 + and then Opt (Opt'First .. Opt'First + 5) = "error=" + then + for I in Msgid_Warnings loop + if Warning_Image (I) = Opt (Opt'First + 6 .. Opt'Last) then + Warning_Error (I, Val); + return True; + end if; + end loop; + return False; + end if; + -- Normal warnings. for I in Msgid_Warnings loop if Warning_Image (I) = Opt then |