feat(ast): brace initializers for scalars and structs - #74
Merged
Conversation
2 tasks
Contributor
|
Tick the box to add this pull request to the merge queue (same as
|
rieske
force-pushed
the
feature/initializers
branch
2 times, most recently
from
July 24, 2026 13:57
f77f691 to
4c02dfb
Compare
rieske
force-pushed
the
feature/initializers
branch
2 times, most recently
from
July 25, 2026 06:32
6755713 to
ba5ca80
Compare
rieske
force-pushed
the
feature/struct-member-access
branch
from
July 25, 2026 07:19
6f8820b to
12e5cc8
Compare
rieske
force-pushed
the
feature/initializers
branch
from
July 25, 2026 07:19
ba5ca80 to
8fce1b7
Compare
rieske
force-pushed
the
feature/struct-member-access
branch
from
July 25, 2026 07:31
12e5cc8 to
f0976fc
Compare
rieske
force-pushed
the
feature/initializers
branch
from
July 25, 2026 07:31
8fce1b7 to
eac2cee
Compare
rieske
force-pushed
the
feature/struct-member-access
branch
from
July 25, 2026 07:54
f0976fc to
b70a025
Compare
rieske
force-pushed
the
feature/initializers
branch
3 times, most recently
from
July 25, 2026 11:30
a1c41a5 to
28e11ea
Compare
rieske
force-pushed
the
feature/struct-member-access
branch
from
July 25, 2026 11:33
109220e to
f62d65f
Compare
rieske
force-pushed
the
feature/initializers
branch
from
July 25, 2026 11:33
28e11ea to
25bffc1
Compare
- InitializerListExpression + CSNB brace wiring - lowerLocalInitializer writes StructFieldInit to AnnotationStore - Codegen reads field inits from store (not AST) - Nested braces rejected; excess diagnosed; per-member zero
rieske
force-pushed
the
feature/initializers
branch
from
July 25, 2026 11:44
25bffc1 to
20ee8fb
Compare
rieske
added a commit
that referenced
this pull request
Jul 25, 2026
Remove the unbuilt InitializersTest (expects nested braces unimplemented; feature implements them) and strip auto-merged popInitializerList APIs that fight the expression-stack initializer list path.
rieske
added a commit
that referenced
this pull request
Jul 26, 2026
…ris.
Support scalar brace init (local and global) so int x = { 7 } matches C and
the master InitializersTest intent, with excess-element diagnostics. Expand
functional coverage in themed suites (variadic, structs, errors, arrays,
casts, etc.) and AnnotationStore unit miss-paths to bring line rate back to
92.9%. Remove unbuilt InitializersTest and popInitializerList APIs that
conflicted with the expression-stack initializer path after the PR #74 rebase.
rieske
added a commit
that referenced
this pull request
Jul 26, 2026
…ris.
Support scalar brace init by peeling non-aggregate { e } at the declarator
(type-check, .data, CG assign) instead of treating lists as values. Expand
functional coverage in themed suites and AnnotationStore miss-paths to 92.9%.
C23 va_start(ap) uses the last named formal; __typeof__ compound literals
resolve the operand type. Diagnostics live in the SemanticErrors suite.
Remove unbuilt InitializersTest and popInitializerList APIs that conflicted
with the expression-stack initializer path after the PR #74 rebase.
rieske
added a commit
that referenced
this pull request
Jul 26, 2026
…ris. Support scalar brace init via shared effectiveInitializer peel (SA and CG). Typeof type-names own their operand on TypeSpecifier and resolve to a real type in SA. Split global/local initializer application out of the declarator analyzer. Expand functional coverage in themed suites and AnnotationStore miss-paths to 92.9%. C23 va_start(ap) uses the last named formal. Diagnostics live in the SemanticErrors suite. Remove unbuilt InitializersTest and popInitializerList APIs that conflicted with the expression-stack path after the PR #74 rebase.
rieske
added a commit
that referenced
this pull request
Jul 26, 2026
…ris. Support scalar brace init via shared effectiveInitializer peel (SA and CG). Typeof type-names own their operand on TypeSpecifier; SA resolveTypeSpecifier writes a concrete type and clears provisional state, diagnosing unresolvable operands. Split global/local initializer application out of the declarator analyzer. Expand functional coverage in themed suites and AnnotationStore miss-paths to 92.9%. C23 va_start(ap) uses the last named formal. Diagnostics live in the SemanticErrors suite. Remove unbuilt InitializersTest and popInitializerList APIs that conflicted with the expression-stack path after the PR #74 rebase.
rieske
added a commit
that referenced
this pull request
Jul 26, 2026
…ris. Support scalar brace init via shared effectiveInitializer peel (SA and CG). Typeof type-names own their operand on TypeSpecifier; SA resolveTypeSpecifier writes a concrete type and clears provisional state, diagnosing unresolvable operands. Split global/local initializer application out of the declarator analyzer. Expand functional coverage in themed suites and AnnotationStore miss-paths to 92.9%. C23 va_start(ap) uses the last named formal. Diagnostics live in the SemanticErrors suite. Remove unbuilt InitializersTest and popInitializerList APIs that conflicted with the expression-stack path after the PR #74 rebase.
rieske
added a commit
that referenced
this pull request
Jul 26, 2026
…ris. Support scalar brace init via shared effectiveInitializer peel (SA and CG). Typeof type-names own their operand on TypeSpecifier; SA resolveTypeSpecifier writes a concrete type and clears provisional state, diagnosing unresolvable operands. Split global/local initializer application out of the declarator analyzer. Expand functional coverage in themed suites and AnnotationStore miss-paths to 92.9%. C23 va_start(ap) uses the last named formal. Diagnostics live in the SemanticErrors suite. Remove unbuilt InitializersTest and popInitializerList APIs that conflicted with the expression-stack path after the PR #74 rebase.
rieske
added a commit
that referenced
this pull request
Jul 26, 2026
…ris. Support scalar brace init via shared effectiveInitializer peel (SA and CG). Typeof type-names own their operand on TypeSpecifier; SA resolveTypeSpecifier writes a concrete type and clears provisional state, diagnosing unresolvable operands. Split global/local initializer application out of the declarator analyzer. Expand functional coverage in themed suites and AnnotationStore miss-paths to 92.9%. C23 va_start(ap) uses the last named formal. Diagnostics live in the SemanticErrors suite. Remove unbuilt InitializersTest and popInitializerList APIs that conflicted with the expression-stack path after the PR #74 rebase.
rieske
added a commit
that referenced
this pull request
Jul 26, 2026
…ris. Support scalar brace init via shared effectiveInitializer peel (SA and CG). Typeof type-names own their operand on TypeSpecifier; SA resolveTypeSpecifier writes a concrete type and clears provisional state, diagnosing unresolvable operands. Split global/local initializer application out of the declarator analyzer. Expand functional coverage in themed suites and AnnotationStore miss-paths to 92.9%. C23 va_start(ap) uses the last named formal. Diagnostics live in the SemanticErrors suite. Remove unbuilt InitializersTest and popInitializerList APIs that conflicted with the expression-stack path after the PR #74 rebase.
rieske
added a commit
that referenced
this pull request
Jul 26, 2026
…ris. Support scalar brace init via shared effectiveInitializer peel (SA and CG). Typeof type-names own their operand on TypeSpecifier; SA resolveTypeSpecifier writes a concrete type and clears provisional state, diagnosing unresolvable operands. Split global/local initializer application out of the declarator analyzer. Expand functional coverage in themed suites and AnnotationStore miss-paths to 92.9%. C23 va_start(ap) uses the last named formal. Diagnostics live in the SemanticErrors suite. Remove unbuilt InitializersTest and popInitializerList APIs that conflicted with the expression-stack path after the PR #74 rebase.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
{ e1, e2, … }intoInitializerListExpressionFieldAddressInitializersTestStack
PR E of remaining track. Base: #73 (structs). Next: function pointers.
Test plan
ctest