-
-
Notifications
You must be signed in to change notification settings - Fork 610
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
fix Issue 23145 - Stack allocation of scope new variables defeats @safe #14175
Conversation
|
Thanks for your pull request, @WalterBright! Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#14175" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should target stable unless this is a master only problem.
|
This is not a regression, the problem is as old as dip1000. |
|
This is primarily a big functional change, definitely worth a big changelog entry. - E.g., I'm pretty sure this prevents all |
a3da521 to
8d260c4
Compare
|
@kinke you're right. It'll probably have to go behind a preview switch. |
|
Or perhaps we should just start doing attribute inference for constructors. |
92a528a to
cae48c5
Compare
|
Let's see how far this gets before deciding the best way to deal with older code. |
4eb4fa6 to
5128101
Compare
this is a master only problem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a master only issue, please check before making such false assertions. This affects at least 2.099+ (checked on, run.dlang.io, trying all compilers results in a server error).
|
I don't understand your point. Putting this in stable will destabilize stable. |
|
Adding Spec PR tag to clarify |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| import dmd.aggregate; | ||
| import dmd.apply; | ||
| import dmd.astenums; | ||
| import dmd.declaration; | ||
| import dmd.dscope; | ||
| import dmd.errors; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding these 2 imports seems to be an unrelated change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
people keep removing core.stdc.stdio, and I keep adding it back in, because it is for the debugging printf's.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion for the message
192cf9d to
700c8be
Compare
700c8be to
bd9bc30
Compare
bd9bc30 to
aa5f474
Compare
definitely not for stable, as it introduces a deprecation
aa5f474 to
03027d6
Compare
Timon's idea on how to fix this - disallow constructors for stack allocation for operator new unless the constructor is
scope.