digitalmars.D.bugs - Scoping bug with offsetof?
- brad beveridge (26/26) Apr 25 2005 I think I may have found a bug - well it is certainly something :)
- Brad Beveridge (3/35) Apr 25 2005 Note - this bug also happens with Foo.a.sizeof
- Thomas Kuehne (16/50) Apr 26 2005 -----BEGIN PGP SIGNED MESSAGE-----
I think I may have found a bug - well it is certainly something :) The following code causes an error with DMD 0.121 on Linux The error is "error.d(12): this for a needs to be type Foo not type Bar *" This is a regression, the DMD 0.112 (I think?) allowed this code. Thanks Brad <code> import std.stdio; struct Foo { float a; } struct Bar { void test() { writefln(Foo.a.offsetof); // comment this line in/out } } int main(char[][] arg) { writefln(Foo.a.offsetof); return 0; } </code>
Apr 25 2005
brad beveridge wrote:I think I may have found a bug - well it is certainly something :) The following code causes an error with DMD 0.121 on Linux The error is "error.d(12): this for a needs to be type Foo not type Bar *" This is a regression, the DMD 0.112 (I think?) allowed this code. Thanks Brad <code> import std.stdio; struct Foo { float a; } struct Bar { void test() { writefln(Foo.a.offsetof); // comment this line in/out } } int main(char[][] arg) { writefln(Foo.a.offsetof); return 0; } </code>Note - this bug also happens with Foo.a.sizeof Brad
Apr 25 2005
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Brad Beveridge schrieb am Tue, 26 Apr 2005 11:48:15 +1200:brad beveridge wrote:Added to DStress as http://dstress.kuehne.cn/run/offsetof_78.d http://dstress.kuehne.cn/run/offsetof_79.d http://dstress.kuehne.cn/run/offsetof_80.d http://dstress.kuehne.cn/run/sizeof_13.d http://dstress.kuehne.cn/run/sizeof_14.d http://dstress.kuehne.cn/run/sizeof_15.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFCbivs3w+/yD4P9tIRAgMdAJ0TyLMP20aZsCDMlAkSmtT54EDIBACfUJHW wElkecIAH8H6Adv2cfCkO48= =6vFZ -----END PGP SIGNATURE-----I think I may have found a bug - well it is certainly something :) The following code causes an error with DMD 0.121 on Linux The error is "error.d(12): this for a needs to be type Foo not type Bar *" This is a regression, the DMD 0.112 (I think?) allowed this code. Thanks Brad <code> import std.stdio; struct Foo { float a; } struct Bar { void test() { writefln(Foo.a.offsetof); // comment this line in/out } } int main(char[][] arg) { writefln(Foo.a.offsetof); return 0; } </code>Note - this bug also happens with Foo.a.sizeof
Apr 26 2005