Add parentheses aroung logical operations (dotnet/coreclr#8406)
authorJonghyun Park <parjong@gmail.com>
Thu, 1 Dec 2016 02:26:08 +0000 (11:26 +0900)
committerJan Kotas <jkotas@microsoft.com>
Thu, 1 Dec 2016 02:26:08 +0000 (18:26 -0800)
This commit fixes logical-op-parentheses compile error for x86/Linux build.

Commit migrated from https://github.com/dotnet/coreclr/commit/4e17522078fd30bcc4e83a43c03a673a1f98eee1

src/coreclr/src/vm/excep.cpp

index 68eafba..c161c47 100644 (file)
@@ -7313,8 +7313,8 @@ AdjustContextForWriteBarrier(
 
     void* f_IP = (void *)GetIP(pContext);
 
-    if (f_IP >= (void *) JIT_WriteBarrierStart && f_IP <= (void *) JIT_WriteBarrierLast ||
-        f_IP >= (void *) JIT_PatchedWriteBarrierStart && f_IP <= (void *) JIT_PatchedWriteBarrierLast)
+    if (((f_IP >= (void *) JIT_WriteBarrierStart) && (f_IP <= (void *) JIT_WriteBarrierLast)) ||
+        ((f_IP >= (void *) JIT_PatchedWriteBarrierStart) && (f_IP <= (void *) JIT_PatchedWriteBarrierLast)))
     {
         // set the exception IP to be the instruction that called the write barrier
         void* callsite = (void *)GetAdjustedCallAddress(*dac_cast<PTR_PCODE>(GetSP(pContext)));