[Openmp-commits] [PATCH] D86448: [OpenMP] Check if `_MSC_VER` is defined before using it

Mateusz MikuĊ‚a via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Aug 24 05:15:16 PDT 2020


mati865 created this revision.
mati865 added a reviewer: OpenMP.
mati865 added a project: OpenMP.
Herald added subscribers: openmp-commits, mstorsjo, guansong, yaxunl.
mati865 requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added a subscriber: sstefan1.

MinGW compilers don't define `_MSC_VER` so `_MSC_VER < 1600` expands to true.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D86448

Files:
  openmp/runtime/src/kmp_atomic.h


Index: openmp/runtime/src/kmp_atomic.h
===================================================================
--- openmp/runtime/src/kmp_atomic.h
+++ openmp/runtime/src/kmp_atomic.h
@@ -39,7 +39,7 @@
 #define KMP_DO_ALIGN(alignment) /* Nothing */
 #endif
 
-#if (_MSC_VER < 1600) && defined(_DEBUG)
+#if defined(_MSC_VER) && (_MSC_VER < 1600) && defined(_DEBUG)
 // Workaround for the problem of _DebugHeapTag unresolved external.
 // This problem prevented to use our static debug library for C tests
 // compiled with /MDd option (the library itself built with /MTd),


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86448.287343.patch
Type: text/x-patch
Size: 567 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20200824/46df1175/attachment.bin>


More information about the Openmp-commits mailing list