aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXiretza <xiretza@xiretza.xyz>2022-02-03 17:27:26 +0100
committertgingold <tgingold@users.noreply.github.com>2022-02-28 20:35:32 +0100
commit6b6397b75abb7068d4ac484119ecf7ff56868192 (patch)
treef603c64000341b4635948d46fe95b1b9ba0279d6 /src
parent20ed64ddc06cbb789d5b6991f0f4c5accaeaf2bf (diff)
downloadghdl-6b6397b75abb7068d4ac484119ecf7ff56868192.tar.gz
ghdl-6b6397b75abb7068d4ac484119ecf7ff56868192.tar.bz2
ghdl-6b6397b75abb7068d4ac484119ecf7ff56868192.zip
Add --std=19
Currently, all behaviour is the same as for --std=08, except for the standard library search path. No standard libraries exist yet, so running ghdl with --std=19 will fail.
Diffstat (limited to 'src')
-rw-r--r--src/flags.adb2
-rw-r--r--src/flags.ads2
-rw-r--r--src/ghdldrv/ghdllocal.adb2
-rw-r--r--src/libraries.adb4
-rw-r--r--src/options.adb6
-rw-r--r--src/vhdl/vhdl-sem_assocs.adb2
-rw-r--r--src/vhdl/vhdl-std_package.adb3
7 files changed, 16 insertions, 5 deletions
diff --git a/src/flags.adb b/src/flags.adb
index a66d0ebca..b3f95f5f7 100644
--- a/src/flags.adb
+++ b/src/flags.adb
@@ -26,6 +26,8 @@ package body Flags is
Flag_String (1 .. 2) := "93";
when Vhdl_08 =>
Flag_String (1 .. 2) := "08";
+ when Vhdl_19 =>
+ Flag_String (1 .. 2) := "19";
end case;
if Flag_Integer_64 then
Flag_String (3) := 'I';
diff --git a/src/flags.ads b/src/flags.ads
index 9a71f9dca..326733564 100644
--- a/src/flags.ads
+++ b/src/flags.ads
@@ -24,7 +24,7 @@ package Flags is
-- List of vhdl standards.
-- VHDL_93c is vhdl_93 with backward compatibility with 87 (file).
type Vhdl_Std_Type is
- (Vhdl_87, Vhdl_93, Vhdl_00, Vhdl_02, Vhdl_08);
+ (Vhdl_87, Vhdl_93, Vhdl_00, Vhdl_02, Vhdl_08, Vhdl_19);
-- Standard accepted.
Vhdl_Std: Vhdl_Std_Type := Vhdl_93;
diff --git a/src/ghdldrv/ghdllocal.adb b/src/ghdldrv/ghdllocal.adb
index 722c1a26f..c6cebc398 100644
--- a/src/ghdldrv/ghdllocal.adb
+++ b/src/ghdldrv/ghdllocal.adb
@@ -367,6 +367,8 @@ package body Ghdllocal is
return "v93";
when Vhdl_08 =>
return "v08";
+ when Vhdl_19 =>
+ return "v19";
end case;
end Get_Version_Path;
diff --git a/src/libraries.adb b/src/libraries.adb
index d7ddfb5ae..bc3d44d83 100644
--- a/src/libraries.adb
+++ b/src/libraries.adb
@@ -139,6 +139,8 @@ package body Libraries is
return Image_Identifier (Library) & "-obj93.cf";
when Vhdl_08 =>
return Image_Identifier (Library) & "-obj08.cf";
+ when Vhdl_19 =>
+ return Image_Identifier (Library) & "-obj19.cf";
end case;
end Library_To_File_Name;
@@ -181,6 +183,8 @@ package body Libraries is
Path (L + 2 .. L + 4) := "v93";
when Vhdl_08 =>
Path (L + 2 .. L + 4) := "v08";
+ when Vhdl_19 =>
+ Path (L + 2 .. L + 4) := "v19";
end case;
L := L + 5;
Path (L) := GNAT.OS_Lib.Directory_Separator;
diff --git a/src/options.adb b/src/options.adb
index 265b4614a..5e34609d6 100644
--- a/src/options.adb
+++ b/src/options.adb
@@ -124,9 +124,11 @@ package body Options is
Vhdl_Std := Vhdl_02;
elsif Opt (7 .. 8) = "08" then
Vhdl_Std := Vhdl_08;
+ elsif Opt (7 .. 8) = "19" then
+ Vhdl_Std := Vhdl_19;
else
Error_Msg_Option ("unknown language standard: " & Opt (7 ..8) &
- ". Should be one of: 87, 93, 02, 08");
+ ". Should be one of: 87, 93, 02, 08, 19");
return Option_Err;
end if;
elsif Opt'Length = 9 and then Opt (7 .. 9) = "93c" then
@@ -135,7 +137,7 @@ package body Options is
Flag_Relaxed_Files87 := True;
else
Error_Msg_Option ("unknown language standard. " &
- "Should be one of: 87, 93, 02, 08");
+ "Should be one of: 87, 93, 02, 08, 19");
return Option_Err;
end if;
elsif Opt'Length = 5 and then Opt (1 .. 5) = "--ams" then
diff --git a/src/vhdl/vhdl-sem_assocs.adb b/src/vhdl/vhdl-sem_assocs.adb
index 6d953d7a2..f727b87c0 100644
--- a/src/vhdl/vhdl-sem_assocs.adb
+++ b/src/vhdl/vhdl-sem_assocs.adb
@@ -503,7 +503,7 @@ package body Vhdl.Sem_Assocs is
if Vhdl02_Assocs_Map (Fmode, Amode) then
return True;
end if;
- when Vhdl_08 =>
+ when Vhdl_08 | Vhdl_19 =>
if Vhdl08_Assocs_Map (Fmode, Amode) then
return True;
end if;
diff --git a/src/vhdl/vhdl-std_package.adb b/src/vhdl/vhdl-std_package.adb
index 3c6852c23..40d290891 100644
--- a/src/vhdl/vhdl-std_package.adb
+++ b/src/vhdl/vhdl-std_package.adb
@@ -1060,7 +1060,8 @@ package body Vhdl.Std_Package is
Pure := True;
when Vhdl_93
| Vhdl_00
- | Vhdl_08 =>
+ | Vhdl_08
+ | Vhdl_19 =>
Pure := False;
end case;
Set_Pure_Flag (Function_Now, Pure);