From: Ivan Maidanski Date: Thu, 9 Mar 2017 20:48:45 +0000 (+0300) Subject: Workaround '32-bit value shift by >31 bits is undefined' cppcheck warnings X-Git-Tag: v7.6.2~208 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b2a12b9b98728a8cd77a416a42ca6bf3ac7370e9;p=gc Workaround '32-bit value shift by >31 bits is undefined' cppcheck warnings * include/private/gcconfig.h [CPPCHECK] (CPP_WORDSZ): Undefine (platform-specific explicit value) and redefine to __SIZEOF_POINTER__*8. --- diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h index 9ec034a7..4a1d8c37 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h @@ -2780,6 +2780,11 @@ # 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