From 68d27300a11514eabebd23ce77ab2dea11fd07fd Mon Sep 17 00:00:00 2001 From: Yuanjie Huang Date: Mon, 25 Feb 2019 14:11:26 +0800 Subject: [PATCH] Fix calling clearUnusedBits from volatile member functions --- include/etc/ap_private.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/etc/ap_private.h b/include/etc/ap_private.h index 8e046f1..0c29a0a 100644 --- a/include/etc/ap_private.h +++ b/include/etc/ap_private.h @@ -2097,7 +2097,7 @@ ASSIGN_OP_FROM_INT(double) INLINE void set(const ap_private& val) { operator=(val); } - INLINE void clearUnusedBits(void) + INLINE void clearUnusedBits(void) volatile // just for clang compiler #if defined(__clang__) && !defined(__CLANG_3_1__) __attribute__((no_sanitize("undefined"))) @@ -3387,7 +3387,7 @@ class ap_private<_AP_W, _AP_S, false> { /// significant word is assigned a value to ensure that those bits are /// zero'd out. /// @brief Clear unused high order bits - INLINE void clearUnusedBits(void) + INLINE void clearUnusedBits(void) volatile // just for clang compiler #if defined(__clang__) && !defined(__CLANG_3_1__) __attribute__((no_sanitize("undefined")))