This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
gcc 3.0 c++ error (regression)
- To: gcc-bugs at gcc dot gnu dot org
- Subject: gcc 3.0 c++ error (regression)
- From: DJ Delorie <dj at redhat dot com>
- Date: Fri, 23 Mar 2001 10:01:57 -0500
GCC 3.0 complains about this, which I've been told is valid (and
compiles OK with gcc 2.95.2):
struct foo {
foo(int a, int b, int c);
};
foo::foo(int a, int b, int c=0) {}
int main(void)
{
foo f(1,2);
}
This is extracted from the latest GROFF.
~/gnu/gcc-3.0/linux/gcc
$ ./cc1plus -quiet foo.cc
foo.cc: In function `int main()':
foo.cc:9: no matching function for call to `foo::foo(int, int)'
foo.cc:1: candidates are: foo::foo(const foo&)
foo.cc:5: foo::foo(int, int, int)