Skip to content

Force reinterpret-cast to reverse the cast in FunctionDefinition.semantic#31

Merged
s-ludwig merged 4 commits intoDigitalMars:masterfrom
s-ludwig:ldc-1.42.0-fix
Mar 3, 2026
Merged

Force reinterpret-cast to reverse the cast in FunctionDefinition.semantic#31
s-ludwig merged 4 commits intoDigitalMars:masterfrom
s-ludwig:ldc-1.42.0-fix

Conversation

@s-ludwig
Copy link
Contributor

@s-ludwig s-ludwig commented Mar 3, 2026

With LDC 1.42.0, the direct cast from Statement to FunctionDefintion returns null, causing a segmentation fault later on. Casting to void* first forces a reinterpret cast and is symmetric with the code in FunctionDefinition.semantic().

s-ludwig added 4 commits March 3, 2026 08:50
…ntic.

With LDC 1.42.0, the direct cast from Statement to FunctionDefintion returns null, causing a segmentation fault later on. Casting to void* first forces a reinterpret cast and is symmetric with the code in FunctionDefinition.semantic().
@s-ludwig
Copy link
Contributor Author

s-ludwig commented Mar 3, 2026

@WalterBright Merging to make the code work again on the current releases of DMD and LDC.

@s-ludwig s-ludwig merged commit 45a0ba2 into DigitalMars:master Mar 3, 2026
8 checks passed
@s-ludwig s-ludwig deleted the ldc-1.42.0-fix branch March 3, 2026 09:01
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