summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/scoping10.C
blob: a1b563297fc3609b6bfaf6c73b2984f130c43743 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// { dg-do assemble  }
// Test for scope-based hiding of functions.

void f (char *);
struct A {
  void f ();			// { dg-message "A::f|candidate expects" } referred to 
};
struct B : public A {
  void g (char *);
  void h () {
    extern void g ();		// { dg-message "" } 
    f("foo");			// { dg-error "" } hidden
    // { dg-message "candidate" "candidate note" { target *-*-* } 12 }
    g("foo");			// { dg-error "" } hidden
  }
};