with this simple code
#include <stdexcept>
int main() {
try {
} catch (const std::runtime_error& anError) {
}
}
neither g++-4.9 nor clang++-3.5 with the -Wextra flag enabled (required for other unreferenced local variable issues notification) detect anything wrong, while reportedly Visual Studio correctly issues a C4101 warning (I do not own a vs toolchain, so I can't confirm this).
This is an issue since my static analysis tool, configured with a sufficiently high level of aggressiveness, reports these uses as problems. I would rather solve them at source-code level, instead of impacting my static analysis tool effectiveness.
Is anyone aware of a way to get those warning from those two compilers as well?
Thanks!