Issue 11510 - Relax restriction for overlapped pointer field access in safe code/during CTFE#2757
Merged
WalterBright merged 4 commits intodlang:masterfrom Dec 16, 2013
Merged
Conversation
Contributor
Author
Member
|
See also this old bug: |
Contributor
Author
|
@blackwhale bug 6439 does not occur from 2.064. I opened #2778 for that. |
Member
|
Looks like this would allow tagged unions in CTFE, right? |
Contributor
Author
|
@MartinNowak That's right. During CTFE, just only one of the overlapped fields would be filled, and if other unassigned fields are accessed, it will cause CTFE interpretation error. |
Perhaps this is the most better design so it would be final move.
…ss in safe code/during CTFE Check overlapped field default initializations immediately after the struct size is determined.
WalterBright
added a commit
that referenced
this pull request
Dec 16, 2013
Issue 11510 - Relax restriction for overlapped pointer field access in safe code/during CTFE
Member
|
Damn, my review point got lost because I added them to an old commit. |
Contributor
Author
|
@MartinNowak No problem. I replied to your review comments. |
|
@9rnsr you should go claim the bounty! |
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.
https://d.puremagic.com/issues/show_bug.cgi?id=11510
Implementing issue 11510 will also fix:
Issue 11427 - anonymous unions break structs in @safe code.
And this is necessary compiler enhancement to fix 2.064 regression properly:
Issue 11504 - [CTFE] JSONValue cannot make in CTFE