Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REG 2.067] Fix wrong struct and align size for anonymous aggregates #5776

Merged
merged 1 commit into from May 15, 2016

Conversation

ibuclaw
Copy link
Member

@ibuclaw ibuclaw commented May 14, 2016

http://bugzilla.gdcproject.org/show_bug.cgi?id=215

Because of Bugzilla 13613, the current logic means that the anonstructsize and anonalignsize are reset to 0 eagerly. Instead they should only be updated if any members were added.

@ibuclaw ibuclaw changed the title Fix wrong struct and align size for anonymous aggregates [REG 2.067] Fix wrong struct and align size for anonymous aggregates May 14, 2016
@ibuclaw
Copy link
Member Author

ibuclaw commented May 14, 2016

Failing test has nothing to do with this.

@9rnsr
Copy link
Contributor

9rnsr commented May 14, 2016

Testing offsetof at compile time, testing fields address difference at runtime ... couldn't test the bug?

@ibuclaw
Copy link
Member Author

ibuclaw commented May 14, 2016

No, and I don't think there is any good test for this. Anonymous declarations can't really be touched by user code. It's also a shame that DMD flattens the fields list for aggregates also. GDC is the only user of these AnonDeclaration fields.

@9rnsr
Copy link
Contributor

9rnsr commented May 15, 2016

OK.

@9rnsr
Copy link
Contributor

9rnsr commented May 15, 2016

Auto-merge toggled on

@9rnsr 9rnsr merged commit a99fc59 into dlang:master May 15, 2016
@ibuclaw
Copy link
Member Author

ibuclaw commented May 16, 2016

Thanks.

@ibuclaw ibuclaw deleted the anonoffset branch May 16, 2016 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants