]> granicus.if.org Git - gc/commitdiff
Workaround '32-bit value shift by >31 bits is undefined' cppcheck warnings
authorIvan Maidanski <ivmai@mail.ru>
Thu, 9 Mar 2017 20:48:45 +0000 (23:48 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 6 Apr 2017 08:33:06 +0000 (11:33 +0300)
* include/private/gcconfig.h [CPPCHECK] (CPP_WORDSZ): Undefine
(platform-specific explicit value) and redefine to __SIZEOF_POINTER__*8.

include/private/gcconfig.h

index 9ec034a7360aa722f3c882f00951953ae52f17b4..4a1d8c37afa072dc81796bd551b8706f4e09e692 100644 (file)
 # define UNIX_LIKE      /* Basic Unix-like system calls work.   */
 #endif
 
+#if defined(CPPCHECK)
+# undef CPP_WORDSZ
+# define CPP_WORDSZ (__SIZEOF_POINTER__ * 8)
+#endif
+
 #if CPP_WORDSZ != 32 && CPP_WORDSZ != 64
 # error --> bad word size
 #endif