4 ms·
Such uninitialized arrays in Structs are C99 standard. https://en.wikipedia.org/wiki/Flexible_array_member https://en.wikipedia.org/wiki/Flexible_array_member
by FrozenVoid 7y ago
Such uninitialized arrays in Structs are C99 standard.
https://en.wikipedia.org/wiki/Flexible_array_member https://en.wikipedia.org/wiki/Flexible_array_member
- kzrdude 7y agoThat's a separate thing, though
- kazinator 7y agoThis is not a member; it's a file-scope variable with external linkage. extern int array[]; goes back to ANSI C89 and earlier.
- kazinator 7y agoYou know, a shared library system with special declaration specifiers to indicate shared symbols (think: Microsoft's__declspec(dllimport)) would be entirely acceptable. I could live with it. Sure, it's less convenient if you're compiling the same code both ways or converting. That would address situations like this. Arrays that live in one object only wouldn't be exported and could be accessed using the faster instruction sequence within that object. Arrays exported for sharing would be referred through the global offset table using the slower machine sequence, without having to be copied.