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++/70387] -fnon-call-exceptions has no effect


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

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