This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/64482] New: No Exceptions Improvements


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");
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]