From: cuz Date: Fri, 26 Jul 2002 19:27:55 +0000 (+0000) Subject: Fixed a bug X-Git-Tag: V2.12.0~2255 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8d8458032da8555e5dc562cf93336d9cebf5d482;p=cc65 Fixed a bug git-svn-id: svn://svn.cc65.org/cc65/trunk@1371 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/cc65/expr.c b/src/cc65/expr.c index dfebf8adc..cf4499dac 100644 --- a/src/cc65/expr.c +++ b/src/cc65/expr.c @@ -855,6 +855,14 @@ static int primary (ExprDesc* lval) return k; } + /* If we run into an identifier in preprocessing mode, we assume that this + * is an undefined macro and replace it by a constant value of zero. + */ + if (Preprocessing && CurTok.Tok == TOK_IDENT) { + MakeConstIntExpr (lval, 0); + return 0; + } + /* All others may only be used if the expression evaluation is not called * recursively by the preprocessor. */