KEMBAR78
Fix #4938 - Be stricter wrt. supported AddrExp in toConstElem() by kinke · Pull Request #4939 · ldc-developers/ldc · GitHub
Skip to content

Conversation

@kinke
Copy link
Member

@kinke kinke commented May 24, 2025

DMD seems to support AddrExp of struct literals only...

}

// address of indexExp
/* address of indexExp
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[for now just checking whether we hit this case anywhere in the testsuite]

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, these are apparently represented as SymOffExp:

shared int[3] arr;

auto e = &arr[1];
auto bla = &arr;

…stElem()

DMD seems to support AddrExp of struct literals only...
@kinke kinke marked this pull request as ready for review May 24, 2025 13:33
@kinke kinke merged commit 003673b into ldc-developers:master May 26, 2025
19 of 20 checks passed
@kinke kinke deleted the fix4938 branch May 26, 2025 15:02
liushuyu pushed a commit to liushuyu/ldc that referenced this pull request Jun 4, 2025
…stElem() (ldc-developers#4939)

DMD seems to support AddrExp of struct literals only...
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