Hello everyone,

Please consider the following snippet:
immutable ubyte[] array1 = [ 1, 2, 3, 4 ];
immutable ubyte[] array2 = cast(immutable ubyte[]) x"01 02 03 04";

Examining the resulting code, it is obvious that the literals initializing array2 are stored in the read only segment (.rodata), as they should be. It is equally obvious that array1 is stored in the data segment.

This is bad for a variety of reasons.

Is this a know issue?

Shachar

Reply via email to