aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Lidén Borell <samuel@kodafritt.se>2026-03-16 23:17:27 +0100
committerSamuel Lidén Borell <samuel@kodafritt.se>2026-03-16 23:17:27 +0100
commit163cd5a81c27d36d688b337864860c9a5a6eb9de5088c92b1d2acc4e3f59d520 (patch)
tree207db387554283e1dc7e3a4d7eaee36bde1eb0de0013b474891e04e6832cc50e
parent457cb7ab64b7deaf1cbba816b7884c3f0525b6fee069d799d96d841ff689b10c (diff)
downloadp9kcc-main.tar.gz
p9kcc-main.zip
Fix parser state after sizeofmain
-rwxr-xr-xp9kcc.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/p9kcc.py b/p9kcc.py
index 06bc955..f907202 100755
--- a/p9kcc.py
+++ b/p9kcc.py
@@ -502,6 +502,7 @@ class Ds9kCCompiler:
# sizeof is handled as if it was terminal token
size = self.parse_sizeof(it)
out.append(NUM_PREFIX + str(size))
+ operator_expected = True
elif self.is_type_token(tok) or c == '%':
# Skip type cast
if len(opstack) == 0 or opstack[-1][0] != '(':