[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 02:44:59 PST 2020


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);
    }
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20200305/3a3eceaf/attachment.html>


More information about the Openmp-dev mailing list