<div dir="ltr"><div>Hi, Openmp devs:</div><div><br></div><div>When I compiled Openmp with clang-cl(self-build-from-v11.01), three errors were triggered by the compiler. </div><div>These errors all happened in KF_TRACE, for <b>printf the flag value with type std::atomic<unsigned int> </b></div><div><b>but using unnecessary `flag->get() then get pointer value`; </b>and for the second error, <b>printf used format</b></div><div><b>%d for unsigned value</b>.</div><div><br></div><div>Patch is given in the attached file, and the compile error message is listed below.</div><div> </div><div>Thanks for your hard work.</div><div><br></div><div>Joseph Shen.</div><div><br></div><div>--------------------------------------------------------------------------------------------------------------------------------</div><div><br></div>[1/2] Building CXX object projects\openmp\runtime\src\CMakeFiles\omp.dir\z_Windows_NT_util.cpp.obj<br>FAILED: projects/openmp/runtime/src/CMakeFiles/omp.dir/z_Windows_NT_util.cpp.obj<br>T:\llvm_dist_s6\bin\clang-cl.exe  .... -c -- T:\llvm-project-11.0.1.src\openmp\runtime\src\z_Windows_NT_util.cpp<br><br><div> ----  ERROR  1 ---    </div><div></div><br>T:\llvm-project-11.0.1.src\openmp\runtime\src\z_Windows_NT_util.cpp(384,38): error: call to deleted constructor of 'std::atomic<unsigned int>'<br>               th_gtid, flag->get(), *(flag->get())));<br>                                     ^~~~~~~~~~~~~~<br>T:\llvm-project-11.0.1.src\openmp\runtime\src/kmp_debug.h(103,24): note: expanded from macro 'KF_TRACE'<br>    __kmp_debug_printf x;                                                      \<br>                       ^<br>T:\llvm-project-11.0.1.src\openmp\runtime\src\z_Windows_NT_util.cpp(446,3): note: in instantiation of function template specialization '__kmp_suspend_template<kmp_flag_32>' requested here<br>  __kmp_suspend_template(th_gtid, flag);<br>  ^<br>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\atomic(2165,5): note: 'atomic' has been explicitly marked deleted here<br>    atomic(const atomic&) = delete;<br>    ^<div>   ----  ERROR  2 ---     </div><div><br>T:\llvm-project-11.0.1.src\openmp\runtime\src\z_Windows_NT_util.cpp(244,41): error: call to deleted constructor of 'std::atomic<unsigned int>'<br>                    flag->get(), old_f, *(flag->get())));<br>                                        ^~~~~~~~~~~~~~<br>T:\llvm-project-11.0.1.src\openmp\runtime\src/kmp_debug.h(103,24): note: expanded from macro 'KF_TRACE'<br>    __kmp_debug_printf x;                                                      \<br>                       ^<br>T:\llvm-project-11.0.1.src\openmp\runtime\src\z_Windows_NT_util.cpp(414,9): note: in instantiation of function template specialization '__kmp_win32_cond_wait<kmp_flag_32>' requested here<br>        __kmp_win32_cond_wait(&th->th.th_suspend_cv, &th->th.th_suspend_mx, th,<br>        ^<br>T:\llvm-project-11.0.1.src\openmp\runtime\src\z_Windows_NT_util.cpp(446,3): note: in instantiation of function template specialization '__kmp_suspend_template<kmp_flag_32>' requested here<br>  __kmp_suspend_template(th_gtid, flag);<br>  ^<br>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\atomic(2165,5): note: 'atomic' has been explicitly marked deleted here<br>    atomic(const atomic&) = delete;<br>    ^<br> ----  ERROR  3 ---    </div><div><br>T:\llvm-project-11.0.1.src\openmp\runtime\src\z_Windows_NT_util.cpp(491,62): error: call to deleted constructor of 'std::atomic<unsigned int>'<br>                   gtid, target_gtid, flag->get(), old_spin, *(flag->get())));<br>                                                             ^~~~~~~~~~~~~~<br>T:\llvm-project-11.0.1.src\openmp\runtime\src/kmp_debug.h(103,24): note: expanded from macro 'KF_TRACE'<br>    __kmp_debug_printf x;                                                      \<br>                       ^<br>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\atomic(2165,5): note: 'atomic' has been explicitly marked deleted here<br>    atomic(const atomic&) = delete;<br>    ^<br><br>8 warnings and 3 errors generated.<br>ninja: build stopped: subcommand failed.</div></div>