This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/64482] New: No Exceptions Improvements
- From: "olafvdspek at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 03 Jan 2015 18:16:10 +0000
- Subject: [Bug c++/64482] New: No Exceptions Improvements
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64482
Bug ID: 64482
Summary: No Exceptions Improvements
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: olafvdspek at gmail dot com
Currently -fno-exceptions is partially implemented in the std library. throw is
replaced by abort(), try and catch are basically no-ops. However, user code
doesn't benefit from this.
Could these things be implemented in the compiler instead?
Ideally a throw would still result in something like:
terminate called after throwing an instance of 'std::runtime_error'
what(): Bah
Aborted
https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_exceptions.html
#include <stdexcept>
int main()
{
throw std::runtime_error("Bah");
}