Use a struct tag, rather than the typdef tag for your storage type, as:
typedef struct _TMenu
{
...
struct _TMenuItem items[];
}
TMenu;
typedef struct _TMenuItem
{
...
struct _TMenu *ptr;
...
}
MenuItem;
-Original Message-
Subject: [avr-gcc-list]
On Wed, 21 Jan 2009 09:14:39 -0700
larry barello la...@barello.net wrote:
Use a struct tag, rather than the typdef tag for your storage type, as:
Thanks Larry.
--
Vince
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
larry barello wrote:
Use a struct tag, rather than the typdef tag for your storage type, as:
typedef struct _TMenu
{
...
struct _TMenuItem items[];
}
TMenu;
typedef struct _TMenuItem
{
...
struct _TMenu *ptr;
...
}
MenuItem;
BTW, avr-gcc complains
On Wed, 21 Jan 2009 09:33:43 -0800
Dean Ferreyra dferre...@igc.org wrote:
Also, Vince, do you really mean to use a flexible array for the
items field; i.e., leaving the size of items unspecified?
Yes.. well it's just out of convenience really. When I
define/initialise a structure of that type,
Vincent Trouilliez wrote:
On Wed, 21 Jan 2009 09:33:43 -0800
Dean Ferreyra dferre...@igc.org wrote:
Also, Vince, do you really mean to use a flexible array for the
items field; i.e., leaving the size of items unspecified?
Yes.. well it's just out of convenience really. When I
On Wed, 21 Jan 2009 10:14:03 -0800
Dean Ferreyra dferre...@igc.org wrote:
Vincent Trouilliez wrote:
On Wed, 21 Jan 2009 09:33:43 -0800
Dean Ferreyra dferre...@igc.org wrote:
Also, Vince, do you really mean to use a flexible array for the
items field; i.e., leaving the size of items
On Wed, 21 Jan 2009 16:41:37 -0700
larry barello la...@barello.net wrote:
You can't make a flexible typdef. If you did that the compiler would
Ops yes, might be, don't know because to solve my problem I have been
suggested to not use Typedef. Dunnon why I wanted to make a Type ouf of
my
Hi guys,
On Wed, Jan 21, 2009 at 3:41 PM, larry barello la...@barello.net 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