8sa1-gcc/gcc/testsuite/g++.old-deja/g++.other/warn3.C
Mark Mitchell b0e0b31f6f cp-tree.h: Revert previous change.
* cp-tree.h: Revert previous change.
	(finish_struct_methods): Remove declaration.
	* class.c: Revert previous change.
	(maybe_warn_about_overly_private_class): New function.
	(finish_struct_methods): Declare here, and make static.  Remove
	unnecessary parameters.  Tidy slightly.  Use
	maybe_warn_about_overly_private_class.
	(finish_struct_1): Adjust.  Remove check for private constructors,
	now done elsewhere.
	(finish_struct): Adjust.

From-SVN: r22426
1998-09-15 11:43:54 +00:00

55 lines
672 B
C

// Build don't link:
class A {
};
class B {
public:
void f();
private:
B ();
B (const B&);
}; // WARNING - only private constructors
class C {
public:
void f();
private:
~C ();
}; // WARNING - only private destructors
class D {
private:
void f();
}; // WARNING - all member functions are private
template <class T>
class X {
private:
~X ();
}; // WARNING - only private destructors
template class X<int>;
template class X<double>;
template <class T>
class Y {
private:
Y ();
Y (const Y&);
}; // WARNING - only private constructors
template <class T>
class Z {
private:
void f();
}; // WARNING - all member functions are private