[Top][All Lists]

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

Re: [avr-gcc-list] Typdef chick 'n egg situation.. way out ?

From: Dave Hylands
Subject: Re: [avr-gcc-list] Typdef chick 'n egg situation.. way out ?
Date: Wed, 21 Jan 2009 16:19:00 -0800

Hi guys,

On Wed, Jan 21, 2009 at 3:41 PM, larry barello <address@hidden> wrote:
> You can't make a "flexible" typdef.  If you did that the compiler would have
> multiple definitions for various instances of the typedef and get horribly
> confused.

Actually, with gcc you can. gcc supports the notion of a zero-length
array. You can read about this from the user manual:

Apparently ISO C99 does in fact support flexible arrays, so if you
pass in the approriate options to gcc, you should be able to use the
iso C99 syntax as well.

Now, in either case, the sizeof operator won't give the correct results.

Dave Hylands
Shuswap, BC, Canada

reply via email to

[Prev in Thread] Current Thread [Next in Thread]