This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C and zero-sized arrays - what is the standard?


Alexandre Courbot wrote:
Hi everybody,

Consider the following code:

struct MyStruct
{
    int a;
    int b[];
};

Is there a portable way to do this? What is the right form according to the standards?
C99 blesses '[]', calling it a flexible array member [6.7.2.1]/16

nathan

--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
         The voices in my head said this was stupid too
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]