Hi list,
Problem: I have two typdef's statement, each type contains a pointer to
the other type ! Hmmm
typedef TMenuItem struct {
chartext[20];
TMenu *ptr;
void (*fptr)();
};
typedef TMenu struct {
uint8_t nb;
char
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
Hi List,
I must be missing something.
I can use symbols like __SREG__, __tmp_reg__ and __zero_reg__ in in-line
asm (e.g. push __tmp_reg__) but if I do the same in a pure assembly
file, the compiler complains with constant value required. How does one
access these symbols in the assembly file
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
Colin Wall schrieb:
Hi List,
I must be missing something.
I can use symbols like __SREG__, __tmp_reg__ and __zero_reg__ in in-line
asm (e.g. push __tmp_reg__) but if I do the same in a pure assembly
file, the compiler complains with constant value required. How does one
access these
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
11 matches
Mail list logo