Can there be a flag/setting for DM to throw warnings whenever it detects completely unused/dead procs? It would help with optimizing certain projects heavily as currently those functions are still compiled into the final dmb.
It could be implemented the same way DEBUG is implemented, as a flag in the .dme
#define WARN_UNUSED_PROCS
or as a compiler flag, like -wunused-proc
ID:2902953
Dec 7 2023, 7:26 pm
|
|||||||
| |||||||
Jan 3, 7:48 pm
|
|
++
|
Personally, if this was implemented and I turned it on in a project and I had a proc that I only called dynamically, I'd be fine seeing a warning that it's unused. I can't expect the compiler to be smart enough to know that I'm calling a proc dynamically.
|
In response to Spevacus
|
|
Spevacus wrote:
I'd be fine seeing a warning that it's unused. I suppose you could do
#pragma ignore unused_proc
I can't expect the compiler to be smart enough to know that I'm calling a proc dynamically. I could expect it for trivial cases where you're not doing runtime string-building of the proc name. |