digitalmars.D.bugs - Assertion failure: module.c 470 - recursive/circular struct containment
- Stewart Gordon (25/25) Jan 12 2005 Using DMD 0.110, Windows 98SE.
- Thomas Kuehne (15/20) Jan 12 2005 -----BEGIN PGP SIGNED MESSAGE-----
- Russ Lewis (4/5) Jan 12 2005 Because structs are included by value. Thus, the size of the two
- Thomas Kuehne (17/20) Jan 12 2005 -----BEGIN PGP SIGNED MESSAGE-----
- Simon Buchan (11/32) Jan 14 2005 Have you tried it in C lately? (You're probabaly thinking of something
- Thomas Kuehne (13/31) Jan 14 2005 -----BEGIN PGP SIGNED MESSAGE-----
- Simon Buchan (5/37) Jan 14 2005 Err... the asterix was the whole point.
- Stewart Gordon (7/8) Jan 14 2005 What has René Goscinny's character to do with anything?
- Simon Buchan (7/12) Jan 14 2005 :P That would be _the_ Asterix. (Note capital letter)
- Russ Lewis (6/11) Jan 14 2005 Thomas, your last two messages in this thread have been (almost)
Using DMD 0.110, Windows 98SE. The compiler isn't properly catching structs that recursively contain themselves. ---------- struct Qwert { Qwert asdfg; } ---------- Assertion failure: '!deferred.dim' on line 470 in file 'module.c' ---------- after which the compiler hangs. The same happens if two structs circularly contain each other: ---------- struct Qwert { Yuiop asdfg; } struct Yuiop { Qwert hjkl; } ---------- DMD should detect the error and deliver an appropriate message. Stewart. -- My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.
Jan 12 2005
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Added to DStress as http://dstress.kuehne.cn/compile/struct_19.d http://dstress.kuehne.cn/compile/struct_20.d Stewart Gordon schrieb am Wed, 12 Jan 2005 10:29:57 +0000:The compiler isn't properly catching structs that recursively contain themselves.<snip>after which the compiler hangs. The same happens if two structs circularly contain each other:<snip>DMD should detect the error and deliver an appropriate message.Why should this be an error? Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFB5SU23w+/yD4P9tIRApbAAKDNXnPh/04+hD5l3V3/6cEVCAKB1ACdFVGy 2IUt4Sd9CHbFUGzEkh18+zM= =/uCw -----END PGP SIGNATURE-----
Jan 12 2005
Thomas Kuehne wrote:Why should this be an error?Because structs are included by value. Thus, the size of the two structs would be infinite. That's probably why the compiler is hanging - an infinite loop, trying to determine the size of the struct.
Jan 12 2005
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Russ Lewis schrieb am Wed, 12 Jan 2005 08:28:48 -0700:Thomas Kuehne wrote:http://www.digitalmars.com/d/struct.html ... moved test cases: http://dstress.kuehne.cn/nocompile/struct_19.d http://dstress.kuehne.cn/nocompile/struct_20.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFB5cWQ3w+/yD4P9tIRAtjtAJ4jSaJTNVVS6/HEwW4DajKT5w2ZvgCgir0v s7zq/Y8wICwCGoHFxY+3MjA= =6M6y -----END PGP SIGNATURE-----Why should this be an error?Because structs are included by value.
Jan 12 2005
On Thu, 13 Jan 2005 01:49:20 +0100, Thomas Kuehne <thomas-dloop kuehne.thisisspam.cn> wrote:-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Russ Lewis schrieb am Wed, 12 Jan 2005 08:28:48 -0700:Have you tried it in C lately? (You're probabaly thinking of something like: struct node { node* next; // something }; , forgive me if I'm being an idiot.) -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/Thomas Kuehne wrote:http://www.digitalmars.com/d/struct.html ... moved test cases: http://dstress.kuehne.cn/nocompile/struct_19.d http://dstress.kuehne.cn/nocompile/struct_20.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFB5cWQ3w+/yD4P9tIRAtjtAJ4jSaJTNVVS6/HEwW4DajKT5w2ZvgCgir0v s7zq/Y8wICwCGoHFxY+3MjA= =6M6y -----END PGP SIGNATURE-----Why should this be an error?Because structs are included by value.
Jan 14 2005
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Simon Buchan schrieb am Fri, 14 Jan 2005 21:23:39 +1300:On Thu, 13 Jan 2005 01:49:20 +0100, Thomas Kuehne <thomas-dloop kuehne.thisisspam.cn> wrote:Russ Lewis schrieb am Wed, 12 Jan 2005 08:28:48 -0700:Have you tried it in C lately? (You're probabaly thinking of something like:Thomas Kuehne wrote:moved test cases: http://dstress.kuehne.cn/nocompile/struct_19.d http://dstress.kuehne.cn/nocompile/struct_20.dWhy should this be an error?Because structs are included by value.struct node { node* next; // something };mind the asterix? struct node{ node next; }; Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFB544i3w+/yD4P9tIRAkj+AJ4kq3lvuoENSXqLLpM02+LAV/dB7ACgibZu 6eUPhpOipgJV06AqvTuhDZg= =8aCM -----END PGP SIGNATURE-----
Jan 14 2005
On Fri, 14 Jan 2005 10:17:22 +0100, Thomas Kuehne <thomas-dloop kuehne.thisisspam.cn> wrote:-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Simon Buchan schrieb am Fri, 14 Jan 2005 21:23:39 +1300:Err... the asterix was the whole point. -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/On Thu, 13 Jan 2005 01:49:20 +0100, Thomas Kuehne <thomas-dloop kuehne.thisisspam.cn> wrote:Russ Lewis schrieb am Wed, 12 Jan 2005 08:28:48 -0700:Have you tried it in C lately? (You're probabaly thinking of something like:Thomas Kuehne wrote:moved test cases: http://dstress.kuehne.cn/nocompile/struct_19.d http://dstress.kuehne.cn/nocompile/struct_20.dWhy should this be an error?Because structs are included by value.struct node { node* next; // something };mind the asterix? struct node{ node next; }; Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFB544i3w+/yD4P9tIRAkj+AJ4kq3lvuoENSXqLLpM02+LAV/dB7ACgibZu 6eUPhpOipgJV06AqvTuhDZg= =8aCM -----END PGP SIGNATURE-----
Jan 14 2005
Simon Buchan wrote: <snip>Err... the asterix was the whole point.What has René Goscinny's character to do with anything? Stewart. -- My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.
Jan 14 2005
On Fri, 14 Jan 2005 11:18:54 +0000, Stewart Gordon <smjg_1998 yahoo.com> wrote:Simon Buchan wrote: <snip>:P That would be _the_ Asterix. (Note capital letter) Not quite sure why the two main characters were named after a marker for special explination/emphasis and a phalic symbol of constructive skills. -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/Err... the asterix was the whole point.What has René Goscinny's character to do with anything? Stewart.
Jan 14 2005
Thomas Kuehne wrote:mind the asterix? struct node{ node next; };Thomas, your last two messages in this thread have been (almost) impossible for me to understand. However, guys, I think we can all conclude that Thomas understands the problem now. He *did*, after all, move the testcases to the "nocompile" set. Can we end this?
Jan 14 2005