allow sizeof(&thing), add sys.SIZEOF_POINTER

This commit is contained in:
Irmen de Jong
2025-05-29 15:58:29 +02:00
parent 33b3a1664c
commit 112ca3cc53
14 changed files with 29 additions and 9 deletions
@@ -48,6 +48,7 @@ internal class BuiltinFuncGen(private val codeGen: IRCodeGen, private val exprGe
"prog8_lib_square_byte" -> funcSquare(call, IRDataType.BYTE)
"prog8_lib_square_word" -> funcSquare(call, IRDataType.WORD)
"structalloc" -> funcStructAlloc(call)
"sizeof" -> throw AssemblyError("sizeof must have been replaced with a constant")
else -> throw AssemblyError("missing builtinfunc for ${call.name}")
}
}