diff --git a/paddle/platform/enforce.h b/paddle/platform/enforce.h index 97338a4ce68da46ead7d66f7e01a3d5c8623b3c4..5abd4d4a345ed2750231841325f2b19a2ee8c4c9 100644 --- a/paddle/platform/enforce.h +++ b/paddle/platform/enforce.h @@ -244,7 +244,7 @@ inline void throw_on_error(T e) { #define __PADDLE_BINARY_COMPARE(__VAL0, __VAL1, __CMP, __INV_CMP, ...) \ do { \ - if (!UNLIKELY((__VAL0)__CMP(__VAL1))) { \ + if (UNLIKELY(!((__VAL0)__CMP(__VAL1)))) { \ PADDLE_THROW("enforce %s " #__CMP " %s failed, %s " #__INV_CMP \ " %s\n%s", \ #__VAL0, #__VAL1, paddle::string::to_string(__VAL0), \