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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [eh/] [shadow1.C] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// Copyright (C) 2004 Free Software Foundation, Inc.
2
// Contributed by Nathan Sidwell 15 Oct 2004 
3
 
4
// We forgot to ignore current context and friends when determing
5
// which exceptions shadowed eachother.
6
 
7
struct E;
8
 
9
struct B {};
10
 
11
struct D : private B
12
{
13
  friend class E;
14
 
15
  static B *baz (D *);
16
  virtual void V () throw (B);  // { dg-error "overriding" "" }
17
};
18
 
19
struct E : public D
20
{
21
  virtual void V () throw (D); // { dg-error "looser throw" "" }
22
};
23
 
24
B* foo (D *);
25
 
26
B *D::baz (D *p)
27
{
28
  try {foo (p);}
29
  catch (B const &b) {}
30
  catch (D const &d) {}
31
  return p;
32
}

powered by: WebSVN 2.1.0

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