Geoff Clare wrote: > We can't require d_name in struct dirent to be a VLA since there are > implementations where it is not.
Another good reason is that standard C does not allow structure members to be VLAs. C11 6.7.2.1#9 "A member of a structure or union may have any complete object type other than a variably modified type." If implementations that define d_name as a VLA do in fact exist, they'd have to use some strange compiler extension. (GCC does allow VLAs in structures, but only when the struct is defined inside a function -- a typedef in a header will not work.) A structure member can be a "flexible array" in standard C, but that's not the same thing as a VLA. ---------------------------------------------------------------------- This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.
