digitalmars.D.bugs - version (foo) :
- Carlos Santander B. (40/44) Oct 06 2004 version(linux):
- Thomas Kuehne (3/3) Oct 08 2004 added to dstress as
"version (anything) :" (notice the colon) doesn't seem to work. (some outputs removed)more test.dversion(linux): void foo () {}dmd -c test.d lib -l test.obj more test.lstPublics by name module _D4test3fooFZv test Publics by module test _D4test3fooFZvThat on Windows. On Linux, it's similar. Changing version(linux) for version(Windows): $ dmd -c test.d $ obj2asm test.d -ctest.asm $ cat test.asm FLAT group public _D4test3fooFZv .text segment assume CS:.text .text ends .data segment .data ends .bss segment .bss ends .rodata segment .rodata ends .gnu.linkonce.t_D4test3fooFZv segment assume CS:.gnu.linkonce.t_D4test3fooFZv _D4test3fooFZv: 55 push EBP 8B EC mov EBP,ESP 5D pop EBP C3 ret .gnu.linkonce.t_D4test3fooFZv ends end $ So dmd is ignoring version, thus including foo in the .obj (.o). version(linux) { void foo() {} } or version(linux) void foo () { } work fine, though. ----------------------- Carlos Santander Bernal
Oct 06 2004
added to dstress as svn://svn.kuehne.cn/dstress/compile/version_09.d Thomas
Oct 08 2004