This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/59224] [4.7/4.8/4.9 Regression] std::uncaught_exception returns true while constructing exception.
- 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: Thu, 21 Nov 2013 14:02:53 +0000
- Subject: [Bug c++/59224] [4.7/4.8/4.9 Regression] std::uncaught_exception returns true while constructing exception.
- Auto-submitted: auto-generated
- References: <bug-59224-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59224
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-11-21
Known to work| |4.5.1
Summary|std::uncaught_exception |[4.7/4.8/4.9 Regression]
|always returns true after |std::uncaught_exception
|exception while |returns true while
|constructing another |constructing exception.
|exception. |
Ever confirmed|0 |1
Known to fail| |4.6.0, 4.7.4, 4.8.2, 4.9.0
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Confirmed. uncaught_exception becomes true while evaluating the operand of the
throw statement, but should only be true after initialization of the exception
object is complete.
#include <exception>
int f()
{
if (std::uncaught_exception())
std::terminate();
return 1;
}
int main()
{
try
{
throw f();
}
catch (...)
{
}
}