Commit f333504d by Gabriel Dos Reis Committed by Gabriel Dos Reis

re PR c++/689 ([diagnostic] this warning is not helpful: `class xxxx' only…

re PR c++/689 ([diagnostic] this warning is not helpful: `class xxxx' only defines a private destructor and has no friend)

	PR C++/689
	PR C++/9257
	* c-opts.c (c_common_decode_option): Don't set
	warn_ctor_dtor_privacy wen -Wall.
	* c-common.c (warn_ctor_dtor_privacy): Don't turn on by default.

From-SVN: r66684
parent 9f01ded6
2003-05-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
PR C++/689
PR C++/9257
* c-opts.c (c_common_decode_option): Don't set
warn_ctor_dtor_privacy wen -Wall.
* c-common.c (warn_ctor_dtor_privacy): Don't turn on by default.
2003-05-10 Alexandre Oliva <aoliva@redhat.com> 2003-05-10 Alexandre Oliva <aoliva@redhat.com>
* reload1.c (reload_cse_move2add): Revert part of my 2003-05-09's * reload1.c (reload_cse_move2add): Revert part of my 2003-05-09's
......
...@@ -626,7 +626,7 @@ int warn_implicit = 1; ...@@ -626,7 +626,7 @@ int warn_implicit = 1;
/* Nonzero means warn when all ctors or dtors are private, and the class /* Nonzero means warn when all ctors or dtors are private, and the class
has no friends. */ has no friends. */
int warn_ctor_dtor_privacy = 1; int warn_ctor_dtor_privacy = 0;
/* Nonzero means warn in function declared in derived class has the /* Nonzero means warn in function declared in derived class has the
same name as a virtual in the base class, but fails to match the same name as a virtual in the base class, but fails to match the
......
...@@ -825,7 +825,6 @@ c_common_decode_option (argc, argv) ...@@ -825,7 +825,6 @@ c_common_decode_option (argc, argv)
else else
{ {
/* C++-specific warnings. */ /* C++-specific warnings. */
warn_ctor_dtor_privacy = on;
warn_nonvdtor = on; warn_nonvdtor = on;
warn_reorder = on; warn_reorder = on;
warn_nontemplate_friend = on; warn_nontemplate_friend = on;
......
// { dg-options "-Wctor-dtor-privacy" }
struct C { // { dg-warning "" }
static bool result;
private:
static bool check();
};
bool C::result = check();
struct C {
static bool result;
private:
static bool check();
};
bool C::result = check();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment