error in g++ error report

Jason Merrill jason@yorick.cygnus.com
Tue Sep 2 11:53:00 GMT 1997


>>>>> Gabriel Dos Reis <Gabriel.Dos-Reis@dptmaths.ens-cachan.fr> writes:

> 	Does egcs plan to fix this type of bug in g++-error-report ?

> class A {
> public:
>     A() {}
>     A(A&) {}
> };

> int main()
> {
>     const A a;
>     A b = a;
> }

> % g++ toto.C
> toto.C: In function `int main()':
> toto.C:10: no matching function for call to `A::A (A)'
> toto.C:3: candidates are: A::A()
> toto.C:4:                 A::A(A &)
> toto.C:10: in base initialization for class `A'

Funny, I get

wa.C: In function `int main()':
wa.C:10: warning: conversion from `const A' to `A &' discards const
wa.C:4: warning: in passing argument 1 of `A::A(A &)'

What version are you using?

Jason



More information about the Gcc mailing list