// Zero characters are repeated in compiled EXE.
char *value1 = "0", *value2 = "0";
char *value3 = "0", *value4 = "1";
// Zero character only appears once in data.
char *ZERO = "0"; char *ONE = "1";
char *value1 = ZERO, *value2 = ZERO;
char *value3 = ZERO, *value4 = ONE;
Is there a reason why duplicate string entries wouldn't be optimized and all point to the same data? Those character arrays shouldn't be editable in the first place (although they were in VC++ 5.0 and lesser), so i'm kind curious why that sort of optimization is absent. I know Java does it.
EDIT: Compiling in Release Mode, not Debug.