-
-
Notifications
You must be signed in to change notification settings - Fork 608
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 23900 - @safe is allowed in inline asm #15192
Conversation
|
Thanks for your pull request and interest in making D better, @ntrel! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. 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#15192" |
compiler/src/dmd/statementsem.d
Outdated
| @@ -3593,7 +3593,9 @@ Statement statementSemanticVisit(Statement s, Scope* sc) | |||
| cas.error("`asm` statement is assumed to be impure - mark it with `pure` if it is not"); | |||
| if (!(cas.stc & STC.nogc) && sc.func.setGC(cas.loc, "`asm` statement in %s `%s` is assumed to use the GC - mark it with `@nogc` if it does not")) | |||
| cas.error("`asm` statement is assumed to use the GC - mark it with `@nogc` if it does not"); | |||
| if (!(cas.stc & (STC.trusted | STC.safe))) | |||
| if (cas.stc & STC.safe) | |||
| cas.error("`asm` statement cannot be marked `@safe`, use `@system` or `@trusted` instead"); | |||
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.
Deprecation first
|
@ntrel Check this
|
|
Do we really have to wait for D2.114 to deprecate this? This is not a feature by any means, this is a mistake of whoever implemented those checks from the beginning |
Well they did write a test for |
It's a deprecation starting with the next release. At 2.114 is will become an error. |
|
This deprecation maybe should be in the changelog? |
Closing of the bug will be in the changelog. It gets added automatically. |
No description provided.