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