Hello there. Sorry to chime in after all the time, but I just wanted to clear this one up:
On 11 Apr 2014, at 16:10, Alexander Burger <a...@software-lab.de> wrote: > [...] Still, I can't understand why clang doesn't support variable-sized > structures. We discussed about that about two years ago, when I got interested in picoLisp and posted here a warning about Apple going to ditch GCC for Clang. Dynamically-sized arrays in structures are a long-time GCC extension, but C99 explicitly forbids them (cfr. p6.7.2.1 in C99 standard document). The Clang compiler manual has more to say about it (quoting): <<clang does not support the gcc extension that allows variable-length arrays in structures. This is for a few reasons: one, it is tricky to implement, two, the extension is completely undocumented, and three, the extension appears to be rarely used. Note that clang does support flexible array members (arrays with a zero or unspecified size at the end of a structure).>> (from http://clang.llvm.org/docs/UsersManual.html#intentionally-unsupported-gcc-extensions) Luckily, it is possible to translate variable-sized fields in picoLisp/32bit source code to flexible array members. I wrote a patch for picoLisp (32bit) two years ago but since then I lost interested in the project and I'm not sure it's still applicable to the current source. Happy hacking! Ciao, Illo.-- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe