From 1dac1a2d70f72f9e525e2d5b2302911baf55c144 Mon Sep 17 00:00:00 2001 From: Daniel_Cortez Date: Sun, 11 Feb 2018 23:15:26 +0700 Subject: [PATCH] emit: Make the compiler tell it expects "any value" for arguments of type 'any' --- source/compiler/sc.h | 17 +++++++++-------- source/compiler/sc1.c | 2 +- source/compiler/sc2.c | 4 ++-- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/source/compiler/sc.h b/source/compiler/sc.h index f1382e7..92ba3c2 100644 --- a/source/compiler/sc.h +++ b/source/compiler/sc.h @@ -398,15 +398,16 @@ typedef struct s_valuepair { #define tLABEL 337 #define tSTRING 338 /* argument types for emit/__emit */ -#define teNUMERIC 339 /* integer/rational number */ -#define teDATA 340 /* data (variable name or address) */ -#define teLOCAL 341 /* local variable (name or offset) */ -#define teFUNCTN 342 /* Pawn function */ -#define teNATIVE 343 /* native function */ -#define teNONNEG 344 /* nonnegative integer */ +#define teANY 339 /* any value */ +#define teNUMERIC 340 /* integer/rational number */ +#define teDATA 341 /* data (variable name or address) */ +#define teLOCAL 342 /* local variable (name or offset) */ +#define teFUNCTN 343 /* Pawn function */ +#define teNATIVE 344 /* native function */ +#define teNONNEG 345 /* nonnegative integer */ /* for assigment to "lastst" only (see SC1.C) */ -#define tEXPR 345 -#define tENDLESS 346 /* endless loop */ +#define tEXPR 346 +#define tENDLESS 347 /* endless loop */ /* (reversed) evaluation of staging buffer */ #define sSTARTREORDER 0x01 diff --git a/source/compiler/sc1.c b/source/compiler/sc1.c index 432c997..602d8c7 100644 --- a/source/compiler/sc1.c +++ b/source/compiler/sc1.c @@ -6063,7 +6063,7 @@ fetchtok: static void SC_FASTCALL emit_param_any(emit_outval *p) { - emit_param_any_internal(p,teNUMERIC,TRUE,TRUE); + emit_param_any_internal(p,teANY,TRUE,TRUE); } static void SC_FASTCALL emit_param_integer(emit_outval *p) diff --git a/source/compiler/sc2.c b/source/compiler/sc2.c index b32141a..66b84d7 100644 --- a/source/compiler/sc2.c +++ b/source/compiler/sc2.c @@ -2097,8 +2097,8 @@ char *sc_tokens[] = { "#tryinclude", "#undef", "#warning", ";", ";", "-integer value-", "-rational value-", "-identifier-", "-label-", "-string-", - "-numeric value-", "-data offset-", "-local variable-", "-function-", - "-native function-", "-nonnegative integer-" + "-any value-", "-numeric value-", "-data offset-", "-local variable-", + "-function-", "-native function-", "-nonnegative integer-" }; SC_FUNC int lex(cell *lexvalue,char **lexsym)