[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:
<http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Zero-Length.html#Zero-Length>
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
http://www.DaveHylands.com/
- [avr-gcc-list] Typdef chick 'n egg situation.. way out ?, Vincent Trouilliez, 2009/01/21
- RE: [avr-gcc-list] Typdef chick 'n egg situation.. way out ?, larry barello, 2009/01/21
- Re: [avr-gcc-list] Typdef chick 'n egg situation.. way out ?, Vincent Trouilliez, 2009/01/21
- Re: [avr-gcc-list] Typdef chick 'n egg situation.. way out ?, Dean Ferreyra, 2009/01/21
- Re: [avr-gcc-list] Typdef chick 'n egg situation.. way out ?, Vincent Trouilliez, 2009/01/21
- Re: [avr-gcc-list] Typdef chick 'n egg situation.. way out ?, Dean Ferreyra, 2009/01/21
- Re: [avr-gcc-list] Typdef chick 'n egg situation.. way out ?, Vincent Trouilliez, 2009/01/21
- RE: [avr-gcc-list] Typdef chick 'n egg situation.. way out ?, larry barello, 2009/01/21
- Re: [avr-gcc-list] Typdef chick 'n egg situation.. way out ?, Vincent Trouilliez, 2009/01/21
- Re: [avr-gcc-list] Typdef chick 'n egg situation.. way out ?,
Dave Hylands <=
- RE: [avr-gcc-list] Typdef chick 'n egg situation.. way out ?, Schwichtenberg, Knut, 2009/01/22