Thread overview |
---|
April 25, 2006 [Bug 18] int foo[0] accept -- what's its semantics? | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/bugzilla/show_bug.cgi?id=18 braddr@puremagic.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Component|www.digitalmars.com |glue layer Product|D |GDC Resolution|FIXED | Version|0.148 |0.17 ------- Comment #4 from braddr@puremagic.com 2006-04-24 21:23 ------- Moving this bug over to gdc since the segv is still there and needs to be resolved. -- |
April 25, 2006 [Bug 18] int foo[0] accept -- what's its semantics? | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/bugzilla/show_bug.cgi?id=18 braddr@puremagic.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bugzilla@digitalmars.com |braddr@puremagic.com Status|REOPENED |NEW -- |
May 09, 2006 [Bug 18] int foo[0] accept -- what's its semantics? | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/bugzilla/show_bug.cgi?id=18 smjg@iname.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |smjg@iname.com ------- Comment #5 from smjg@iname.com 2006-05-09 09:59 ------- "A static array with a dimension of 0 is allowed, but no space is allocated for it. It's useful as the last member of a variable length struct, or as the degenerate case of a template expansion." Still could be improved. If it's the degenerate case of a template expansion, then you'd want the bounds checking to be still active. If OTOH you're using it to make a variable length struct, then you'd want there to be no bounds checking ... unless the intention is to force the programmer to write array.ptr[42] instead of array[42]. So, are zero-length static arrays bounds-checked or not? -- |
Copyright © 1999-2021 by the D Language Foundation