https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66145
Shital Shah <sytelus at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sytelus at gmail dot com --- Comment #22 from Shital Shah <sytelus at gmail dot com> --- This bug just bit me and I came to know about this regression via thread on StackOverflow.com. I've also filed related bug where what() method on exception returns irrelevant message: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71950 Hope this gets fixed soon. Stackoverflow disucssion: http://stackoverflow.com/questions/38471518/how-to-get-io-error-messages-when-creating-a-file-in-c/