Should all enums be immutable?

Simen kjaeraas simen.kjaras at gmail.com
Wed Apr 6 11:40:37 PDT 2011


On Wed, 06 Apr 2011 18:30:43 +0200, Trass3r <un at known.com> wrote:

> Am 06.04.2011, 17:27 Uhr, schrieb Don <nospam at nospam.com>:
>> No. It's just a workaround for an optlink bug: manifest constants that  
>> are never used, still get put into the executable.
>
> What?

Yup. In theory, any immutable Foo declared at module scope (and likely
also those at static class/struct scope) could be elided by the linker
if it not used anywhere, but Optlink does not do that.

That means of course, that pointer manipulation to get from one manifest
constant to another declared right after is not supported (nor should it
be *shudder*).

-- 
Simen


More information about the Digitalmars-d mailing list