* class.c (maybe_warn_about_overly_private_class): Don't stop
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 13 Jan 2003 09:15:29 +0000 (09:15 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 13 Jan 2003 09:15:29 +0000 (09:15 +0000)
        searching when we find a nonprivate method.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61248 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/g++.dg/warn/private1.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/warn/private1.C b/gcc/testsuite/g++.dg/warn/private1.C
new file mode 100644 (file)
index 0000000..c42d6b7
--- /dev/null
@@ -0,0 +1,16 @@
+// g++ should not complain about A having private [cd]tors.
+
+class A
+{
+  A();
+  ~A();
+public:
+  int dummy();                 // needed to get bogus warning
+  static A* get_A ();
+};
+
+A* A::get_A()
+{
+  static A a;
+  return &a;
+}