[Bug c++/90884] Option `-Wctor-dtor-privacy' enables warning even for system headers

2019-08-15 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90884

--- Comment #7 from Marek Polacek  ---
Author: mpolacek
Date: Thu Aug 15 18:35:07 2019
New Revision: 274547

URL: https://gcc.gnu.org/viewcvs?rev=274547=gcc=rev
Log:
PR c++/90884 - stray note with -Wctor-dtor-privacy.
* class.c (maybe_warn_about_overly_private_class): Guard the call to
inform.

Added:
branches/gcc-9-branch/gcc/testsuite/g++.dg/warn/ctor-dtor-privacy-4.C
branches/gcc-9-branch/gcc/testsuite/g++.dg/warn/ctor-dtor-privacy-4.h
Modified:
branches/gcc-9-branch/gcc/cp/ChangeLog
branches/gcc-9-branch/gcc/cp/class.c

[Bug c++/90884] Option `-Wctor-dtor-privacy' enables warning even for system headers

2019-08-15 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90884

--- Comment #6 from Marek Polacek  ---
(In reply to Jonathan Wakely from comment #5)
> Marek, should this be backported to release branches too?

Ha, I'm just about to backport a few patches to 9.3, so I'll include this one
too.

[Bug c++/90884] Option `-Wctor-dtor-privacy' enables warning even for system headers

2019-08-15 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90884

--- Comment #5 from Jonathan Wakely  ---
Marek, should this be backported to release branches too?

[Bug c++/90884] Option `-Wctor-dtor-privacy' enables warning even for system headers

2019-06-14 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90884

Marek Polacek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Marek Polacek  ---
Fixed.

[Bug c++/90884] Option `-Wctor-dtor-privacy' enables warning even for system headers

2019-06-14 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90884

--- Comment #3 from Marek Polacek  ---
Author: mpolacek
Date: Fri Jun 14 14:49:57 2019
New Revision: 272291

URL: https://gcc.gnu.org/viewcvs?rev=272291=gcc=rev
Log:
PR c++/90884 - stray note with -Wctor-dtor-privacy.
* class.c (maybe_warn_about_overly_private_class): Guard the call to
inform.

* g++.dg/warn/ctor-dtor-privacy-4.C: New.
* g++.dg/warn/ctor-dtor-privacy-4.h: New.

Added:
trunk/gcc/testsuite/g++.dg/warn/ctor-dtor-privacy-4.C
trunk/gcc/testsuite/g++.dg/warn/ctor-dtor-privacy-4.h
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/class.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/90884] Option `-Wctor-dtor-privacy' enables warning even for system headers

2019-06-14 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90884

Marek Polacek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||mpolacek at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |mpolacek at gcc dot 
gnu.org

--- Comment #2 from Marek Polacek  ---
The problem here is the naked note; the warning itself only triggers with
-Wsystem-headers.

[Bug c++/90884] Option `-Wctor-dtor-privacy' enables warning even for system headers

2019-06-14 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90884

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-06-14
 Ever confirmed|0   |1

--- Comment #1 from Jonathan Wakely  ---
Confirmed, but I'll also use a #pragma to disable the warning for __nonesuch
because it *has* to be that way, by design.