Are there any options that will cause dmc not to generate string constants when
they are not used? In my project, I have lots of debugging code, which is all
gone for release builds, but debugging messages are still present in final
executable. I.e. I want "Hello, world." not to be generated from the following
program(simplified).
#ifdef LOGGING
void log(const char *s)
{
printf("%s\n");
}
#else
inline void log(const char *s)
{
}
#endif
int main()
{
log("Hello, world");
return 0;
}

You may want to look up function-level linkage in the manual.
Nicolay Haustov wrote:

Are there any options that will cause dmc not to generate string constants when
they are not used? In my project, I have lots of debugging code, which is
all
gone for release builds, but debugging messages are still present in final
executable. I.e. I want "Hello, world." not to be generated from the following
program(simplified).
#ifdef LOGGING
void log(const char *s)
{
printf("%s\n");
}
#else
inline void log(const char *s)
{
}
#endif
int main()
{
log("Hello, world");
return 0;
}

Thanks for response.
I had a feeling that this option(-Nc) only helps eliminate unused functions.
This is not a problem: all debugging code is gone from final executable.
However, all debug messages are still present.
And indeed, it seems to have no effect(just tried).