Bug 16492 – support @nogc in debug{} blocks

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-09-14T02:39:51Z
Last change time
2018-02-14T19:42:22Z
Keywords
pull
Assigned to
No Owner
Creator
Manu

Comments

Comment #0 by turkeyman — 2016-09-14T02:39:51Z
I'm having a lot of trouble debugging @nogc functions. I have a number of debug functions that use GC, but I can't call them from @nogc code... should debug{} allow @nogc calls, the same as impure calls? Does this problem also extend to @safe? (I haven't encountered it, but I expect the same problem exists?)
Comment #1 by dev — 2016-09-14T09:32:54Z
Perhaps take a look at ignoring `pure` in debug blocks too.
Comment #2 by turkeyman — 2016-09-14T10:26:10Z
It already does that... no?
Comment #3 by greensunny12 — 2018-02-09T09:13:50Z
> It already does that... no? Yes, it does, but not for @nogc, @safe or nothrow.
Comment #4 by turkeyman — 2018-02-09T18:32:20Z
Well, maybe it should...
Comment #5 by greensunny12 — 2018-02-13T00:08:08Z
All it took to do was _one_ line: https://github.com/dlang/dmd/pull/7882 We could have fixed this a lot earlier...
Comment #6 by github-bugzilla — 2018-02-14T08:59:38Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/c582e10d3bb4c270a682c583dbc53f5d2f4dfc13 Fix Issue 16492 - support @nogc in debug{} blocks https://github.com/dlang/dmd/commit/56940531b005903a90ecaf0314e9198812bc69db Merge pull request #7882 from wilzbach/fix-16492 Fix Issue 16492 - support @nogc in debug{} blocks
Comment #7 by turkeyman — 2018-02-14T19:42:22Z
/dance