This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Add named address support to GCC 4.5
On Apr 19, 2009, at 9:16 PM, Ben Elliston wrote:
On Fri, 2009-04-17 at 09:58 -0700, Chris Lattner wrote:
Out of curiosity, what is the motivation for making these actual
keywords? Clang has support for address spaces as well, and clients
that use them just install a predefine that expands to an attribute.
For example, cellspu could install:
#define __ea __attribute__((address_space(1)))
Which enables, stuff like:
int __ea *P;
Won't the attribute apply to the whole type? We want to be able to
a multiplicity of types like:
int __ea *p;
int * __ea p;
No, attribute address_space is parsed as part of type-qualifier-list
(and apply to types, not decls), which means that things like:
int __attribute__((address_space(1))) *
__attribute__((address_space(2))) *__attribute__((address_space(3))) P;
Do what you'd expect.