Skip to content

Language: split decl and cond in IfStmt#487

Open
chqrlie wants to merge 1 commit intoc2lang:masterfrom
chqrlie:if-decl
Open

Language: split decl and cond in IfStmt#487
chqrlie wants to merge 1 commit intoc2lang:masterfrom
chqrlie:if-decl

Conversation

@chqrlie
Copy link
Copy Markdown
Contributor

@chqrlie chqrlie commented Apr 2, 2026

  • simplify code generation for if statement with declaration
  • support for optional separate decl and cond as per next C Standard

@chqrlie chqrlie force-pushed the if-decl branch 4 times, most recently from 0a986ec to 8ee4d1d Compare April 9, 2026 07:25
@chqrlie chqrlie force-pushed the if-decl branch 13 times, most recently from 5cf21f7 to a7a9ee3 Compare April 15, 2026 18:15
* simplify code generation for `if` statement with declaration
* support for optional separate decl and cond as per next C Standard
* factor code for `Analyser.analyseCondition` for all conditions
* more explicit error messages for condition decls without initializers
* accept void expression in `for` init clause but reject init call
  because the code generator does not support this yet
* add test cases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant