[cfe-dev] clang does not support extern for OpenCL

Tanya Lattner lattner at apple.com
Mon Apr 15 10:39:50 PDT 2013


On Apr 12, 2013, at 5:54 PM, Richard Smith <richard at metafoo.co.uk> wrote:

> It'd be useful to mention this in the diagnostic. How about
> 
>    'extern' storage class specifier is an OpenCL 1.2 extension
> 

Sure. I can change this.

> ... and downgrading this from an Error to an ExtWarn?

I wouldn't mind this being a warning instead. Technically the CL spec says its not supported, but I don't think it says it MUST be an error.

-Tanya

> 
> On Fri, Apr 12, 2013 at 3:01 PM, Tanya Lattner <lattner at apple.com> wrote:
> You need to set the cl-std value to 1.2. By default its 1.1.
> 
> -Tanya
> 
> On Apr 12, 2013, at 2:40 PM, "Liu, Yaxun (Sam)" <Yaxun.Liu at amd.com> wrote:
> 
>> I was trying to compile a simple OpenCL source with clang:
>>  
>> extern int foo(int, int);
>>  
>> I got an error msg:
>>  
>> clang.exe : tmp.cl:1:1: error: OpenCL does not support the 'extern' storage class specifier
>>  
>> OpenCL spec 1.2 says:
>> The typedef, extern, and static storage-class specifiers are supported. 
>>  
>> Is this a bug? Or did I miss anything? Thanks.
>>  
>> Sam
>>  
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
> 
> 
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130415/f617edb2/attachment.html>


More information about the cfe-dev mailing list