From 3d20d19ed2bad7ab673b0855ebca86e6bba1880e Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Wed, 20 May 2020 12:37:56 -0700 Subject: fix: removed signed bitwise operations --- sys/cmd/cc/pp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sys') 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 != '(') { -- cgit v1.2.1