Thanks for fixing! From my understanding [1.c:7]: (portability) Shifting a negative value is technically undefined behaviour should be 'undefined behavior'. BTW: My original concern was the preprocessor, which should emit a diagnostic, when its evaluation of expressions finds undefined behavior(http://en.cppreference.com/w/Talk:cpp/preprocessor/conditional) for lines like this: ~~~ // undefined behavior #if (0U << -1) == 0 ... ~~~
I saw your fix for file readme.txt. I left a comment for the commit to remember you that file readme.md is also out of date...
Hello, according to https://www.viva64.com/en/w/v610/ the shift operators in C and C++ have some undefined (and unspecified) behavior: if the right operand is negative or greater than or equal to the length in bits of the promoted left operand. for '<<' if the left operand is of signed type but positive and the result of left * 2 ^ right does not fit into the type of the left operand. for '>>' if the left operand is negative (unspecified behavior). int A, B, C, D, E, F, G; A = 0U << -1; B = 0U >>...
Can't see your fixes here: https://github.com/danmar/cppcheck/#g-for-experts Your fix must be somewhere else...
Hi, the experts build instructions are missing simplecpp additions. g++ -o cppcheck -std=c++0x -include lib/cxx11emu.h -Iexternals/tinyxml -Iexternals/simplecpp -Ilib cli/.cpp lib/.cpp externals/simplecpp/.cpp externals/tinyxml/.cpp and g++ -o cppcheck -std=c++0x -include lib/cxx11emu.h -lpcre -DHAVE_RULES -Ilib -Iexternals/tinyxml -Iexternals/simplecpp cli/.cpp lib/.cpp externals/simplecpp/.cpp externals/tinyxml/.cpp work. Best regards, Heiko