Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Stub out comparison operators for records

  • Loading branch information...
commit 7e127eea49f9f2f9acfb63d391c5916b49f817b2 1 parent 4bd3014
@nickg authored
Showing with 7 additions and 0 deletions.
  1. +6 −0 src/sem.c
  2. +1 −0  test/regress/record1.vhd
View
6 src/sem.c
@@ -611,6 +611,12 @@ static void sem_declare_predefined_ops(tree_t decl)
sem_declare_binary(ident_new("\">=\""), t, t, std_bool, "ageq");
break;
+ case T_RECORD:
+ // Operators on records
+ sem_declare_binary(ident_new("\"=\""), t, t, std_bool, "req");
+ sem_declare_binary(ident_new("\"/=\""), t, t, std_bool, "rneq");
+ break;
+
case T_PHYSICAL:
// Multiplication
sem_declare_binary(mult, t, std_int, t, "mul");
View
1  test/regress/record1.vhd
@@ -27,6 +27,7 @@ begin
assert (a.x = 1) and (a.y = 2);
a := k;
assert (a.x = k.x) and (a.y = k.y);
+ --assert a = k;
wait;
end process;
Please sign in to comment.
Something went wrong with that request. Please try again.