This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12386] New: methode overloading
- From: "lauterba at web dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Sep 2003 07:02:13 -0000
- Subject: [Bug c++/12386] New: methode overloading
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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?