OSDN Git Service

*** empty log message ***
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 21 Apr 1998 19:45:53 +0000 (19:45 +0000)
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 21 Apr 1998 19:45:53 +0000 (19:45 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@19366 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/g++.old-deja/g++.benjamin/warn02.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.old-deja/g++.benjamin/warn02.C b/gcc/testsuite/g++.old-deja/g++.benjamin/warn02.C
new file mode 100644 (file)
index 0000000..a60a2d7
--- /dev/null
@@ -0,0 +1,54 @@
+// 980413 bkoz 
+// from g++/15307, tests for -Wredundant-decls 
+// for friend functions and functions 
+// Build don't link: 
+//Special g++ Options: -Wredundant-decls
+
+
+extern int foo(const char *);
+
+class A
+{
+  friend int foo(const char *);
+  int a;
+};
+
+class B
+{
+  friend int foo(const char *);
+  int foo2() {return b;}
+  int b;
+};
+
+class C
+{
+  friend int foo(const char *);
+  friend int foo(const char *); // WARNING - 
+  int foo2() {return b;}
+  int b;
+};
+
+class D
+{
+public:
+  int foo2() {return b;}  // WARNING - 
+  int foo2() {return b;}  // WARNING - 
+  int b;
+};
+
+class E
+{
+public:
+  int foo2(); // WARNING - 
+  int foo2(); // WARNING - 
+  int b;
+};
+
+extern int foo3(const char *);  // WARNING - 
+extern int foo3(const char *);  // WARNING - 
+
+
+
+
+
+