You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
gen-c: a module-level array constant puts its brackets before the name #3457
error: brackets are not allowed here; to declare an array, place the brackets after the identifier
error: type specifier missing, defaults to 'int'
error: expected ';' after top level declarator
The mutable twin four lines above in the emitter has the same defect: var A : [4]u8 gives static [4]u8 A = { … }.
And a slice constant, which predates both: const A : []u8 = [1,2,3] gives static const []u8 A. T name[] = { … } is legal C and takes its size from the list.
One file's count rose and it is not a regression.isa/registers goes 34 → 44 because the declarations now parse: the errors that disappear are brackets are not allowed here, expected ';' after top level declarator, expected ';' at end of declaration, and what appears behind them is semantic — TernaryWord{.raw=0} is not C, a separate defect that the parse cascade had been hiding. A raw error count is not monotone under a repair that fixes a parse error.
Found by
Round six of tools/backend_parity_table.py — the const-initialiser position, which the table had never covered. The previous round found only latent defects; this one found a live one on its first form.
Activity
gen-c: put the brackets after the name in a module array constant (#3458