[cfe-dev] Clang and OpenCL address spaces

John McCall rjmccall at apple.com
Mon Oct 18 10:43:24 PDT 2010


On Oct 18, 2010, at 10:33 AM, Peter Collingbourne wrote:
>> From my understanding of the OpenCL specification, setting the address
> space on an automatic variable is supposed to not only change the
> address space but also make the variable static (as the term is defined
> in standard C).  Adding 'static' to the qualifier macro definitions
> won't work too well because the qualifiers can also appear in other
> places.

If that's how OpenCL is specified to work, then changing the front-end to
automatically add 'static' to local variables of address-space-qualified type
is a very reasonable solution.  We would accept a patch for this.

John.



More information about the cfe-dev mailing list