October 14, 2005
I hear than Digital Mars D compiler using OPTLINK linker, and it have
optimization. But when i compile app even with -release and -O switches, then
text constants present in result exe at least twice.
Compile this 2 lines

const char[] TXT = "1a2b3\n";
void main() { printf(TXT);}

and you can see "1a2b3" string in exe 2 times. For what? Can i enable some other switches to more optimized code?

Thanx.


October 15, 2005
"novice2" <novice2_member@pathlink.com> wrote in message news:dinsbb$2hgt$1@digitaldaemon.com...
> I hear than Digital Mars D compiler using OPTLINK linker, and it have optimization. But when i compile app even with -release and -O switches,
then
> text constants present in result exe at least twice. Compile this 2 lines
>
> const char[] TXT = "1a2b3\n";
> void main() { printf(TXT);}
>
> and you can see "1a2b3" string in exe 2 times. For what? Can i enable some
other
> switches to more optimized code?

Take the 'const' off and it should only appear once.