This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/66145] [5/6 Regression] std::ios_base::failure objects thrown from libstdc++.so use old ABI
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 06 Oct 2015 21:52:47 +0000
- Subject: [Bug libstdc++/66145] [5/6 Regression] std::ios_base::failure objects thrown from libstdc++.so use old ABI
- Auto-submitted: auto-generated
- References: <bug-66145-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66145
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Reduced from testcase at https://bugzilla.redhat.com/show_bug.cgi?id=1269290
#include <iostream>
#include <fstream>
#include <system_error>
#include <exception>
int main() {
try {
std::ifstream input("notafile");
input.exceptions(std::ifstream::failbit | std::ifstream::badbit);
input.get();
} catch(const std::ios::failure &e) {
std::cout << "caught a failure " << e.what()
<< '\n';
} catch(const std::system_error &e) {
std::cout << "caught a system_error " << e.what()
<< '\n';
} catch(const std::runtime_error &e) {
std::cout << "caught a runtime_error " << e.what()
<< '\n';
} catch(const std::exception &e) {
std::cout << "caught an exception " << e.what()
<< '\n';
}
}
The last handler matches, but it should have matched earlier.