https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71484
James Legg <jlegg at feralinteractive dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jlegg at feralinteractive dot com --- Comment #1 from James Legg <jlegg at feralinteractive dot com> --- In GCC 8.1, it can also be triggered without private methods, by explicitly deleting the default copy constructor. For example: struct S { S(const S &) = delete; S & operator =(const S &) = delete; int x; }; Struct S has an implicit public constructor, despite which GCC 8.1 complains: <source>:1:8: error: 'struct S' only defines private constructors and has no friends [-Werror=ctor-dtor-privacy] struct S ^ <source>:3:2: note: 'S::S(const S&)' is public, but requires an existing 'struct S' object S(const S &) = delete; ^