https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59224

li xin <lixin.fnst at cn dot fujitsu.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lixin.fnst at cn dot 
fujitsu.com

--- Comment #8 from li xin <lixin.fnst at cn dot fujitsu.com> ---
(In reply to Jason Merrill from comment #5)
> Fixed for 4.8.3/4.9.  Not fixing on 4.7 branch.

It will lead to the lsb test caes
/libstdcxx-t2c/tests/LanguageSupport/LanguageSupport FAIL.
So I want to know the right return value of std::uncaught_exception() (inside
exception-constructor).

The LSB test code is as follows:

cat main.cpp
#include <string.h>
#include <iostream>

using namespace std;
class exception_test : public exception
{
        public:
                bool result;
                exception_test(): exception(){result = uncaught_exception();}
                ~exception_test() throw(){};
};

int main(int argc, char ** argv)
{
        bool result;

        try
        {
                throw exception_test();
        }
        catch(exception_test et)
        {
                result = et.result;
        }
        cerr << result << endl;
        return 0;
}

# g++ ./main.cpp
# ./a.out
0

My GCC version is 4.9.2, the return value of result is 0,and the test is FAIL.
If the the return value of result is 1,and the test will be PASS.

Reply via email to