[Bug c++/24983] Needs a warning?
gdr at integrable-solutions dot net
gcc-bugzilla@gcc.gnu.org
Tue Nov 22 02:46:00 GMT 2005
------- Comment #1 from gdr at integrable-solutions dot net 2005-11-22 02:46 -------
Subject: Re: New: Needs a warning?
"igodard at pacbell dot net" <gcc-bugzilla@gcc.gnu.org> writes:
| struct foo { const void f(); };
| void foo::f(){}
|
| gets you:
|
| ~/ootbc/members/src$ g++ foo.cc -Wall
| foo.cc:2: error: prototype for `void foo::f()' does not match any in class
| `foo'
| foo.cc:1: error: candidate is: const void foo::f()
| foo.cc:2: error: `void foo::f()' and `const void foo::f()' cannot be
overloaded
Awful. Please assign it to me.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24983
More information about the Gcc-bugs
mailing list