CppCheck
Cppcheck is an open source static code analyzer tool for C/C++ programming languages. It's a versatile tool that can check non-standard code.
Example
$ cppcheck --enable=warning,performance,portability --template=gcc --std=c++11 --platform=native --language=c++ -q -I src src/main.cpp