aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/cmd/cc/pp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/cmd/cc/pp.c b/sys/cmd/cc/pp.c
index 57cd5e2..737e018 100644
--- a/sys/cmd/cc/pp.c
+++ b/sys/cmd/cc/pp.c
@@ -392,11 +392,12 @@ enum
PParg = 0x03,
PPcat = 0x04,
PPstr = 0x05,
- PPvar = 0x80,
PPnarg = 30,
};
+#define PPvar 0x80u
+
// -----------------------------------------------------------------------
// preprocessor functions
@@ -648,8 +649,8 @@ expandmacro(Lexer *lx, Sym *s, byte *dst)
strcpy(dst, s->macro + 2);
return str·len(s->macro)-2;
}
- dots = *s->macro & PPvar;
- nargs = (*s->macro & ~PPvar);
+ dots = (ubyte)s->macro[0] & PPvar;
+ nargs = (ubyte)s->macro[0] & (~PPvar);
b = getnsbyte(lx);
if (b != '(') {