[Bug 18] int foo[0] accept -- what's its semantics?

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 9 23:15:28 PST 2006


http://d.puremagic.com/bugzilla/show_bug.cgi?id=18


braddr at puremagic.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
          Component|DMD                         |www.digitalmars.com
         Resolution|INVALID                     |




------- Comment #2 from braddr at puremagic.com  2006-03-10 01:15 -------
The semantics of a 0 length array needs to be well documented here:

    http://www.digitalmars.com/d/arrays.html

Even with the goal of supporting variable structs, the static bounds checking
that's done (see the bounds errors in the original description), I'm not sure
how usable it is right now.

I can certainly make gdc internally allocate it as if it was int[1], but that's
not what this entry is about.  It's to clarify/define the exact behaviors.


-- 




More information about the Digitalmars-d-bugs mailing list