OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [libstdc++-v3/] [testsuite/] [18_support/] [14026.cc] - Blame information for rev 19

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 19 jlechner
// PR 14026
2
// 18.6.4 uncaught_exception
3
 
4
#include <cstdlib>
5
#include <exception>
6
#include <testsuite_hooks.h>
7
 
8
static void
9
no_uncaught ()
10
{
11
  if (std::uncaught_exception ())
12
    abort ();
13
}
14
 
15
int
16
main ()
17
{
18
  try
19
    {
20
      throw 1;
21
    }
22
  catch (...)
23
    {
24
      try
25
        {
26
          throw;
27
        }
28
      catch (...)
29
        {
30
          no_uncaught ();
31
        }
32
    }
33
  no_uncaught ();
34
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.