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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.other/] [using8.C] - Blame information for rev 699

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do assemble  }
2
 
3
// Copyright (C) 2000 Free Software Foundation, Inc.
4
// Contributed by Nathan Sidwell 14 Nov 2000 
5
 
6
// We rejected using decls bringing in functions from a base which would hide a
7
// nested class of the same name, but only if we had no functions by that name
8
// already. Also, we failed to find that using declaration during lookup. Also
9
// we failed to reject using declarations which matched the constructor name.
10
 
11
struct A
12
{
13
  int f ();
14
  void D ();
15
};
16
 
17
struct A2 {
18
  typedef int f;
19
};
20
 
21
struct B : A
22
{
23
  using A::f;
24
  struct f {};
25
};
26
 
27
struct C : A
28
{
29
  using A::f;
30
  int f (int);
31
  struct f {};
32
};
33
 
34
void foo (B *bp, C* cp)
35
{
36
  bp->f ();
37
  cp->f ();
38
}
39
 
40
struct D : A
41
{
42
  using A::D;   // { dg-error "" } names constructor
43
};

powered by: WebSVN 2.1.0

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