From 66e3e69ecb3f89c91c3d4b16a3333b73a324a739 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?= <grubba@grubba.org> Date: Thu, 5 Mar 1998 14:19:39 +0100 Subject: [PATCH] Added some new error-messages. Rev: src/interpret.c:1.57 --- src/interpret.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/interpret.c b/src/interpret.c index 5b66151e4a..1526479b2b 100644 --- a/src/interpret.c +++ b/src/interpret.c @@ -4,7 +4,7 @@ ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" -RCSID("$Id: interpret.c,v 1.56 1997/12/22 17:35:23 hubbe Exp $"); +RCSID("$Id: interpret.c,v 1.57 1998/03/05 13:19:39 grubba Exp $"); #include "interpret.h" #include "object.h" #include "program.h" @@ -268,6 +268,10 @@ void assign_lvalue(struct svalue *lval,struct svalue *from) multiset_insert(lval->u.multiset, lval+1); break; + case T_VOID: + error("Indexing a void.\n"); /* Grubba */ + return(0); + default: if(IS_ZERO(lval)) error("Indexing the NULL value.\n"); /* Per */ @@ -299,6 +303,10 @@ union anything *get_pointer_if_this_type(struct svalue *lval, TYPE_T t) case T_MULTISET: return 0; + case T_VOID: + error("Indexing a void.\n"); /* Grubba */ + return(0); + default: if(IS_ZERO(lval)) error("Indexing the NULL value.\n"); /* Per */ @@ -381,6 +389,9 @@ pop_n_elems(2); \ push_int(instr); \ break +/* Example usage: + * LOOP(F_INC_LOOP, ++, <, f_add(2), is_lt); + */ #define LOOP(ID, OP1, OP2, OP3, OP4) \ CASE(ID) \ { \ -- GitLab