Bug 18404 – Allow selective printing of -vgc output

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-02-08T23:48:41Z
Last change time
2024-12-13T18:56:57Z
Assigned to
No Owner
Creator
Lance Bachmeier
Moved to GitHub: dmd#19386 →

Comments

Comment #0 by lance — 2018-02-08T23:48:41Z
It is not practical to use -vgc to catch accidental gc allocations. Based on this post: https://www.reddit.com/r/programming/comments/7vw0gj/vanquish_forever_these_bugs_that_blasted_your/dtygfde/ "If you use no GC at all, anywhere, it can be helpful, yes. If you rarely use GC (e.g: when throwing exceptions, because D makes it very inconvenient not to use GC there, and it's less important), then you will always get that as noise that's hard to filter out." The user should have a way to exclude printing of some of the warnings.
Comment #1 by eyal — 2018-02-09T19:41:58Z
That's a great idea. If there was: * a way to white-list a specific piece of code to avoid -vgc, e.g: explicit @gc are filtered from -vgc, or maybe via -vimplicit_gc (that excludes @gc code) * a way to make -vimplicit_gc outputs compilation errors Then we could explicitly white-list specific GC code instead of black-listing GC almost *everywhere*.
Comment #2 by robert.schadek — 2024-12-13T18:56:57Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19386 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB