Calling non-trivial default copy constructors (c++/2065)
Magnus Fromreide
magfr@lysator.liu.se
Wed Feb 28 23:28:00 GMT 2001
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?
More information about the Gcc-bugs
mailing list