transpile: Properly handle address-of static compound literals - #1644
Merged
Conversation
Rua
force-pushed
the
static-compound-literal
branch
from
March 6, 2026 17:49
dcbe0fa to
8a200eb
Compare
Rua
marked this pull request as ready for review
March 6, 2026 17:51
Rua
force-pushed
the
static-compound-literal
branch
4 times, most recently
from
March 6, 2026 18:51
4a06d79 to
b768426
Compare
kkysen
reviewed
Mar 10, 2026
Rua
force-pushed
the
static-compound-literal
branch
4 times, most recently
from
March 17, 2026 10:58
3e04701 to
e485aae
Compare
Rua
force-pushed
the
static-compound-literal
branch
from
March 23, 2026 18:09
e485aae to
2be8ad5
Compare
Contributor
Author
|
I realised that in the current nightly, taking the raw address of a static is |
Rua
force-pushed
the
static-compound-literal
branch
2 times, most recently
from
March 23, 2026 18:30
3d6951c to
dccadf5
Compare
Rua
force-pushed
the
static-compound-literal
branch
from
April 2, 2026 17:32
dccadf5 to
73d247b
Compare
Rua
force-pushed
the
static-compound-literal
branch
from
April 16, 2026 20:45
73d247b to
c805395
Compare
Rua
force-pushed
the
static-compound-literal
branch
7 times, most recently
from
April 26, 2026 17:02
dea45a4 to
2de9a34
Compare
Rua
force-pushed
the
static-compound-literal
branch
from
April 26, 2026 17:25
2de9a34 to
267a4d6
Compare
ahomescu
approved these changes
May 1, 2026
Rua
force-pushed
the
static-compound-literal
branch
from
May 2, 2026 08:50
267a4d6 to
46abd46
Compare
Rua
force-pushed
the
static-compound-literal
branch
from
May 5, 2026 09:36
46abd46 to
987a291
Compare
ahomescu
added a commit
that referenced
this pull request
May 12, 2026
Following the suggestion made at #1644 (comment).
ahomescu
added a commit
that referenced
this pull request
May 30, 2026
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.
WithStmtsin static initialisers to contain statements #1610.This allows limited use of statements in translations of statics, only if the statements are
Stmt::Item. This is then used to solve the original bug, by declaring a fresh static variable to take the address of.This code doesn't currently account for situations in which the compound literal expression needs to be sectioned off for late initialisation, as that would have complicated the code a fair bit further.