Re: Propagating attributes for to structure elements (needed for different address spaces)

2005-04-26 Thread James E Wilson
Martin Koegler wrote: typedef struct x ax __attribute__ ((eeprom)); void test1(ax* x) One possible solution is to change your syntax. eeprom is supposed to be an attribute that applies to a decl. You are using a trick here to apply it to a type via a typedef, which takes advantage of the fact t

Re: Propagating attributes for to structure elements (needed for different address spaces)

2005-04-25 Thread Joseph S. Myers
On Mon, 25 Apr 2005, Martin Koegler wrote: > As I don't know DTR18037 and have no access to it (even Google finds nothing > useable about it), I > cannot say something about it. The current version is WG14 N1095 . It's the standard wa

Re: Propagating attributes for to structure elements (needed for different address spaces)

2005-04-25 Thread Martin Koegler
On Mon, Apr 25, 2005 at 03:22:31PM +, Joseph S. Myers wrote: > On Mon, 25 Apr 2005, Martin Koegler wrote: > > > The solution would be to add also for the base type of an array the > > eeprom attribute. Additonally all elements of structures and unions must > > also have the eeprom attribute

Re: Propagating attributes for to structure elements (needed for different address spaces)

2005-04-25 Thread Joseph S. Myers
On Mon, 25 Apr 2005, Martin Koegler wrote: > The solution would be to add also for the base type of an array the > eeprom attribute. Additonally all elements of structures and unions must > also have the eeprom attribute added. The solution is to implement DTR18037 named address spaces. Natura

Propagating attributes for to structure elements (needed for different address spaces)

2005-04-25 Thread Martin Koegler
My current aproach, checking for the eeprom attribute in the GCC calculated types, is not sufficient in some situations: struct y1 { int x; }; struct x { struct y1 y; }; typedef struct x ax __attribute__ ((eeprom)); void test1(ax* x) { x->y.x=1; } In this case, while expanding x->y.x=1, the type o