[Issue 5997] Static arrays with 0 length accepted by compiler
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat May 14 03:02:05 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5997
bearophile_hugs at eml.cc changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bearophile_hugs at eml.cc
--- Comment #2 from bearophile_hugs at eml.cc 2011-05-14 02:57:56 PDT ---
One use case are variable-length structs:
struct MyArray(T) {
size_t len;
T data[0];
// access methods here, that use data.offsetof
}
You create such array with a C malloc or GC malloc.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list