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

Relax isPOD rules so ctors don't make structs non-POD #3061

Merged
merged 1 commit into from
Jan 26, 2014

Conversation

ibuclaw
Copy link
Member

@ibuclaw ibuclaw commented Jan 5, 2014

I was scratching my head at this for sometime as initially it seemed that C++ had two conflicting standards.

However it seems quite clear that a POD Aggregate must not have user-defined constructors (aggregate being any non-scalar and non-vector type, eg: static array or a class) and a POD Struct may have a user-defined constructor - though it does not say this in writing, it only says what a POD Struct should not have. That being no destructors, copy constructors or assignment operators.

To still be compatible with C++, non-PODs must be passed by hidden/invisible reference. Someone with DMD-backend knowledge will have to check this is the case.

@WalterBright
Copy link
Member

Also, such changes can't go into the next release, which is supposed to be just for bug fixes.

@yebblies
Copy link
Member

yebblies commented Jan 5, 2014

When exactly is this annoying release going to happen?

@ibuclaw
Copy link
Member Author

ibuclaw commented Jan 5, 2014

Roger, this feature change is perhaps not yet complete either.

@ibuclaw
Copy link
Member Author

ibuclaw commented Jan 5, 2014

@yebblies, May, perhaps? :)

@ibuclaw
Copy link
Member Author

ibuclaw commented Jan 5, 2014

Roger, this feature change is perhaps not yet complete either.

Actually, I'll just raise a separate pull for each problem that I deem necessary to change behaviour.

@WalterBright
Copy link
Member

When exactly is this annoying release going to happen?

The regression list is still not addressed.

https://d.puremagic.com/issues/buglist.cgi?query_format=advanced&bug_severity=regression&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED

@ibuclaw
Copy link
Member Author

ibuclaw commented Jan 5, 2014

The regression list is still not addressed.

That's still around 40 regressions squashed though. Which is good going.

@WalterBright
Copy link
Member

That's still around 40 regressions squashed though. Which is good going.

Yes, and 7 or 8 more to go before we can do a release.

@yebblies
Copy link
Member

yebblies commented Jan 5, 2014

I thought the idea was we branch and merge just the regressions into the release branch? If you're waiting for master to magically have zero regressions we may never see another dmd release.

@WalterBright
Copy link
Member

I thought the idea was we branch and merge just the regressions into the release branch?

I've tried this before. It is not a magic zero cost way of doing things. Somebody's got to do the cherry-picking and merging (i.e. me), and this tends to get more and more error-prone and confusing as the two branches diverge.

If you're waiting for master to magically have zero regressions we may never see another dmd release.

We all need to work together to get a release out. We have a quite reasonable goal of "no new regressions" when putting out a new release.

@yebblies
Copy link
Member

@WalterBright Thinking about it some more, I would actually love to stick this is before the release, as it's a critical wrong-code bug IMO and very important for DDMD. Anyone else with me?

@yebblies
Copy link
Member

Ok, this looks good and solve my wrong-code problems on linux64. I'll pull it in the next day or so unless there are objections.

@yebblies
Copy link
Member

Auto-merge toggled on

yebblies added a commit that referenced this pull request Jan 26, 2014
Relax isPOD rules so ctors don't make structs non-POD
@yebblies yebblies merged commit 5763f78 into dlang:master Jan 26, 2014
yebblies added a commit that referenced this pull request Jan 28, 2014
Relax isPOD rules so ctors don't make structs non-POD
@ibuclaw ibuclaw deleted the ctorpod branch January 29, 2014 18:56
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.

3 participants