IRC channel logs

2025-06-12.log

back to list of logs

<Guest74>This must be a cc_amd64 bug, no?
<stikonas>or its limitation
<stikonas>so the "fix" could be workaround in M2-Planet too
<stikonas>in any case, we don't know what causes it, so we need to gather more info first
<stikonas>root cause it
<stikonas>and then we can decide on the best solution
<stikonas>(not doing anything is also an option if it is too hard)
<stikonas>since #if __M2__ works, only #if !__M2__ doesn't
<Guest74>Is there a reason cc_amd64 wouldn't be able to correctly parse `return !macro_primary_expr();`?
<stikonas>hmm, don't remember if it correctly handles non 1 true values
<stikonas>Guest74: looks that this might be the culprit
<stikonas>I'm trying #if !A
<stikonas>./AMD64/artifact/M2 -D A=1 -f test2.c -E and ./AMD64/artifact/M2 -D A=42 -f test2.c -E give different results
<stikonas>M2-Planet has better handling of !
<stikonas>I think I actually fixed that in M2-Planet a couple of years ago
<stikonas>Guest74: see this commit https://github.com/oriansj/M2-Planet/commit/a900bc6632368484cc4b8ab8e4289128cd277fcb
<stikonas>so we either need to fix all cc_* compiler assembly output
<stikonas>there almost 10 of them
<stikonas>there are almost 10 of them
<stikonas>or we workaround that line that you mentioned with !macro_primary_expr()
<stikonas>Guest74: could you also open an issue in M2-Planet repo
<stikonas>something similar to https://github.com/oriansj/stage0-posix/issues/82
<stikonas>(or perhaps issue in stage0-posix repo is better...)
<stikonas>(since it's not really M2-Planet bug)
<stikonas>personally I think fixing all cc_* compilers would be cleaner
<Guest74>Here it is in cc_amd64, I believe https://github.com/oriansj/stage0-posix-amd64/blob/650ec32bff8b2d5b5f6e3904c63038be92e3fb21/cc_amd64.M1#L3097
<stikonas>yes, this function...