This revision was automatically updated to reflect the committed changes. Closed by commit rGbbc690c57213: Define __STDC_NO_THREADS__ when targeting windows-msvc (PR48704) (authored by hans).
Changed prior to commit: https://reviews.llvm.org/D112081?vs=380704&id=394877#toc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112081/new/ https://reviews.llvm.org/D112081 Files: clang/lib/Basic/Targets/OSTargets.cpp clang/test/Preprocessor/init.c Index: clang/test/Preprocessor/init.c =================================================================== --- clang/test/Preprocessor/init.c +++ clang/test/Preprocessor/init.c @@ -195,6 +195,7 @@ // MSEXT-NOT:#define _NATIVE_WCHAR_T_DEFINED 1 // MSEXT-NOT:#define _WCHAR_T_DEFINED 1 // MSEXT:#define _MSVC_EXECUTION_CHARACTER_SET 65001 +// MSEXT:#define __STDC_NO_THREADS__ 1 // // // RUN: %clang_cc1 -x c++ -fms-extensions -triple i686-pc-win32 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix MSEXT-CXX %s Index: clang/lib/Basic/Targets/OSTargets.cpp =================================================================== --- clang/lib/Basic/Targets/OSTargets.cpp +++ clang/lib/Basic/Targets/OSTargets.cpp @@ -203,6 +203,7 @@ } Builder.defineMacro("_INTEGRAL_MAX_BITS", "64"); + Builder.defineMacro("__STDC_NO_THREADS__"); // Starting with VS 2022 17.1, MSVC predefines the below macro to inform // users of the execution character set defined at compile time.
Index: clang/test/Preprocessor/init.c =================================================================== --- clang/test/Preprocessor/init.c +++ clang/test/Preprocessor/init.c @@ -195,6 +195,7 @@ // MSEXT-NOT:#define _NATIVE_WCHAR_T_DEFINED 1 // MSEXT-NOT:#define _WCHAR_T_DEFINED 1 // MSEXT:#define _MSVC_EXECUTION_CHARACTER_SET 65001 +// MSEXT:#define __STDC_NO_THREADS__ 1 // // // RUN: %clang_cc1 -x c++ -fms-extensions -triple i686-pc-win32 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix MSEXT-CXX %s Index: clang/lib/Basic/Targets/OSTargets.cpp =================================================================== --- clang/lib/Basic/Targets/OSTargets.cpp +++ clang/lib/Basic/Targets/OSTargets.cpp @@ -203,6 +203,7 @@ } Builder.defineMacro("_INTEGRAL_MAX_BITS", "64"); + Builder.defineMacro("__STDC_NO_THREADS__"); // Starting with VS 2022 17.1, MSVC predefines the below macro to inform // users of the execution character set defined at compile time.
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits