dbc169a025b979915ab9ecfea2ec894400c852f4
cstage cbinop routes every comparison through unify_arith (cmd/wcc/check.c:952), which loud-rejects an error-typed operand paired with a differing type (e.g. strconv.invalid != i32). wwstage binoptype returned bool for comparisons without any unify step, so it silently accepted a program cstage rejects -- a rule-10 break (align the leaner-but-leniner wwstage DOWN to cstage). Scope the rejection to an error operand (varianterr) mismatched with the other (typeeqast) so the broad differing-types diagnostic -- whose typeeqast-vs-cstage-type_eq asymmetry risk could reject valid bootstrap code -- stays out of wwstage. Covers the whole comparison family (EQ/NEQ/LT/LE/GT/GE), all of which cstage routes through unify_arith. Found by impl-strconv3 writing the strconv test. Gate-blind: the bootstrap never compares an error type to an int, so byte-id stayed green while the stages disagreed on what's a valid program. test/wcc/949_errtype_compare.c: both drivers reject invalid !=/==/< i32 (K_BUILDERR); same-error-type and plain-int compares still accept on both stages + cs==ww byte-id (K_RUN). 12/12.
Description
No description provided
Languages
C
89.4%
Python
7.2%
Makefile
2.3%
Shell
0.8%
Assembly
0.3%