[Bug c++/12386] New: methode overloading
lauterba at web dot de
gcc-bugzilla@gcc.gnu.org
Wed Sep 24 07:56:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12386
Summary: methode overloading
Product: gcc
Version: 3.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: lauterba at web dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: x86
GCC host triplet: Linux
GCC target triplet: x86
The code:
class A{
public:
void test();
};
class B:public A{
public :
void test(int){
test();
}
};
int main(){
B b;
b.test(2);
b.test();
}
will produce the the error messages:
classes.cc: In member function `void B::test(int)':
classes.cc:9: error: no matching function for call to `B::test()'
classes.cc:8: error: candidates are: void B::test(int)
classes.cc: In function `int main()':
classes.cc:16: error: no matching function for call to `B::test()'
classes.cc:8: error: candidates are: void B::test(int)
make: *** [classes] Error 1
Is this a bug or C++ standard?
More information about the Gcc-bugs
mailing list