------- Comment #9 from pinskia at gcc dot gnu dot org 2006-01-24 17:14 ------- Here is an example of where we get a false postive: #include <iostream>
using namespace std; int main() { int x; cin >> x; if (!cin) { x = -1; } cout << x << endl; } We check the error status of cin after "cin >> x" has run and if that fails we set x to -1 but the warning still shows up. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25649