RFC embedded c proposal

Paolo Bonzini bonzini@gnu.org
Thu Apr 29 11:57:00 GMT 2004


> b) Declare an __attribute__, e.g. __attribute__((progmem)), that will 
> become a part of the type decleration:
> 
>     __attribute__((progmem)) char a, b, c;  // Works today in GCC
> 
>     __attribute__((progmem)) int *p;        // Does not work
> 
> 
> Which of these two methods would be best suited for gcc?

I think this one; then if you want you can use builtin_define in the 
target's TARGET_CPU_CPP_BUILTINS #define, to define _Progmem to be 
__attribute__ ((progmem)).  This is how AltiVec works, at least.

Paolo



More information about the Gcc mailing list