This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/70387] -fnon-call-exceptions has no effect
- From: "jwjagersma at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 25 Mar 2016 16:39:56 +0000
- Subject: [Bug c++/70387] -fnon-call-exceptions has no effect
- Auto-submitted: auto-generated
- References: <bug-70387-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70387
--- Comment #3 from jwjagersma at gmail dot com ---
Possibly interesting observation; the exception can be caught when using a
pointer as divisor:
int i = 0;
int* volatile p = &i;
try
{
std::cout << 1 / *p << std::endl;
}
catch (std::exception& e)
{
std::cout << "oops: " << e.what() << std::endl;
}