Consider Visual C++.
This always correct code emits a completely useless warning:
1 2 3 4 5 |
try { ... } catch (const std::exception& ex) { printf("foo\n"); } |
1 |
test.cpp(3): warning C4101: 'ex' : unreferenced local variable |
This never ever correct code doesn’t emit any warning at all:
1 |
throw new exception("foo"); |
Visual C++ is a totally awesome piece of technology. So why doesn’t it work the way I want it to?