[PING] [PATCH/C++/diagnostic] Be extra pedantic about stray semicolons

Dirk Mueller dmueller@suse.de
Wed Mar 21 12:08:00 GMT 2007


On Tuesday, 20. March 2007, Gabriel Dos Reis wrote:

> | http://gcc.gnu.org/ml/gcc-patches/2007-03/msg00970.html
> I have no history record for the failing testcase.

Me neither. What do you suggest ? Should we preserve the existing behaviour 
under -pedantic, or should -pedantic be fixed to warn about the stray 
semicolon?

For the latter, the fix is below: 

2007-03-20  Dirk Mueller  <dmueller@suse.de>

	* parser.c (cp_parser_member_declaration): Pedwarn about
      	stray semicolons.

        * g++.old-deja/g++.brendan/warnings2.C: Don't use -pedantic.
	* g++.dg/other/static1.C: Remove stray semicolon.
        * g++.dg/other/init1.C: Likewise.
        * g++.dg/rtti/dyncast1.C: Likewise.
        * g++.dg/tree-ssa/pr17153.C: Likewise.
        * g++.dg/lookup/disamb1.C: Likewise.
        * g++.dg/lookup/scoped2.C: Likewise.
        * g++.dg/lookup/friend7.C: Likewise.
        * g++.dg/parse/parse4.C: Likewise.
        * g++.dg/parse/parse5.C: Likewise.
        * g++.dg/expr/pr29066.C: Likewise.
        * g++.dg/expr/cast4.C: Likewise.
        * g++.dg/tc1/dr193.C: Likewise.
        * g++.dg/tc1/dr213.C: Likewise.
        * g++.dg/abi/dcast1.C: Likewise.
        * g++.dg/abi/covariant2.C: Likewise.
        * g++.dg/inherit/covariant11.C: Likewise.
        * g++.dg/inherit/covariant9.C: Likewise.
        * g++.dg/inherit/covariant10.C: Likewise.
        * g++.dg/init/static3.C: Likewise.
        * g++.dg/init/init-ref3.C: Likewise.
        * g++.dg/init/ref10.C: Likewise.
        * g++.dg/template/meminit2.C: Likewise.
        * g++.dg/template/using9.C: Likewise.
        * g++.dg/template/friend9.C: Likewise.
        * g++.dg/template/ref1.C: Likewise.
        * g++.old-deja/g++.warn/inline.C: Likewise.
        * g++.old-deja/g++.robertl/eb91.C: Likewise.
        * g++.old-deja/g++.robertl/eb46.C: Likewise.
        * g++.old-deja/g++.robertl/eb34.C: Likewise.
        * g++.old-deja/g++.robertl/eb43.C: Likewise.
        * g++.old-deja/g++.robertl/eb26.C: Likewise.
        * g++.old-deja/g++.robertl/eb116.C: Likewise.
        * g++.old-deja/g++.brendan/copy5.C: Likewise.
        * g++.old-deja/g++.brendan/overload8.C: Likewise.
        * g++.old-deja/g++.brendan/overload11.C: Likewise.
        * g++.old-deja/g++.brendan/copy7.C: Likewise.
        * g++.old-deja/g++.brendan/crash38.C: Likewise.
        * g++.old-deja/g++.brendan/template11.C: Likewise.
        * g++.old-deja/g++.brendan/err-msg3.C: Likewise.
        * g++.old-deja/g++.brendan/crash50.C: Likewise.
        * g++.old-deja/g++.brendan/crash16.C: Likewise.
        * g++.old-deja/g++.jason/pmem2.C: Likewise.
        * g++.old-deja/g++.jason/parse9.C: Likewise.
        * g++.old-deja/g++.jason/byval2.C: Likewise.
        * g++.old-deja/g++.jason/overload8.C: Likewise.
        * g++.old-deja/g++.jason/pmf8.C: Likewise.
        * g++.old-deja/g++.jason/template33.C: Likewise.
        * g++.old-deja/g++.jason/return3.C: Likewise.
        * g++.old-deja/g++.jason/scoping2.C: Likewise.
        * g++.old-deja/g++.jason/virtual.C: Likewise.
        * g++.old-deja/g++.jason/opeq3.C: Likewise.
        * g++.old-deja/g++.jason/template27.C: Likewise.
        * g++.old-deja/g++.jason/synth6.C: Likewise.
        * g++.old-deja/g++.jason/ref8.C: Likewise.                                     
        * g++.old-deja/g++.jason/offset1.C: Likewise.
        * g++.old-deja/g++.other/static20.C: Likewise.
        * g++.old-deja/g++.other/array1.C: Likewise.
        * g++.old-deja/g++.other/new3.C: Likewise.
        * g++.old-deja/g++.other/array2.C: Likewise.
        * g++.old-deja/g++.other/overload9.C: Likewise.
        * g++.old-deja/g++.other/cast6.C: Likewise.
        * g++.old-deja/g++.other/ptrmem8.C: Likewise.
        * g++.old-deja/g++.other/eh4.C: Likewise.
        * g++.old-deja/g++.other/using7.C: Likewise.
        * g++.old-deja/g++.other/init18.C: Likewise.
        * g++.old-deja/g++.other/dyncast1.C: Likewise.
        * g++.old-deja/g++.other/dyncast2.C: Likewise.
        * g++.old-deja/g++.other/dtor11.C: Likewise.
        * g++.old-deja/g++.pt/static11.C: Likewise.
        * g++.old-deja/g++.pt/crash19.C: Likewise.
        * g++.old-deja/g++.pt/overload12.C: Likewise.
        * g++.old-deja/g++.pt/crash46.C: Likewise.
        * g++.old-deja/g++.pt/mi1.C: Likewise.
        * g++.old-deja/g++.pt/vaarg3.C: Likewise.
        * g++.old-deja/g++.pt/nontype5.C: Likewise.
        * g++.old-deja/g++.pt/local5.C: Likewise.
        * g++.old-deja/g++.pt/typename2.C: Likewise.
        * g++.old-deja/g++.pt/explicit80.C: Likewise.
        * g++.old-deja/g++.pt/auto_ptr.C: Likewise.
        * g++.old-deja/g++.law/visibility1.C: Likewise.
        * g++.old-deja/g++.law/visibility2.C: Likewise.
        * g++.old-deja/g++.law/virtual2.C: Likewise.
        * g++.old-deja/g++.law/operators19.C: Likewise.
        * g++.old-deja/g++.law/parsing10.C: Likewise.
        * g++.old-deja/g++.law/visibility4.C: Likewise.
        * g++.old-deja/g++.law/operators4.C: Likewise.
        * g++.old-deja/g++.law/dtors2.C: Likewise.
        * g++.old-deja/g++.law/missed-error3.C: Likewise.
        * g++.old-deja/g++.law/visibility10.C: Likewise.
        * g++.old-deja/g++.law/scope3.C: Likewise.
        * g++.old-deja/g++.law/casts2.C: Likewise.
        * g++.old-deja/g++.law/code-gen5.C: Likewise.
        * g++.old-deja/g++.law/operators33.C: Likewise.
        * g++.old-deja/g++.law/friend4.C: Likewise.
        * g++.old-deja/g++.mike/pmf7.C: Likewise.
        * g++.old-deja/g++.mike/p5611.C: Likewise.
        * g++.old-deja/g++.mike/net37.C: Likewise.
        * g++.old-deja/g++.mike/p3570.C: Likewise.
        * g++.old-deja/g++.mike/p5718.C: Likewise.
        * g++.old-deja/g++.mike/net21.C: Likewise.
        * g++.old-deja/g++.mike/p1862.C: Likewise.
        * g++.old-deja/g++.mike/p4511.C: Likewise.
        * g++.old-deja/g++.mike/virt3.C: Likewise.
        * g++.old-deja/g++.mike/p16146.C: Likewise.
        * g++.old-deja/g++.mike/p1989.C: Likewise.  
        * g++.old-deja/g++.mike/p5571.C: Likewise.
        * g++.old-deja/g++.gb/scope10.C: Likewise.
        * g++.old-deja/g++.abi/primary5.C: Likewise.
        * g++.old-deja/g++.abi/empty2.C: Likewise.
        * g++.old-deja/g++.abi/arraynew.C: Likewise.
        * g++.old-deja/g++.eh/vbase4.C: Likewise.
        * g++.old-deja/g++.eh/ptr1.C: Likewise.
        * g++.old-deja/g++.eh/cleanup1.C: Likewise.
        * g++.old-deja/g++.bob/template3.C: Likewise.
        * g++.old-deja/g++.bob/inherit1.C: Likewise.
 
