Win32 API Tango / using what ?
Tomas Lindquist Olsen
tomas at famolsen.dk
Thu Nov 15 08:20:26 PST 2007
Stewart Gordon wrote:
>
> I'm a little confused by this.
>
> ----------
> const int qwert = 42;
>
> enum {
> yuiop = 69
> }
> ----------
> Under DMD 1.023, the .obj file sizes are:
> - for an empty D file, 349
> - with just the const int, 396
> - with just the enum, 605
> - the whole thing, 652
>
> so they are generating some object code either way. Strange - I'd
> always been under the impression they didn't, but were expanded at
> compile-time and then discarded. D certainly ought to support purely
> compile-time symbolic constants. In 2.007, the whole testcase generates
> a 666-byte object file.
>
> Stewart.
>
Enums generate typeinfo, which is probably what you're seeing.
More information about the Digitalmars-d
mailing list