This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

eb fix 3


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;
  }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]