It still fails on open() with the failbit flag.
The code I posted was from our textbook and runs fine with VC++ 6.
I realize, of course, that the MS compiler is only about 70% standards-compliant, so I concluded that they (MS) must be doing something non-standard and g++ is actually trying to do the right thing.