--- parser.c    (revision 122995)
+++ parser.c    (working copy)
@@ -14491,7 +14491,11 @@ cp_parser_member_declaration (cp_parser*
                  token = cp_lexer_peek_token (parser->lexer);
                  /* If the next token is a semicolon, consume it.  */
                  if (token->type == CPP_SEMICOLON)
+                   {
+                     if (pedantic && !in_system_header)
+                       pedwarn ("extra %<;%>");
                    cp_lexer_consume_token (parser->lexer);
+                   }
                  return;
                }
              else

--- g++.dg/other/static1.C
+++ g++.dg/other/static1.C
@@ -13,5 +13,5 @@ struct foo {
 };
 struct bar {
   int z;
-  bar () { foo::x[z]; };
+  bar () { foo::x[z]; }
 };
--- g++.dg/other/init1.C
+++ g++.dg/other/init1.C
@@ -11,7 +11,7 @@ struct B : A
 {
   typedef A Parent;
   
-  B () : Parent () {};
+  B () : Parent () {}
 };
 
 class T
--- g++.dg/rtti/dyncast1.C
+++ g++.dg/rtti/dyncast1.C
@@ -3,7 +3,7 @@ class JunkBase
 public:
     virtual void DoSomething( void ) = 0;
 protected:
-    virtual ~JunkBase( void ) {};
+    virtual ~JunkBase( void ) {}
     JunkBase( void ) {}
 };
 
--- g++.dg/tree-ssa/pr17153.C
+++ g++.dg/tree-ssa/pr17153.C
@@ -11,7 +11,7 @@ struct B : A
     {
         foo(__PRETTY_FUNCTION__);
         return B();
-    };
+    }
 };
 
 B b=B().bar();
--- g++.dg/lookup/disamb1.C
+++ g++.dg/lookup/disamb1.C
@@ -11,5 +11,5 @@ struct B2: public A {};
 
 struct C: public B1, public B2
 {
-  void g() { B1::f(); };
+  void g() { B1::f(); }
 };
--- g++.dg/lookup/scoped2.C
+++ g++.dg/lookup/scoped2.C
@@ -15,5 +15,5 @@ struct Derived : Base
   {
     Base::Baz ();  // { dg-error "is not a member" "" }
       
-  };
+  }
 };
--- g++.dg/lookup/friend7.C
+++ g++.dg/lookup/friend7.C
@@ -1,7 +1,7 @@
 // { dg-do compile }
 // PR c++/7874: Don't inject friend functions into global name space.
 
-namespace N { template<typename T> struct A { friend void f(A) { }; }; }
+namespace N { template<typename T> struct A { friend void f(A) { } }; }
 int main()
 {
    N::A<int> a;
--- g++.dg/parse/parse4.C
+++ g++.dg/parse/parse4.C
@@ -20,6 +20,6 @@ class Camera2
 {
 public:
   Camera2(const Hvec &basepos);
-  inline Camera2() { Camera2(Hvec(0.0,0.0,0.0)); };
+  inline Camera2() { Camera2(Hvec(0.0,0.0,0.0)); }
   ~Camera2();
 };
--- g++.dg/parse/parse5.C
+++ g++.dg/parse/parse5.C
@@ -11,8 +11,8 @@ class BadStream : public ostringstream 
 {    
 public: 
   enum InternalEnum { VALUE = 0 };   
-  BadStream( InternalEnum e ) {};
-  BadStream( InternalEnum e, int i ) {};
+  BadStream( InternalEnum e ) {}
+  BadStream( InternalEnum e, int i ) {}
 };
 
 int main() 
--- g++.dg/expr/pr29066.C
+++ g++.dg/expr/pr29066.C
@@ -11,7 +11,7 @@ struct X
 
 struct Z : public X
 {
-  void a(void) {};
+  void a(void) {}
 };
 
 
--- g++.dg/expr/cast4.C
+++ g++.dg/expr/cast4.C
@@ -10,8 +10,8 @@ struct foo {
 
 class Foobar : public foo {
 public:
-  Foobar() { a = 1; b = 2; };
-  virtual ~Foobar() {};
+  Foobar() { a = 1; b = 2; }
+  virtual ~Foobar() {}
 };
 
 Foobar obj;
--- g++.dg/tc1/dr193.C
+++ g++.dg/tc1/dr193.C
@@ -27,7 +27,7 @@ namespace N1 {
     B x;
     ~C() {
       A y;
-    };
+    }
   };
 }
 
@@ -59,7 +59,7 @@ namespace N2 {
     B<T> x;
     ~C() {
       A<T> y;
-    };
+    }
   };
 }
 
--- g++.dg/tc1/dr213.C
+++ g++.dg/tc1/dr213.C
@@ -14,7 +14,7 @@ template <class T> struct A : T {
 
 struct B {
   void f(B);
-  void g(B) {};
+  void g(B) {}
 };
 
 void f(B) {}
--- g++.dg/abi/dcast1.C
+++ g++.dg/abi/dcast1.C
@@ -5,20 +5,20 @@
 
 // PR 9433. segfault at runtime.
 
-struct A        { virtual void f() {}; };
+struct A        { virtual void f() {} };
 struct B        {int b;};
-struct C : A, B { virtual void f() {}; int c;};
+struct C : A, B { virtual void f() {} int c;};
 struct D : C    {int d;};
 struct E : C    {int e;};
 struct F : protected D, E  {int f;};
 struct H : virtual F {int h;};
 struct I : H  {int i;};
 struct J : H  {int j;};
-struct K : I, J { virtual void f() {}; int k; };
+struct K : I, J { virtual void f() {} int k; };
 struct M : K  {int m;};
 struct N : M  {int n;};
 struct O : M  {int o;};
-struct P : N, O { virtual void f() {}; int p;};
+struct P : N, O { virtual void f() {} int p;};
 
 int main()
 {
--- g++.dg/abi/covariant2.C
+++ g++.dg/abi/covariant2.C
@@ -10,7 +10,7 @@ struct c1 {};
 
 struct c3 : virtual c1
 {
-    virtual c1* f6() {};
+    virtual c1* f6() {}
     int i;
 };
 
@@ -18,7 +18,7 @@ struct c6 : virtual c3 { };
 
 struct c7 : c3
 {
-    virtual c3* f6() {};
+    virtual c3* f6() {}
 };
 
 struct c24 : virtual c7
--- g++.dg/inherit/covariant11.C
+++ g++.dg/inherit/covariant11.C
@@ -7,19 +7,19 @@
 struct c2 { int i; };
 
 struct c1 {
-  virtual c2& f8() {};
+  virtual c2& f8() {}
 };
 
 struct c3 : c1, c2 {
-  virtual c2& f8() {};
+  virtual c2& f8() {}
 };
 
 struct c11 : public c1 {
-  virtual c3& f8() {};
+  virtual c3& f8() {}
 };
 
 struct c15 : virtual c3 {
-  virtual c2& f8() {};
+  virtual c2& f8() {}
 };
 
 struct c18 : virtual c11 {
--- g++.dg/inherit/covariant9.C
+++ g++.dg/inherit/covariant9.C
@@ -9,19 +9,19 @@ struct c1 {};
 
 struct c0 {
   int i;
-  virtual c1& f10() {};
+  virtual c1& f10() {}
 };
 
 struct c2 : virtual c1, c0 { };
 
 struct c6 : virtual c2, c0 {
-  virtual c2& f10() {};
+  virtual c2& f10() {}
 };
 
 struct c14 : virtual c2 { };
 
 struct c19 : virtual ::c6 {
-  virtual class ::c14& f10() {};
+  virtual class ::c14& f10() {}
 };
 
 int main ()
--- g++.dg/inherit/covariant10.C
+++ g++.dg/inherit/covariant10.C
@@ -5,18 +5,18 @@
 // PR c++/12699 ICE with covariancy
 
 struct c1 {
-  virtual void f1() const {};
+  virtual void f1() const {}
 };
 
 struct c5 {};
 
 struct c6 : virtual c1 {
-  virtual c5* f33() const {};
+  virtual c5* f33() const {}
 };
 
 struct c13 : virtual c5 { };
 
 struct c17 : virtual c6
 {
-  virtual c13* f33() const {};
+  virtual c13* f33() const {}
 };
--- g++.dg/init/static3.C
+++ g++.dg/init/static3.C
@@ -3,7 +3,7 @@
 struct T
 {
   static void (*handler)();
-  static void func() {};
+  static void func() {}
 };
 
 bool fail;
--- g++.dg/init/init-ref3.C
+++ g++.dg/init/init-ref3.C
@@ -9,8 +9,8 @@ protected:
 
 public:
   
-  Ptr(void) : ptr(0) { };
-  Ptr(T * p) : ptr(p) { };
+  Ptr(void) : ptr(0) { }
+  Ptr(T * p) : ptr(p) { }
   
   ~Ptr(void) { delete ptr; }
   
--- g++.dg/init/ref10.C
+++ g++.dg/init/ref10.C
@@ -2,10 +2,10 @@
 
 struct A {};
 struct B : protected A {
-    B() {};
-    B(const A& ) {};
+    B() {}
+    B(const A& ) {}
 private:
-    B(const B& ) {};
+    B(const B& ) {}
 };
 
 void foo(const A* ap)
--- g++.dg/template/meminit2.C
+++ g++.dg/template/meminit2.C
@@ -9,13 +9,13 @@ template <typename K1> struct O {  
 template <typename T> 
 struct A : typename O<T>::template I<int> {   // { 
dg-error "keyword 'typename' not allowed" }
   A() :    typename O<T>::template I<int>()   // { 
dg-error "keyword 'typename' not allowed" }
-  {};
+  {}
 };
 
 template <typename T> 
 struct B : O<T>::template I<int> {
   B() :    O<T>::I<int>()   // { dg-error "used as template|it is a 
template" "" }
-  {};
+  {}
 };
 
 // { dg-bogus "end of input" "bogus token skipping in the parser" { xfail 
*-*-* } 17 }
--- g++.dg/template/using9.C
+++ g++.dg/template/using9.C
@@ -4,9 +4,9 @@
 
 // PR c++/17154: Using declaration in partial class template specialization.
 
-template <int numrows, class T> struct A { void test_A() {}; };
+template <int numrows, class T> struct A { void test_A() {} };
 template <int numrows, class T> struct B {};
 template <class T> struct B <3, T> : public A <3, T> {
 	using A <3, T>::test_A;
-	void test_B_spec() { test_A(); };
+	void test_B_spec() { test_A(); }
 };
--- g++.dg/template/friend9.C
+++ g++.dg/template/friend9.C
@@ -14,5 +14,5 @@ template <typename P> class Y {
 };
 
 template <typename T> struct X<1,T> {
-    X () { Y<T>::i; };     // access private field
+    X () { Y<T>::i; }     // access private field
 };
--- g++.dg/template/ref1.C
+++ g++.dg/template/ref1.C
@@ -1,3 +1,3 @@
 class a {} a1;
-template <a & p> class b { public: b() { static_cast <a &> (p); }; };
+template <a & p> class b { public: b() { static_cast <a &> (p); } };
 int main() { b <a1> b1; }
--- g++.old-deja/g++.warn/inline.C
+++ g++.old-deja/g++.warn/inline.C
@@ -29,14 +29,14 @@ void bar1 ()
 struct B
 {
   void mwibble ()
-  {};
+  {}
   void mwobble ()
-  {};                       // { dg-bogus "" } cannot inline
+  {}                        // { dg-bogus "" } cannot inline
   
   static void swibble ()
-  {};
+  {}
   static void swobble ()
-  {};                       // { dg-bogus "" } cannot inline
+  {}                        // { dg-bogus "" } cannot inline
 };
 
 void bar (void (B::*)());
@@ -60,7 +60,7 @@ void bar3 (B *b)
 struct C
 {
   virtual void vwobble ()
-  {};                               // { dg-bogus "" } cannot inline
+  {}                                // { dg-bogus "" } cannot inline
 };
 
 void bar4 ()
--- g++.old-deja/g++.robertl/eb91.C
+++ g++.old-deja/g++.robertl/eb91.C
@@ -23,7 +23,7 @@ private:
     val.i = x;
     std::swap(val.c[0], val.c[1]);
     return val.i;
-  };
+  }
 
   _eb91_int16_t change_endian(_eb91_int16_t x)
   {
@@ -34,7 +34,7 @@ private:
     val.i = x;
     std::swap(val.c[0], val.c[1]);
     return val.i;
-  };
+  }
 public:
   other_endian(const INT i = 0)
   {
--- g++.old-deja/g++.robertl/eb46.C
+++ g++.old-deja/g++.robertl/eb46.C
@@ -4,7 +4,7 @@
 class A1 {
         friend class B;
  public:
-        virtual void foo() {};
+        virtual void foo() {}
 };
 
 class A2 : public virtual A1 {friend class B;};
@@ -14,7 +14,7 @@ class A3 : public virtual A1, private A2
 class B
 {
  public:
-        B(A1* a) : itsA(dynamic_cast<A2*>(a)) {};
+        B(A1* a) : itsA(dynamic_cast<A2*>(a)) {}
         A2* itsA;
 };
 
--- g++.old-deja/g++.robertl/eb34.C
+++ g++.old-deja/g++.robertl/eb34.C
@@ -1,7 +1,7 @@
 // { dg-do assemble  }
 class Base {
 public:
-  class Bar { public: virtual ~Bar() {}; };
+  class Bar { public: virtual ~Bar() {} };
 };
 
 class Derived : public Base {
--- g++.old-deja/g++.robertl/eb43.C
+++ g++.old-deja/g++.robertl/eb43.C
@@ -13,8 +13,8 @@ using namespace std;
 template <class T> class Expr 
 {
 public :
-  Expr(){};
-  Expr(const T&){};
+  Expr(){}
+  Expr(const T&){}
 };
 
 template <class T >
--- g++.old-deja/g++.robertl/eb26.C
+++ g++.old-deja/g++.robertl/eb26.C
@@ -14,7 +14,7 @@ public:
 //  friend int f();
     static int x;
   public:
-    static int f() {return foo::f();};
+    static int f() {return foo::f();}
    };
 };
 
--- g++.old-deja/g++.robertl/eb116.C
+++ g++.old-deja/g++.robertl/eb116.C
@@ -11,7 +11,7 @@ private:
     } val;
     val.i = x;
     return val.c;
-  };
+  }
 
 public:
   b()  {
--- g++.old-deja/g++.brendan/copy5.C
+++ g++.old-deja/g++.brendan/copy5.C
@@ -35,10 +35,10 @@ class BaseClass {
 
 public:
 
-  BaseClass( const BaseClass& ir ) : i(ir.i) {};
-  BaseClass() : i(5) {};
+  BaseClass( const BaseClass& ir ) : i(ir.i) {}
+  BaseClass() : i(5) {}
 
-  virtual int virtMember() { return( 999 ); };
+  virtual int virtMember() { return( 999 ); }
 
   void Increm( int r );
 };
@@ -54,7 +54,7 @@ void BaseClass::Increm( int r )
 
 class DerivedClass : public BaseClass {
 public:
-  int virtMember() { return( 30 ); };
+  int virtMember() { return( 30 ); }
 };
 
 int operator != (const BaseClass irv, int x) { return irv.i != x; }
--- g++.old-deja/g++.brendan/overload8.C
+++ g++.old-deja/g++.brendan/overload8.C
@@ -2,7 +2,7 @@
 // GROUPS passed overloading
 typedef struct{double re,im;} complex;
 class Complex{public:double re,im;
-    inline void operator=(Complex&X){re=X.re; im=X.im;};};
+    inline void operator=(Complex&X){re=X.re; im=X.im;}};
 void zxcvbnm(int n,...){n=1;}
 int main(){complex c; Complex C;
 zxcvbnm(1,c);
--- g++.old-deja/g++.brendan/warnings2.C
+++ g++.old-deja/g++.brendan/warnings2.C
@@ -1,4 +1,5 @@
-// { dg-do assemble  }
+// { dg-do compile  }
+// { dg-options "-Wall -Wextra" }
 // GROUPS passed warnings
 class K {
 public:
--- g++.old-deja/g++.brendan/overload11.C
+++ g++.old-deja/g++.brendan/overload11.C
@@ -5,7 +5,7 @@ class foo_int
 public:
   int & i;
 
-  foo_int (int &j) : i(j) {};
+  foo_int (int &j) : i(j) {}
   void inc () { i++; }
 
 };
--- g++.old-deja/g++.brendan/copy7.C
+++ g++.old-deja/g++.brendan/copy7.C
@@ -8,7 +8,7 @@ void die () { printf ("FAIL\n"); exit (1
 class B {
 public:
   B() {}
-  B(const B &) { printf ("PASS\n"); exit (0); };
+  B(const B &) { printf ("PASS\n"); exit (0); }
 private:
     int x;
 };
--- g++.old-deja/g++.brendan/crash38.C
+++ g++.old-deja/g++.brendan/crash38.C
@@ -24,8 +24,8 @@ public:
 template< class T,  int n> class Implicit : public T {
    public:
      typedef typename T::BASE BASE;
-     Implicit(BASE value ): T(value) {};
-     Implicit() : T() {};
+     Implicit(BASE value ): T(value) {}
+     Implicit() : T() {}
      int myTag() { return n; }
      void encode() { T::encode(); }
      BASE operator=(BASE t) { return T::operator=(t); }
--- g++.old-deja/g++.brendan/template11.C
+++ g++.old-deja/g++.brendan/template11.C
@@ -34,7 +34,7 @@ int aCallback<Called>::callback()
 
 struct myStruct
 {
-  int action() {return 24;};
+  int action() {return 24;}
 };
 
 int main()
--- g++.old-deja/g++.brendan/err-msg3.C
+++ g++.old-deja/g++.brendan/err-msg3.C
@@ -10,7 +10,7 @@
 class test{
 public:
 	int	flags;
-	test()	{};
+	test()	{}
 	};
 
 int main()
--- g++.old-deja/g++.brendan/crash50.C
+++ g++.old-deja/g++.brendan/crash50.C
@@ -17,7 +17,7 @@ public:
         C &operator = (const C &x)
                 {
                 return *this;
-                };
+                }
         };
 
 C &(C::*DD)(const C &x) = &C::operator=;
--- g++.old-deja/g++.brendan/crash16.C
+++ g++.old-deja/g++.brendan/crash16.C
@@ -3,7 +3,7 @@
 class Graph {
 public:
       unsigned         char N;
-      Graph(void) {}; // { dg-error "previously defined here" }
+      Graph(void) {} // { dg-error "previously defined here" }
 }
 
 Graph::Graph(void)    // { dg-error "return type|redefinition|semicolon" }
--- g++.old-deja/g++.jason/pmem2.C
+++ g++.old-deja/g++.jason/pmem2.C
@@ -31,7 +31,7 @@ int aCallback<Called>::callback()
 
 struct myStruct
 {
-  int action() {return 0;};
+  int action() {return 0;}
 };
 
 int main()
--- g++.old-deja/g++.jason/parse9.C
+++ g++.old-deja/g++.jason/parse9.C
@@ -6,7 +6,7 @@ class Fu
 {
   int val;
 public:
-  Fu(int i) : val(i) { };
+  Fu(int i) : val(i) { }
   void print() { }
 };
 
--- g++.old-deja/g++.jason/byval2.C
+++ g++.old-deja/g++.jason/byval2.C
@@ -8,7 +8,7 @@ class Char
 protected:
   char          rep;
 public:
-  Char (const char ) {};
+  Char (const char ) {}
   operator char() const;
   void  operator -= (const Char   );
 };
--- g++.old-deja/g++.jason/overload8.C
+++ g++.old-deja/g++.jason/overload8.C
@@ -2,6 +2,6 @@
 // Bug: g++ fails to catch the ambiguity below.
 
 struct A {
-  operator int () { return 1; };
-  operator int &() { return 1; }; // { dg-error "" } 
+  operator int () { return 1; }
+  operator int &() { return 1; } // { dg-error "" } 
 };
--- g++.old-deja/g++.jason/pmf8.C
+++ g++.old-deja/g++.jason/pmf8.C
@@ -3,7 +3,7 @@
 
 class Parent {
 public:
-  void DoSomething() { return; };
+  void DoSomething() { return; }
   int i;
 };
 
--- g++.old-deja/g++.jason/template33.C
+++ g++.old-deja/g++.jason/template33.C
@@ -7,7 +7,7 @@ class A
 public:
   enum muni {X, Y};
   
-  muni e() { return X; };
+  muni e() { return X; }
   muni f();
 };
 
--- g++.old-deja/g++.jason/return3.C
+++ g++.old-deja/g++.jason/return3.C
@@ -2,7 +2,7 @@
 // PRMS id: 10912
 
 struct A {
-  A() { i=10; };
+  A() { i=10; }
   int i;
 };
 struct B : public A {};
--- g++.old-deja/g++.jason/scoping2.C
+++ g++.old-deja/g++.jason/scoping2.C
@@ -7,8 +7,8 @@ struct A
     struct B
     {
 	int f;
-	B() : f(0) {};
-	void g() { f = 0; };
+	B() : f(0) {}
+	void g() { f = 0; }
     };
     void f();
     void f(int);
--- g++.old-deja/g++.jason/virtual.C
+++ g++.old-deja/g++.jason/virtual.C
@@ -24,15 +24,15 @@ public:
 class C: public A, public B
 {
 public:
-  virtual void a2() {};
-  virtual void b2() {};
+  virtual void a2() {}
+  virtual void b2() {}
 };
 
 class D : public C
 {
 public:
-  virtual void a1() {};
-  virtual void b1() {};
+  virtual void a1() {}
+  virtual void b1() {}
 };
 
 int main()
--- g++.old-deja/g++.jason/opeq3.C
+++ g++.old-deja/g++.jason/opeq3.C
@@ -4,7 +4,7 @@
 class X { // { dg-error "assignment" }
   int& a;
 public:
-  X(int& i): a(i) { };
+  X(int& i): a(i) { }
 };
 
 void foo ()
--- g++.old-deja/g++.jason/template27.C
+++ g++.old-deja/g++.jason/template27.C
@@ -29,13 +29,13 @@ void Test<T>::doThat() 
 class A 
 { 
  public: 
-  void thiss() {}; 
+  void thiss() {}
 };
 
 class B
 { 
  public: 
-  void that() {}; 
+  void that() {}
 };
 
 int main() 
--- g++.old-deja/g++.jason/synth6.C
+++ g++.old-deja/g++.jason/synth6.C
@@ -11,5 +11,5 @@ private:
 
 class DbmItem: public RefCount{
 public:
-  DbmItem(): RefCount() {};
+  DbmItem(): RefCount() {}
 };
--- g++.old-deja/g++.jason/ref8.C
+++ g++.old-deja/g++.jason/ref8.C
@@ -4,7 +4,7 @@
 
 struct A {};
 struct B {
-  virtual void foo () {};
+  virtual void foo () {}
 };
 struct C : public B, public A {};
 
--- g++.old-deja/g++.jason/offset1.C
+++ g++.old-deja/g++.jason/offset1.C
@@ -2,7 +2,7 @@
 // PRMS Id: 5070 (testcase 1)
 
 struct foo {
-  foo(int x = 0) {};
+  foo(int x = 0) {}
   int IsAlive(void) { return 1; }
 };
 
--- g++.old-deja/g++.other/static20.C
+++ g++.old-deja/g++.other/static20.C
@@ -1,9 +1,9 @@
 // { dg-do link  }
 struct foo
 {
-  foo() {};
-  ~foo() {};
-  void func() { static foo x; };
+  foo() {}
+  ~foo() {}
+  void func() { static foo x; }
 };
 
 int main()
--- g++.old-deja/g++.other/array1.C
+++ g++.old-deja/g++.other/array1.C
@@ -6,7 +6,7 @@ struct S {
     ++i;
     if (i == 3)
       throw 3;
-  };
+  }
 
   S () {}
 
--- g++.old-deja/g++.other/new3.C
+++ g++.old-deja/g++.other/new3.C
@@ -12,7 +12,7 @@ struct A
       p = new T[size];
       int foo;
       foo = 5 * size;
-    };
+    }
 };
 
 struct B
--- g++.old-deja/g++.other/array2.C
+++ g++.old-deja/g++.other/array2.C
@@ -4,10 +4,10 @@ int i;
 struct S {
   S () {
     ++i;
-  };
+  }
 
   S (int) {
-  };
+  }
 };
 
 int main()
--- g++.old-deja/g++.other/overload9.C
+++ g++.old-deja/g++.other/overload9.C
@@ -1,5 +1,5 @@
 // { dg-do run  }
-struct T { ~T() {}; };
+struct T { ~T() {} };
 
 int g ()
 {
--- g++.old-deja/g++.other/cast6.C
+++ g++.old-deja/g++.other/cast6.C
@@ -24,7 +24,7 @@ struct baz : filler1, bar, filler2
 struct foo : filler3, virtual baz, filler4
 {
     static void a();
-    void b() {};
+    void b() {}
     int m;
 };
 
--- g++.old-deja/g++.other/ptrmem8.C
+++ g++.old-deja/g++.other/ptrmem8.C
@@ -23,7 +23,7 @@ struct baz : filler1, bar, filler2
 struct foo : filler3, virtual baz, filler4
 {
     static void a();
-    void b() {};
+    void b() {}
     int m;
 };
 
--- g++.old-deja/g++.other/eh4.C
+++ g++.old-deja/g++.other/eh4.C
@@ -3,10 +3,10 @@
 
 class foo {
 public:
-  foo() {};
+  foo() {}
   void throwMe () {
     throw *this;                // { dg-error "" } cannot be used in 
throw-expression
-  };
+  }
   virtual void test () = 0;
 };
 
--- g++.old-deja/g++.other/using7.C
+++ g++.old-deja/g++.other/using7.C
@@ -2,7 +2,7 @@
 
 class A {
 protected:
-  static void f() {};
+  static void f() {}
 };
 
 class B : A {
--- g++.old-deja/g++.other/init18.C
+++ g++.old-deja/g++.other/init18.C
@@ -15,8 +15,8 @@ static int cnt = 0;
 class Foo2
 {
 	public:
-		Foo2() {};
-		~Foo2() { if (++cnt == 2) _exit (0); };
+		Foo2() {}
+		~Foo2() { if (++cnt == 2) _exit (0); }
 };
 
 static Foo2& GetFoo2()
@@ -29,7 +29,7 @@ class Foo1
 {
 	public:
 		Foo1() {}
-		~Foo1() { if (++cnt != 1) abort(); GetFoo2(); };
+		~Foo1() { if (++cnt != 1) abort(); GetFoo2(); }
 };
 
 int main( int argc, const char* argv[] )
--- g++.old-deja/g++.other/dyncast1.C
+++ g++.old-deja/g++.other/dyncast1.C
@@ -96,7 +96,7 @@ test03 ()
 
 // 2. crosscast
 
-struct J {virtual ~J(){};};
+struct J {virtual ~J(){}};
 struct K : CC, private J {}; 
 class KK : J, CC{};
 		
--- g++.old-deja/g++.other/dyncast2.C
+++ g++.old-deja/g++.other/dyncast2.C
@@ -19,7 +19,7 @@ void error(int i)
 // 1. downcast
 // 1.1 single inheritance case
 
-struct A {virtual ~A(){};int i;};
+struct A {virtual ~A(){} int i;};
 struct B : A {int i;};
 struct C : B {int i;};
 struct CC : C {};
--- g++.old-deja/g++.other/dtor11.C
+++ g++.old-deja/g++.other/dtor11.C
@@ -16,7 +16,7 @@ struct S {
 
 struct T {
   void g (S) {
-  };
+  }
 };
 
 struct U {
--- g++.old-deja/g++.pt/static11.C
+++ g++.old-deja/g++.pt/static11.C
@@ -13,7 +13,7 @@ int r = 1;
 
 struct A
 {
-  void f(){};
+  void f(){}
   A(){ ++r; }
   ~A(){ r -= 2; _exit (r); }
 };
--- g++.old-deja/g++.pt/crash19.C
+++ g++.old-deja/g++.pt/crash19.C
@@ -9,7 +9,7 @@ void f()
     void g() {
       C e;
       e.c = 3;
-    };
+    }
   };
 
   S s;
--- g++.old-deja/g++.pt/overload12.C
+++ g++.old-deja/g++.pt/overload12.C
@@ -7,8 +7,8 @@ template <int N> struct A {
 };
 
 template <int N> struct B {
-  B () { };
-  B (const A<N> &) { };
+  B () { }
+  B (const A<N> &) { }
   B (const A<N-1> &, int);
 };
 
--- g++.old-deja/g++.pt/crash46.C
+++ g++.old-deja/g++.pt/crash46.C
@@ -2,7 +2,7 @@
 // Origin: Leon Bottou <leonb@research.att.com>
 
 class AA { protected:
-  template <class T> struct BB { T x; BB(const T &x) : x(x) { }; };
-  template <class T> struct CC : public BB<T> { CC(const T &x) : BB<T>(x) 
{ };
+  template <class T> struct BB { T x; BB(const T &x) : x(x) { } };
+  template <class T> struct CC : public BB<T> { CC(const T &x) : BB<T>(x) { }
 };
 };
--- g++.old-deja/g++.pt/mi1.C
+++ g++.old-deja/g++.pt/mi1.C
@@ -18,7 +18,7 @@ class PK_FixedLengthEncryptor : public v
 class PK_SignatureSystem
 {
 public:
-	virtual ~PK_SignatureSystem() {};
+	virtual ~PK_SignatureSystem() {}
 };
 class PK_Signer : public virtual PK_SignatureSystem
 {
--- g++.old-deja/g++.pt/vaarg3.C
+++ g++.old-deja/g++.pt/vaarg3.C
@@ -5,7 +5,7 @@
 #include <stdarg.h>
 
 struct A {
-  virtual ~A () {};
+  virtual ~A () {}
 };
 
 template <class Type>
--- g++.old-deja/g++.pt/nontype5.C
+++ g++.old-deja/g++.pt/nontype5.C
@@ -13,7 +13,7 @@ typedef int F();
 
 template<class T, typename A<T>::F f>
 struct B {
-static int g() { return f(); };
+static int g() { return f(); }
 };
 
 int f() { return 0; }
--- g++.old-deja/g++.pt/local5.C
+++ g++.old-deja/g++.pt/local5.C
@@ -11,7 +11,7 @@ private:
     } val;
     val.i = x;
     return val.c;
-  };
+  }
 
 public:
   b()  {
--- g++.old-deja/g++.pt/typename2.C
+++ g++.old-deja/g++.pt/typename2.C
@@ -2,7 +2,7 @@
 
 class Base {
 public:
-  class Bar { public: virtual ~Bar() {}; };
+  class Bar { public: virtual ~Bar() {} };
 };
 
 class Derived : public Base {
--- g++.old-deja/g++.pt/explicit80.C
+++ g++.old-deja/g++.pt/explicit80.C
@@ -5,7 +5,7 @@ template <class T>
 struct A
 {
  public:
-  ~A() { };
+  ~A() { }
 
   class B;
 };
--- g++.old-deja/g++.pt/auto_ptr.C
+++ g++.old-deja/g++.pt/auto_ptr.C
@@ -40,7 +40,7 @@ template<typename X> struct auto_ptr {
 };
 
 struct Base { Base() {} virtual ~Base() {} };
-struct Derived : Base { Derived() {}; };
+struct Derived : Base { Derived() {} };
 
 auto_ptr<Derived> f() { auto_ptr<Derived> null(0); return null; }
 void g(auto_ptr<Derived>) { }
--- g++.old-deja/g++.law/visibility1.C
+++ g++.old-deja/g++.law/visibility1.C
@@ -8,17 +8,17 @@ class base {
 //==========
 
     void base_priv(const char * n) 		
-	{ std::cout << "base_priv called from: " << n << "\n";  };
+	{ std::cout << "base_priv called from: " << n << "\n";  }
 
 protected:
 
     void base_prot(const char * n) 
-	{ std::cout << "base_prot called from: " << n << "\n"; };
+	{ std::cout << "base_prot called from: " << n << "\n"; }
 
 public:
 
     void base_publ(const char * n) 
-	{ std::cout << "base_publ called from: " << n << "\n"; };
+	{ std::cout << "base_publ called from: " << n << "\n"; }
 
     void test(const char * n) { base_publ(n); base_prot(n); base_priv(n); }
 
--- g++.old-deja/g++.law/visibility2.C
+++ g++.old-deja/g++.law/visibility2.C
@@ -8,17 +8,17 @@ class base {
 //==========
 
     void base_priv(const char * n) 		
-	{ std::cout << "base_priv called from: " << n << "\n";  };
+	{ std::cout << "base_priv called from: " << n << "\n";  }
 
 protected:
 
     void base_prot(const char * n) 
-	{ std::cout << "base_prot called from: " << n << "\n"; };
+	{ std::cout << "base_prot called from: " << n << "\n"; }
 
 public:
 
     void base_publ(const char * n) 
-	{ std::cout << "base_publ called from: " << n << "\n"; };
+	{ std::cout << "base_publ called from: " << n << "\n"; }
 
     void test(const char * n) { base_publ(n); base_prot(n); base_priv(n); }
 
--- g++.old-deja/g++.law/virtual2.C
+++ g++.old-deja/g++.law/virtual2.C
@@ -12,7 +12,7 @@ class doubleclass
 {
 	public:
 		double	d;
-		doubleclass(double x = 0)	{ d = x; };
+		doubleclass(double x = 0)	{ d = x; }
 };
 
 class test
--- g++.old-deja/g++.law/operators19.C
+++ g++.old-deja/g++.law/operators19.C
@@ -15,5 +15,5 @@ class B: public A {
   public:
     B () {
         !(A::j);
-    };
+    }
 };
--- g++.old-deja/g++.law/parsing10.C
+++ g++.old-deja/g++.law/parsing10.C
@@ -19,7 +19,7 @@ public:
 class l
 {
 public:
-  void s() {};
+  void s() {}
 };
 
 extern t<l> g;
@@ -28,5 +28,5 @@ class p
 {
 public:
   void *h;
-  s *a() {return (s *) h;};
+  s *a() {return (s *) h;}
 };
--- g++.old-deja/g++.law/visibility4.C
+++ g++.old-deja/g++.law/visibility4.C
@@ -21,5 +21,5 @@ extern "C" int printf( const char *, ...
 class E : public C {
         void f() {
                 printf( "%d\n", b);// { dg-error "" } .*
-        };
+        }
 };
--- g++.old-deja/g++.law/operators4.C
+++ g++.old-deja/g++.law/operators4.C
@@ -14,7 +14,7 @@ class Vector {
   int           size;
   Complex       *v;
  public:
-  Vector(int s=1) { size = s; v = new Complex[size];};
+  Vector(int s=1) { size = s; v = new Complex[size];}
   ~Vector() { delete [size] v;}// { dg-error "" }  warning
 };
 
--- g++.old-deja/g++.law/dtors2.C
+++ g++.old-deja/g++.law/dtors2.C
@@ -8,19 +8,19 @@ class bla {
 
 public:
 
-        inline bla(const char * jim) { ; };
+        inline bla(const char * jim) { ; }
 
-        inline ~bla() { destruct++; if (destruct == 2) printf ("PASS\n");};
+        inline ~bla() { destruct++; if (destruct == 2) printf ("PASS\n");}
 };
 
 class ulk {
 
 public:
 
-        inline ulk() {};
-        inline ~ulk() {};
+        inline ulk() {}
+        inline ~ulk() {}
 
-        void funk(const bla & bob) { ;};
+        void funk(const bla & bob) { ;}
              //       ^ interestingly, the code compiles right if
              //         this & is deleted (and therefore the parameter
              //         passed as value)
--- g++.old-deja/g++.law/missed-error3.C
+++ g++.old-deja/g++.law/missed-error3.C
@@ -15,7 +15,7 @@ class Traversable {
 public:
     virtual const T item() const = 0;
     virtual const bool off() const = 0;
-    virtual ~Traversable() { };
+    virtual ~Traversable() { }
 };
 
 class Chain : public Traversable {
@@ -47,7 +47,7 @@ protected:
     virtual void go_offright() const = 0;
     virtual void copy(const List& other) = 0;
 public:
-    List() : item_count(0), cursor_position(0) { };
+    List() : item_count(0), cursor_position(0) { }
     virtual const int count() const;
     virtual const bool empty() const;
     virtual const bool isfirst() const;
@@ -105,7 +105,7 @@ protected:
     virtual void copy(const List& other);
 public:
     Fixed_List(const List& other);
-    Fixed_List(const int size): Array(1, size) { };
+    Fixed_List(const int size): Array(1, size) { }
     virtual const bool empty() const;
     virtual const int count() const;
     virtual const T item() const;
@@ -113,7 +113,7 @@ public:
     virtual void move(const int index) const;
     virtual void put(const T value);
     virtual void put_i_th(const T value, const int index);
-    virtual void wipe_out() { };
+    virtual void wipe_out() { }
     Fixed_List& operator=(const List& other);
 };
 
--- g++.old-deja/g++.law/visibility10.C
+++ g++.old-deja/g++.law/visibility10.C
@@ -5,8 +5,8 @@
 
 class base {
 public:
-  void f1 () { std::cout << "f1" << std::endl; };
-  void f2 () { std::cout << "f2" << std::endl; };
+  void f1 () { std::cout << "f1" << std::endl; }
+  void f2 () { std::cout << "f2" << std::endl; }
 };
 
 class deriv : public base {
--- g++.old-deja/g++.law/scope3.C
+++ g++.old-deja/g++.law/scope3.C
@@ -11,12 +11,12 @@ void f()
 {
         {
                 struct A {
-                        A() {};
+                        A() {}
                 } a;
         };
         {
                 struct A {
-                        A() {};
+                        A() {}
                 } a ;
         };
 }
--- g++.old-deja/g++.law/casts2.C
+++ g++.old-deja/g++.law/casts2.C
@@ -16,7 +16,7 @@ class VObject {
     boolean perform(method );
     boolean perform(method , long);
     void    affectMethod(method );
-    void    dummy(){};
+    void    dummy(){}
 };
 
 
--- g++.old-deja/g++.law/code-gen5.C
+++ g++.old-deja/g++.law/code-gen5.C
@@ -70,7 +70,7 @@ class Vector 
 	Vector( int, double *, int beg = 0 );
 	Vector( const Vector & );
 	Vector &operator=( const Vector & );
-	~Vector() { if(r) r->unrefer(); };
+	~Vector() { if(r) r->unrefer(); }
 
 	int row() const { return 19; }
 	int dim() const { return 10; }
--- g++.old-deja/g++.law/operators33.C
+++ g++.old-deja/g++.law/operators33.C
@@ -18,7 +18,7 @@ struct fcell {
 class FStack {
 public:
         struct fcell *top;
-        FStack() { top = NULL ; } ;
+        FStack() { top = NULL ; }
         inline void push(FILE * fd1, int line_num, char *fname = NULL) {
                 struct fcell *tmp = new struct fcell;
                 tmp->fd = fd1;
--- g++.old-deja/g++.law/friend4.C
+++ g++.old-deja/g++.law/friend4.C
@@ -15,5 +15,5 @@ class T {
 class T2 {
       friend void f (int& i)  { // BOGUS - 
       i = 1;
-   };
+   }
 };
--- g++.old-deja/g++.mike/pmf7.C
+++ g++.old-deja/g++.mike/pmf7.C
@@ -4,8 +4,8 @@ typedef int (A::*f_ptr) (void);
 
 class B {
 public:
-  B() {}; ~B() {};
-  B& dummy(f_ptr cb) { return *this; };
+  B() {} ~B() {}
+  B& dummy(f_ptr cb) { return *this; }
 };
 
 template<class SP, class CB> SP& call_dummy(SP* sp, CB cb) {
@@ -15,12 +15,12 @@ template<class SP, class CB> SP& call_du
 
 class A {
 public:
-  A() {}; ~A() {};
-  int ok() { return 0; };
+  A() {} ~A() {}
+  int ok() { return 0; }
   A& call_it(B* s) {
     call_dummy(s, &A::ok);
     return *this;
-  };
+  }
 };
 
 int main() {
--- g++.old-deja/g++.mike/p5611.C
+++ g++.old-deja/g++.mike/p5611.C
@@ -5,7 +5,7 @@ int main(void)
 {
   struct B
     {
-      virtual void b1() { };
+      virtual void b1() { }
     };
 
   return 0;
--- g++.old-deja/g++.mike/net37.C
+++ g++.old-deja/g++.mike/net37.C
@@ -17,7 +17,7 @@ typedef void (D::*DPROC)(void);
 union AFX_PMSG {
 public:
 
-  AFX_PMSG () {};
+  AFX_PMSG () {}
   AFX_PMSG ( BPROC bpr ) { bfn = bpr ; }
 
   operator BPROC() { return bfn; }
--- g++.old-deja/g++.mike/p3570.C
+++ g++.old-deja/g++.mike/p3570.C
@@ -4,17 +4,17 @@
 extern "C" int printf(const char *, ...);
 
 struct A {
-   void print() {printf("A");};
+   void print() {printf("A");}
 };
 
 struct B :  A {
    typedef A superB;
-   void print() {superB::print(); printf("B");};
+   void print() {superB::print(); printf("B");}
 };
 
 struct C :  B {
    typedef B superC;
-   void print() {superC::print(); printf("C");};
+   void print() {superC::print(); printf("C");}
 };
 
 int main ()
--- g++.old-deja/g++.mike/p5718.C
+++ g++.old-deja/g++.mike/p5718.C
@@ -4,7 +4,7 @@
 class Base {
   int i;
 public:
-  Base() { i = 42; };
+  Base() { i = 42; }
 };
 
 
@@ -17,8 +17,8 @@ public:
 
 class Derived : public Base, public Mixin {
 public:
-  Derived() { };
-  Derived & operator=(Mixin & m) { return *this; };
+  Derived() { }
+  Derived & operator=(Mixin & m) { return *this; }
 };
 
 
--- g++.old-deja/g++.mike/net21.C
+++ g++.old-deja/g++.mike/net21.C
@@ -10,7 +10,7 @@ struct a
 
 struct b
 {
-    virtual void g() { };
+    virtual void g() { }
 };
 
 struct c: public a, public b
--- g++.old-deja/g++.mike/p1862.C
+++ g++.old-deja/g++.mike/p1862.C
@@ -5,7 +5,7 @@ extern "C" int printf (const char *, ...
 class A
 {
 public:
-  virtual ~A(){};
+  virtual ~A(){}
   virtual int type(void)
   {
     return -1;
@@ -15,7 +15,7 @@ public:
 class B
 {
 public:
-  virtual ~B(){};
+  virtual ~B(){}
 };
 
 
--- g++.old-deja/g++.mike/p4511.C
+++ g++.old-deja/g++.mike/p4511.C
@@ -5,7 +5,7 @@ int bad;
 
 class A {
 public:
-  virtual void dummy (){};
+  virtual void dummy (){}
 };
 
 class B {
@@ -15,12 +15,12 @@ public:
 
 class C : public A, public B {
 public:
-  void f(void) { bad=1; };
+  void f(void) { bad=1; }
 };
 
 class D : public C {
 public:
-  void f(void) { };
+  void f(void) { }
 };
 
 class E : public D { };
--- g++.old-deja/g++.mike/virt3.C
+++ g++.old-deja/g++.mike/virt3.C
@@ -3,7 +3,7 @@
 class B {
 public:
   int Bi;
-  virtual int g() { return  0; };
+  virtual int g() { return  0; }
 };
 
 class D : private B {
--- g++.old-deja/g++.mike/p16146.C
+++ g++.old-deja/g++.mike/p16146.C
@@ -5,8 +5,8 @@ extern "C" int printf (const char *, ...
 
 class myFoundation {
 protected:
-  myFoundation () { count = 0; };
-  virtual ~myFoundation () {};
+  myFoundation () { count = 0; }
+  virtual ~myFoundation () {}
 
 public:
   void addRef () { ++count; }
@@ -19,8 +19,8 @@ private:
 
 class firstIntermediate :virtual public myFoundation {
 public:
-  firstIntermediate () {};
-  ~firstIntermediate () {};
+  firstIntermediate () {}
+  ~firstIntermediate () {}
 
   void bar () { printf ("Bar\n"); }
 };
@@ -28,58 +28,58 @@ public:
 
 class firstBase	:  public firstIntermediate {
 public:
-  firstBase () {};
-  ~firstBase () {};
+  firstBase () {}
+  ~firstBase () {}
 
-  virtual void g () {};
+  virtual void g () {}
 };
 
 
 class secondIntermediate : virtual public myFoundation {
 public:
-  secondIntermediate () {};
-  ~secondIntermediate () {};
+  secondIntermediate () {}
+  ~secondIntermediate () {}
 
-  virtual void h () {};
+  virtual void h () {}
 };
 
 
 class secondBase : public secondIntermediate {
 public:
-  secondBase () {};
-  ~secondBase () {};
+  secondBase () {}
+  ~secondBase () {}
 
-  virtual void h () {};
+  virtual void h () {}
 };
 
 
 class typeInterface : virtual public firstBase {
 public:
-  typeInterface () {};
-  ~typeInterface () {};
+  typeInterface () {}
+  ~typeInterface () {}
 
-  virtual void i () {};
+  virtual void i () {}
 };
 
 class classServices : virtual public firstBase,
 		      public secondBase {
 public:
-  classServices () {};
-  ~classServices () {};
+  classServices () {}
+  ~classServices () {}
 
-  virtual void j () {};
+  virtual void j () {}
 };
 
 class classImplementation : public typeInterface,
 			    public classServices {
 public:
-  classImplementation () {};
-  ~classImplementation () {};
+  classImplementation () {}
+  ~classImplementation () {}
 
-  void g () {};
-  void h () {};
-  void i () {};
-  void j () {};
+  void g () {}
+  void h () {}
+  void i () {}
+  void j () {}
 };
 
 int main () {
--- g++.old-deja/g++.mike/p1989.C
+++ g++.old-deja/g++.mike/p1989.C
@@ -12,9 +12,9 @@ struct link {
     link *prev;
 
     link(const T& t): item(t), prev(0), next(0)
-	{ };
+	{ }
     link(const T& t, link<T> *p, link<T> *n): item(t), prev(p), next(n)
-	{ };
+	{ }
 };
 
 template<class T>
@@ -182,9 +182,9 @@ template<class T>
 class List_DLS: public List_DL<T> {
 public:
     List_DLS(): List_DL<T>()
-	{ };
+	{ }
     List_DLS(const List_DLS& other): List_DL<T>(other)
-	{ };
+	{ }
 
     bool contains(const T& item) const
 	{ return search(item) != 0 ? TRUE: FALSE; }
@@ -206,9 +206,9 @@ template<class T>
 class List_DLSp: public List_DL<T> {
 public:
     List_DLSp(): List_DL<T>()
-	{ };
+	{ }
     List_DLSp(const List_DLSp& other): List_DL<T>(other)
-	{ };
+	{ }
 
     bool contains(const T& item) const
 #ifndef INTERNAL_ERROR
@@ -335,9 +335,9 @@ struct vertex {
     List_DL<vertex<T> *> fanout;
 
     vertex(): item(), fanout()	// { dg-bogus "" } 
-      { };
+      { }
     vertex(const T& i): item(), fanout() // { dg-bogus "" } 
-      { };
+      { }
 };
 
 template<class T>
--- g++.old-deja/g++.mike/p5571.C
+++ g++.old-deja/g++.mike/p5571.C
@@ -6,9 +6,9 @@ void *vp = 0;
 
 class ParentOne {
 public:
-  ParentOne() {};
+  ParentOne() {}
 #ifdef MAKE_WORK
-  virtual ~ParentOne() {};
+  virtual ~ParentOne() {}
 #endif
 private:
   char SomeData[101];
@@ -16,8 +16,8 @@ private:
 
 class ParentTwo {
 public:
-  ParentTwo() {};
-  virtual ~ParentTwo() {};
+  ParentTwo() {}
+  virtual ~ParentTwo() {}
 private:
   int MoreData[12];
   virtual int foo() { return 0; }
--- g++.old-deja/g++.gb/scope10.C
+++ g++.old-deja/g++.gb/scope10.C
@@ -4,6 +4,6 @@ void Foo (void)
 {
   class C {
   public:
-    virtual int foo (void) { return 0; };
+    virtual int foo (void) { return 0; }
   };
 }
--- g++.old-deja/g++.abi/primary5.C
+++ g++.old-deja/g++.abi/primary5.C
@@ -6,7 +6,7 @@
 
 struct A1
 {
-   virtual void Foo () {};
+   virtual void Foo () {}
 };
 
 struct A : A1
--- g++.old-deja/g++.abi/empty2.C
+++ g++.old-deja/g++.abi/empty2.C
@@ -17,35 +17,35 @@ struct B8 : A {};
 
 struct C1 : B1
 {
-  virtual void Foo () {};
+  virtual void Foo () {}
 };
 struct C2 : B1, B2
 {
-  virtual void Foo () {};
+  virtual void Foo () {}
 };
 struct C3 : B1, B2, B3
 {
-  virtual void Foo () {};
+  virtual void Foo () {}
 };
 struct C4 : B1, B2, B3, B4
 {
-  virtual void Foo () {};
+  virtual void Foo () {}
 };
 struct C5 : B1, B2, B3, B4, B5
 {
-  virtual void Foo () {};
+  virtual void Foo () {}
 };
 struct C6 : B1, B2, B3, B4, B5, B6
 {
-  virtual void Foo () {};
+  virtual void Foo () {}
 };
 struct C7 : B1, B2, B3, B4, B5, B6, B7
 {
-  virtual void Foo () {};
+  virtual void Foo () {}
 };
 struct C8 : B1, B2, B3, B4, B5, B6, B7, B8
 {
-  virtual void Foo () {};
+  virtual void Foo () {}
 };
 
 struct D1 : virtual C1 {};
--- g++.old-deja/g++.abi/arraynew.C
+++ g++.old-deja/g++.abi/arraynew.C
@@ -94,19 +94,19 @@ void check_placement_cookie (int i)
 struct X {};
 
 template <typename T>
-struct Y { int i; virtual void f () {}; };
+struct Y { int i; virtual void f () {} };
 
 // A class with a non-trivial destructor -- it needs a cookie.
-struct Z { ~Z () {}; };
+struct Z { ~Z () {} };
 // Likewise, but this class needs a bigger cookie so that the array
 // elements are correctly aligned.
-struct Z2 { ~Z2 () {}; long double d; };
+struct Z2 { ~Z2 () {} long double d; };
   
-struct W1 { void operator delete[] (void *, size_t) {}; };
-struct W2 { void operator delete[] (void *) {}; 
-            void operator delete[] (void *, size_t) {}; };
-struct W3 { void operator delete[] (void *, size_t) {}; 
-            void operator delete[] (void *) {}; };
+struct W1 { void operator delete[] (void *, size_t) {} };
+struct W2 { void operator delete[] (void *) {}
+            void operator delete[] (void *, size_t) {} };
+struct W3 { void operator delete[] (void *, size_t) {}
+            void operator delete[] (void *) {} };
 struct W4 : public W1 {};
 
 struct V { void *operator new[] (size_t s, void *p) 
--- g++.old-deja/g++.eh/vbase4.C
+++ g++.old-deja/g++.eh/vbase4.C
@@ -13,8 +13,8 @@ static int ok = 0;
 
 struct A
 {
-  A (){};
-  virtual ~A () {};
+  A (){}
+  virtual ~A () {}
 };
 
 struct B : virtual A
--- g++.old-deja/g++.eh/ptr1.C
+++ g++.old-deja/g++.eh/ptr1.C
@@ -5,7 +5,7 @@ extern "C" int printf (const char *, ...
 
 struct E {
   int x;
-  E(int i) { x = i; };
+  E(int i) { x = i; }
 };
 
 int main()
--- g++.old-deja/g++.eh/cleanup1.C
+++ g++.old-deja/g++.eh/cleanup1.C
@@ -13,7 +13,7 @@ struct myExcRaiser {
 };
 
 struct stackObj {
-  ~stackObj() { ++d; printf ("stackObj::~stackObj()\n"); };
+  ~stackObj() { ++d; printf ("stackObj::~stackObj()\n"); }
 };
 
 int test()
--- g++.old-deja/g++.bob/template3.C
+++ g++.old-deja/g++.bob/template3.C
@@ -38,7 +38,7 @@ public:
 class ObjectExchange
 {
 public:
-    ObjectExchange() {};
+    ObjectExchange() {}
 
     ExchangeableList	i_theWatchList; // Instruments being monitored
 };
--- g++.old-deja/g++.bob/inherit1.C
+++ g++.old-deja/g++.bob/inherit1.C
@@ -2,7 +2,7 @@
 class A {
 char str[10];
 public:
-    char* m1 () { return str;};
+    char* m1 () { return str;}
 };
 
 class C : public A {



More information about the Gcc-patches mailing list