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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx    ::     http://www.planetfall.pwp.blueyonder.co.uk



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux