summaryrefslogtreecommitdiff
path: root/src/vhdl/sem_names.adb
diff options
context:
space:
mode:
authorTristan Gingold2015-05-12 22:42:22 +0200
committerTristan Gingold2015-05-12 22:42:22 +0200
commit1c8b894c429a29a34ac251c5536ececd18bac048 (patch)
tree48d3b8676dca17ed033aa90960f64fad0c6762ea /src/vhdl/sem_names.adb
parent4c4d44d92d418ab5cc019b2851990543fcf8f428 (diff)
downloadghdl-1c8b894c429a29a34ac251c5536ececd18bac048.tar.gz
ghdl-1c8b894c429a29a34ac251c5536ececd18bac048.tar.bz2
ghdl-1c8b894c429a29a34ac251c5536ececd18bac048.zip
Always report pure rules violation, but as a warning in 93c or -frelaxed-rules
For ticket 57.
Diffstat (limited to 'src/vhdl/sem_names.adb')
-rw-r--r--src/vhdl/sem_names.adb16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/vhdl/sem_names.adb b/src/vhdl/sem_names.adb
index d7bb8c4..6299826 100644
--- a/src/vhdl/sem_names.adb
+++ b/src/vhdl/sem_names.adb
@@ -1235,7 +1235,7 @@ package body Sem_Names is
procedure Error_Pure (Subprg : Iir; Obj : Iir)
is
begin
- Error_Msg_Sem
+ Error_Msg_Sem_Relaxed
("reference to " & Disp_Node (Obj) & " violate pure rule for "
& Disp_Node (Subprg), Loc);
end Error_Pure;
@@ -1288,14 +1288,12 @@ package body Sem_Names is
--
-- A pure function must not contain a reference to an explicitly
-- declared file.
- if Flags.Vhdl_Std > Vhdl_93c then
- if Get_Kind (Subprg) = Iir_Kind_Function_Declaration then
- Error_Pure (Subprg, Obj);
- else
- Set_Purity_State (Subprg, Impure);
- Set_Impure_Depth (Get_Subprogram_Body (Subprg),
- Iir_Depth_Impure);
- end if;
+ if Get_Kind (Subprg) = Iir_Kind_Function_Declaration then
+ Error_Pure (Subprg, Obj);
+ else
+ Set_Purity_State (Subprg, Impure);
+ Set_Impure_Depth (Get_Subprogram_Body (Subprg),
+ Iir_Depth_Impure);
end if;
return;
when others =>