[cfe-dev] clang does not support extern for OpenCL
jordan_rose at apple.com
Mon Apr 15 11:14:08 PDT 2013
On Apr 15, 2013, at 11:10 , Tanya Lattner <lattner at apple.com> wrote:
> On Apr 15, 2013, at 10:56 AM, Jordan Rose <jordan_rose at apple.com> wrote:
>> On Apr 15, 2013, at 10:53 , Tanya Lattner <lattner at apple.com> wrote:
>>> On Apr 15, 2013, at 10:44 AM, Jordan Rose <jordan_rose at apple.com> wrote:
>>>> I'm not familiar with the OpenCL part of the compiler, but I'm pretty sure you're not supposed to invoke -cc1 mode directly, just like the C compiler. The right way to do this is with the usual -std option:
>>>> clang -std=cl1.2 tmp.cl
>>>> This ensures that all the other driver-specified options get handled appropriately.
>>> I agree that you shouldn't use -cc1, but -cl-std= should be a driver level option. If not, then it should be fixed.
>> It seems it isn't, but why not -std? We already use this to refer to both the C and C++ standards.
> I totally agree with you, but I did not write the OpenCL Spec and I have no idea why they decided they needed another std option.
Ah, I didn't realize the command-line interface was specified by the standard. My bad.
> Its not a high priority to me to change it to be a driver level option, but someone else might complain (and they can fix it).
Since we are unlikely to have a separate openclc driver tool anytime soon, this does seem like the right way to go.
Thanks for the explanation,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev