[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/sys
Valeriy E. Ushakov wrote:
> On Wed, Sep 03, 2008 at 23:43:06 +0000, Gregory McGarry wrote:
>> Module Name: src
>> Committed By: gmcgarry
>> Date: Wed Sep 3 23:43:06 UTC 2008
>> Modified Files:
>> src/sys/sys: fstypes.h
>> Log Message:
>> Structures with incomplete members is an obscure gcc extension. Replace the
>> flexible array with a zero-length array. Now compiles on pcc with gcc
> What? It's not an obscure gcc extension, it's perfectly legal C99.
> Cf. 18.104.22.168 Structure and union specifiers
> [#16] As a special case, the last element of a structure
> with more than one named member may have an incomplete array
> type; this is called a flexible array member.
> Please, revert that commit.
I think greg's commit message was a little wrong. What is forbidden is to have
structs with flexible array members inside other structs, and that is the
problem here. Therefore greg changed it to a fixed size (of size 0, which is
really OK that either but at least it has a defined size :-)
Main Index |
Thread Index |