This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Calling non-trivial default copy constructors (c++/2065)
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Calling non-trivial default copy constructors (c++/2065)
- From: Magnus Fromreide <magfr at lysator dot liu dot se>
- Date: Thu, 1 Mar 2001 08:28:42 +0100 (MET)
Since a few days I have started getting the following error from the
3.0-branch g++:
$ /usr/local/src/gnu/gcc-2.97/install/bin/g++ -Wunused-parameter x.C -c
x.C: In method `C::C(const C&)':
x.C:1: warning: unused parameter `const C&_ctor_arg'
where the file x.C is
class C {
public:
virtual ~C();
};
class D : public C {
public:
D(const D&);
};
D::D(const D& d) : C(d) { }
Please note that the warning goes away if either
* D::D(const D&) is made inline
* C contains no virtual methods
I do consider this a little bit annoying, does anyone have an idea about
what to do about it?