diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-05-13 18:27:55 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-05-13 18:36:16 +0200 |
commit | 8d3d2c734d5d5e7e3ac4a14dd691ba8175de67b3 (patch) | |
tree | 33e7f322cb0a6b01dd7613a4097c2d088a1c4a88 /src/errorout.ads | |
parent | e1c0c598e11723f651aec8a3816fc7d3a36f24c5 (diff) | |
download | ghdl-8d3d2c734d5d5e7e3ac4a14dd691ba8175de67b3.tar.gz ghdl-8d3d2c734d5d5e7e3ac4a14dd691ba8175de67b3.tar.bz2 ghdl-8d3d2c734d5d5e7e3ac4a14dd691ba8175de67b3.zip |
options: support -Werror=WARN to transform one warning into an error.
Diffstat (limited to 'src/errorout.ads')
-rw-r--r-- | src/errorout.ads | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/errorout.ads b/src/errorout.ads index 5cde16c5e..88b82b18a 100644 --- a/src/errorout.ads +++ b/src/errorout.ads @@ -122,6 +122,9 @@ package Errorout is subtype Msgid_Warnings is Msgid_Type range Warnid_Library .. Warnid_Static; + subtype Msgid_All_Warnings is Msgid_Type + range Msgid_Warnings'First .. Msgid_Warning; + -- Get the image of a warning. This correspond the the identifier of ID, -- in lower case, without the Msgid_Warn_ prefix and with '_' replaced -- by '-'. @@ -133,6 +136,9 @@ package Errorout is -- Get enable status of a warning. function Is_Warning_Enabled (Id : Msgid_Warnings) return Boolean; + -- Consider a warning as an error. + procedure Warning_Error (Id : Msgid_All_Warnings; As_Error : Boolean); + -- State of warnings. type Warnings_Setting is private; @@ -262,12 +268,12 @@ private Error : Boolean; end record; - type Warnings_Setting is array (Msgid_Warnings) of Warning_Control_Type; + type Warnings_Setting is array (Msgid_All_Warnings) of Warning_Control_Type; Default_Warnings : constant Warnings_Setting := (Warnid_Library | Warnid_Binding | Warnid_Port | Warnid_Shared - | Warnid_Runtime_Error | Warnid_Pure | Warnid_Specs - | Warnid_Hide => (Enabled => True, Error => False), + | Warnid_Runtime_Error | Warnid_Pure | Warnid_Specs | Warnid_Hide + | Msgid_Warning => (Enabled => True, Error => False), others => (Enabled => False, Error => False)); -- Compute the column from Error_Record E. |