This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: C and zero-sized arrays - what is the standard?
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: Alexandre Courbot <Alexandre dot Courbot at lifl dot fr>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Thu, 18 Sep 2003 14:27:25 +0100
- Subject: Re: C and zero-sized arrays - what is the standard?
- Organization: Codesourcery LLC
- References: <200309181352.27263.Alexandre.Courbot@lifl.fr>
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