diff options
Diffstat (limited to 'gcc/cp/class.c')
| -rw-r--r-- | gcc/cp/class.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c index dc52975..b8254fe 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -1537,7 +1537,10 @@ maybe_warn_about_overly_private_class (tree t) return; } - if (TYPE_HAS_CONSTRUCTOR (t)) + if (TYPE_HAS_CONSTRUCTOR (t) + /* Implicitly generated constructors are always public. */ + && (!CLASSTYPE_LAZY_DEFAULT_CTOR (t) + || !CLASSTYPE_LAZY_COPY_CTOR (t))) { int nonprivate_ctor = 0; |
