diff options
author | Nicholas Noll <nbnoll@eml.cc> | 2020-05-20 12:37:56 -0700 |
---|---|---|
committer | Nicholas Noll <nbnoll@eml.cc> | 2020-05-20 12:37:56 -0700 |
commit | 3d20d19ed2bad7ab673b0855ebca86e6bba1880e (patch) | |
tree | e3c6a3d246a5bbc93cbfa4022232d39ec9de17f0 /sys | |
parent | 6ea22d950fd7246c9159a3601819ae23d03e8dcd (diff) |
fix: removed signed bitwise operations
Diffstat (limited to 'sys')
-rw-r--r-- | sys/cmd/cc/pp.c | 7 |
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 != '(') { |