debug = x overrides command line

via Digitalmars-d digitalmars-d at puremagic.com
Wed Oct 22 04:30:40 PDT 2014


On Wednesday, 22 October 2014 at 11:13:35 UTC, Marco Leise wrote:
> You might be surprised that -debug doesn't enable anything
> special. It is just a shortcut for setting the debug level to
> 1 (a shortcut for -debug=1). Likewise debug statements are a
> shortcut for debug(1) {…}. This is also analogous to -version.

On a related note, how do you provide multiple execution paths 
based on cpuid without making the code dirty?

In C I guess a trick would simply be to recompile the compilation 
unit twice with different settings and a macro definition on the 
command line to change the function name.

This is relevant for code where you want to provide a single 
binary for various CPU generations (AVX512, SSE, MMX)…


More information about the Digitalmars-d mailing list