[Openmp-dev] The z specifier in %zu is silently accepted (although unsupported) in the device code and does not work

Itaru Kitayama via Openmp-dev openmp-dev at lists.llvm.org
Thu Mar 5 11:55:59 PST 2020


So I was wishing if Clang understands that and
Is changed to not suggest using the zu at all in the device code.

On Fri, Mar 6, 2020 at 4:54 Itaru Kitayama <itaru.kitayama at gmail.com> wrote:

> Alexey
> CUDA dorms implement that, and on POWER8
> it just doesn’t work (prints out plain “%zu” literally).
>
> On Fri, Mar 6, 2020 at 0:45 Alexey.Bataev <a.bataev at outlook.com> wrote:
>
>> What's wrong with the z specifier? It works as it should. Why is it
>> unsupported?
>>
>> -------------
>> Best regards,
>> Alexey Bataev
>>
>> 05.03.2020 5:44 AM, Itaru Kitayama via Openmp-dev пишет:
>>
>> Can Clang warn on the wrong use at build time?
>>
>> When a developer writes code like below and build?
>>
>> #include <iostream>
>> int main()
>> {
>>         size_t my_sz = 123;
>> #pragma omp target parallel for map(to: my_sz)
>>     for (int i=0;i<1;i++) {
>>         printf("%zu, %d\n", my_sz, my_sz);
>>     }
>> }
>>
>> _______________________________________________
>> Openmp-dev mailing listOpenmp-dev at lists.llvm.orghttps://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20200306/8669ffdc/attachment.html>


More information about the Openmp-dev mailing list