This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
eb fix 3
- To: egcs-patches at cygnus dot com
- Subject: eb fix 3
- From: Martin von Loewis <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Thu, 28 May 1998 21:19:29 +0200
This code should produce a message, and does so. Earlier versions
appearantly didn't, so we should keep the case.
Martin
Index: eb121.C
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/testsuite/g++.old-deja/g++.robertl/eb121.C,v
retrieving revision 1.1
diff -c -p -r1.1 eb121.C
*** eb121.C 1998/05/27 23:00:35 1.1
--- eb121.C 1998/05/28 19:13:56
***************
*** 1,13 ****
! // Compiles. Shouldn't.
class A {
private:
int i1_;
public:
! void f(int const i1 = 1);
};
void
! A::f(int const i1 = 1) // !!! SHOULD TRIGGER AN ERROR !!!
{
i1_ = i1;
}
--- 1,13 ----
! //Build don't link:
class A {
private:
int i1_;
public:
! void f(int const i1 = 1); // ERROR -
};
void
! A::f(int const i1 = 1) // ERROR - duplicate default argument
{
i1_ = i1;
}