Note that you forgot '-Wextra', but even `gcc -Wall -Wextra -Wpedantic` doesn't enable all diagnostics (there are some 40 additional arguments to provide, depending on GCC version); so what you really want is a recent version of Clang and '-Weverything'.