Clean up some minor white space issues in trans-decl.c and trans-expr.c
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.benjamin / warn02.C
bloba3d23747b48771be95af23648bac8801e1ae3075
1 // { dg-do assemble  }
2 // { dg-options "-Wredundant-decls" }
3 // 980413 bkoz 
4 // from g++/15307, tests for -Wredundant-decls 
5 // for friend functions and functions 
8 extern int foo(const char *);
10 class A
12   friend int foo(const char *);
13   int a;
16 class B
18   friend int foo(const char *);
19   int foo2() {return b;}
20   int b;
23 class C
25   friend int foo(const char *);
26   friend int foo(const char *); // { dg-warning "" } 
27   int foo2() {return b;}
28   int b;
31 class D
33 public:
34   int foo2() {return b;}  // { dg-error "with" } 
35   int foo2() {return b;}  // { dg-error "overloaded" } 
36   int b;
39 class E
41 public:
42   int foo2(); // { dg-error "with" } 
43   int foo2(); // { dg-error "overloaded" } 
44   int b;
47 extern int foo3(const char *);  // { dg-message "" } 
48 extern int foo3(const char *);  // { dg-warning "" }