← board

C: string literal as binop operand must decay to char* value (== compare SIGSEGVs)

Failing test

Why

In C a string literal in a comparison/arith context is a POINTER value: its address past the 8-byte Pascal length prefix (same +8 the store/call paths already apply). The binop lowering lacks that decay.

Prior art (reverted 2026-07-06 — landed without ticket/review, pulled back out)

Previous session drafted in ir.inc AN_BINOP lowering: under CProgramMode, if an operand is AN_STR_LIT, wrap it as IR_BINOP(operand + const 8) typed tyPointer. Worked for the suite; needs review (does it belong in cparser-side lowering instead of shared ir.inc? does it double-apply on paths that already add +8?).

Gate

Drop 00112.c from test/c-conformance/pxx.skip; runner green; self-host clean.

Log