public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13944] New: exception in constructor of a class to be thrown is not caught
@ 2004-01-31 12:02 debian-gcc at lists dot debian dot org
  2004-02-02  2:10 ` [Bug c++/13944] [3.3/3.4/3.5] " giovannibajo at libero dot it
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: debian-gcc at lists dot debian dot org @ 2004-01-31 12:02 UTC (permalink / raw)
  To: gcc-bugs

[forwarded from http://bugs.debian.org/228099]

Running the following code compiled with 'g++ 3.3.3 testex.cc' results in a
SIGABRT. The bug submitter sees no reason why this should happen. With g++ 3.2.3
it works, i.e. the exception 1 in A() is caught by the try-block.


# 1 "testex.cc"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "testex.cc"
class A
{
    public:
        A() {throw(1);}
};

int main(int argc, char *argv)
{
    try
    {
        throw A();
    }
    catch(...)
    {
    }
}

gcc-3.4 (CVS 20040113) and 3.5 (CVS 20040113 tree-ssa) are more verbose:

$ g++-3.4 bug-228099.cc && ./a.out 
terminate called after throwing an instance of 'i'
Aborted

$ g++-3.5 bug-228099.cc && ./a.out 
terminate called without an active exception
Aborted

-- 
           Summary: exception in constructor of a class to be thrown is not
                    caught
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: debian-gcc at lists dot debian dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13944


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2004-03-03 16:28 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-31 12:02 [Bug c++/13944] New: exception in constructor of a class to be thrown is not caught debian-gcc at lists dot debian dot org
2004-02-02  2:10 ` [Bug c++/13944] [3.3/3.4/3.5] " giovannibajo at libero dot it
2004-02-02  7:43 ` pinskia at gcc dot gnu dot org
2004-02-02 23:18 ` bangerth at dealii dot org
2004-02-15 12:43 ` gdr at gcc dot gnu dot org
2004-02-16  3:07 ` mmitchel at gcc dot gnu dot org
2004-02-16  4:09 ` [Bug c++/13944] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
2004-02-16 18:22 ` jason at redhat dot com
2004-02-16 18:27 ` jason at redhat dot com
2004-02-24 18:30 ` cvs-commit at gcc dot gnu dot org
2004-02-24 18:30 ` cvs-commit at gcc dot gnu dot org
2004-02-24 19:57 ` gdr at integrable-solutions dot net
2004-03-02 11:10 ` [Bug c++/13944] [3.3/3.4 " steven at gcc dot gnu dot org
2004-03-02 17:17 ` jason at redhat dot com
2004-03-02 19:57 ` cvs-commit at gcc dot gnu dot org
2004-03-02 20:30 ` [Bug c++/13944] [3.3 " pinskia at gcc dot gnu dot org
2004-03-02 20:44 ` gdr at integrable-solutions dot net
2004-03-02 20:54 ` jason at redhat dot com
2004-03-02 21:06 ` gdr at integrable-solutions dot net
2004-03-03  7:40 ` cvs-commit at gcc dot gnu dot org
2004-03-03 16:28 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).