OSDN Git Service

* parser.c (cp_parser_class_specifier): Set class location to that
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 6 Apr 2010 21:13:07 +0000 (21:13 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 6 Apr 2010 21:13:07 +0000 (21:13 +0000)
of IDENTIFIER_NODE instead of '{' when possible.
* semantics.c (begin_class_definition): Do not overide locations
with less precise ones.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158030 138bc75d-0d04-0410-961f-82ee72b054a4

47 files changed:
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/cp/semantics.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/pr31437.C
gcc/testsuite/g++.dg/ext/attrib18.C
gcc/testsuite/g++.dg/ext/bitfield2.C
gcc/testsuite/g++.dg/ext/bitfield4.C
gcc/testsuite/g++.dg/ext/visibility/warn2.C
gcc/testsuite/g++.dg/ext/visibility/warn3.C
gcc/testsuite/g++.dg/gomp/pr26690-1.C
gcc/testsuite/g++.dg/inherit/covariant7.C
gcc/testsuite/g++.dg/init/synth2.C
gcc/testsuite/g++.dg/lookup/using7.C
gcc/testsuite/g++.dg/other/crash-4.C
gcc/testsuite/g++.dg/other/error13.C
gcc/testsuite/g++.dg/other/error20.C
gcc/testsuite/g++.dg/parse/crash31.C
gcc/testsuite/g++.dg/parse/error16.C
gcc/testsuite/g++.dg/parse/error19.C
gcc/testsuite/g++.dg/parse/error27.C
gcc/testsuite/g++.dg/parse/error28.C
gcc/testsuite/g++.dg/parse/fused-params1.C
gcc/testsuite/g++.dg/template/error2.C
gcc/testsuite/g++.dg/template/local6.C
gcc/testsuite/g++.dg/template/qualttp15.C
gcc/testsuite/g++.dg/warn/Wnvdtor-2.C
gcc/testsuite/g++.dg/warn/anonymous-namespace-3.C
gcc/testsuite/g++.old-deja/g++.benjamin/15309-1.C
gcc/testsuite/g++.old-deja/g++.brendan/crash29.C
gcc/testsuite/g++.old-deja/g++.eh/spec6.C
gcc/testsuite/g++.old-deja/g++.jason/crash3.C
gcc/testsuite/g++.old-deja/g++.jason/destruct2.C
gcc/testsuite/g++.old-deja/g++.law/ctors5.C
gcc/testsuite/g++.old-deja/g++.law/ctors9.C
gcc/testsuite/g++.old-deja/g++.mike/p3538a.C
gcc/testsuite/g++.old-deja/g++.mike/p3538b.C
gcc/testsuite/g++.old-deja/g++.other/struct1.C
gcc/testsuite/g++.old-deja/g++.other/volatile1.C
gcc/testsuite/g++.old-deja/g++.pt/crash36.C
gcc/testsuite/g++.old-deja/g++.pt/derived3.C
gcc/testsuite/g++.old-deja/g++.robertl/eb109.C
gcc/testsuite/g++.old-deja/g++.robertl/eb4.C
libstdc++-v3/testsuite/19_diagnostics/error_category/cons/copy_neg.cc
libstdc++-v3/testsuite/27_io/ios_base/cons/copy_neg.cc
libstdc++-v3/testsuite/ext/type_traits/add_unsigned_integer_neg.cc
libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_integer_neg.cc

index 59b0e40..782c674 100644 (file)
@@ -1,3 +1,11 @@
+2010-04-06  Taras Glek  <taras@mozilla.com>
+           Jason Merrill  <jason@redhat.com>
+
+       * parser.c (cp_parser_class_specifier): Set class location to that
+       of IDENTIFIER_NODE instead of '{' when possible.
+       * semantics.c (begin_class_definition): Do not overide locations
+       with less precise ones.
+
 2010-04-06  Jason Merrill  <jason@redhat.com>
 
        PR c++/43648
index 8a1bb9f..e25c280 100644 (file)
@@ -16395,6 +16395,9 @@ cp_parser_class_head (cp_parser* parser,
       end_specialization ();
       --parser->num_template_parameter_lists;
     }
+
+  if (type)
+    DECL_SOURCE_LOCATION (TYPE_NAME (type)) = type_start_token->location;
   *attributes_p = attributes;
   return type;
 }
index 1c47ded..5cf4b69 100644 (file)
@@ -2409,9 +2409,6 @@ begin_class_definition (tree t, tree attributes)
       pushtag (make_anon_name (), t, /*tag_scope=*/ts_current);
     }
 
-  /* Update the location of the decl.  */
-  DECL_SOURCE_LOCATION (TYPE_NAME (t)) = input_location;
-
   if (TYPE_BEING_DEFINED (t))
     {
       t = make_class_type (TREE_CODE (t));
index 31103d1..c0b4618 100644 (file)
@@ -1,3 +1,45 @@
+2010-04-06  Jason Merrill  <jason@redhat.com>
+
+       * g++.dg/cpp0x/pr31437.C: Adjust error location.
+       * g++.dg/ext/attrib18.C: Likewise.
+       * g++.dg/ext/bitfield2.C: Likewise.
+       * g++.dg/ext/bitfield4.C: Likewise.
+       * g++.dg/ext/visibility/warn2.C: Likewise.
+       * g++.dg/ext/visibility/warn3.C: Likewise.
+       * g++.dg/gomp/pr26690-1.C: Likewise.
+       * g++.dg/inherit/covariant7.C: Likewise.
+       * g++.dg/init/synth2.C: Likewise.
+       * g++.dg/lookup/using7.C: Likewise.
+       * g++.dg/other/crash-4.C: Likewise.
+       * g++.dg/other/error13.C: Likewise.
+       * g++.dg/other/error20.C: Likewise.
+       * g++.dg/parse/crash31.C: Likewise.
+       * g++.dg/parse/error16.C: Likewise.
+       * g++.dg/parse/error19.C: Likewise.
+       * g++.dg/parse/error27.C: Likewise.
+       * g++.dg/parse/error28.C: Likewise.
+       * g++.dg/parse/fused-params1.C: Likewise.
+       * g++.dg/template/error2.C: Likewise.
+       * g++.dg/template/local6.C: Likewise.
+       * g++.dg/template/qualttp15.C: Likewise.
+       * g++.dg/warn/Wnvdtor-2.C: Likewise.
+       * g++.dg/warn/anonymous-namespace-3.C: Likewise.
+       * g++.old-deja/g++.benjamin/15309-1.C: Likewise.
+       * g++.old-deja/g++.brendan/crash29.C: Likewise.
+       * g++.old-deja/g++.eh/spec6.C: Likewise.
+       * g++.old-deja/g++.jason/crash3.C: Likewise.
+       * g++.old-deja/g++.jason/destruct2.C: Likewise.
+       * g++.old-deja/g++.law/ctors5.C: Likewise.
+       * g++.old-deja/g++.law/ctors9.C: Likewise.
+       * g++.old-deja/g++.mike/p3538a.C: Likewise.
+       * g++.old-deja/g++.mike/p3538b.C: Likewise.
+       * g++.old-deja/g++.other/struct1.C: Likewise.
+       * g++.old-deja/g++.other/volatile1.C: Likewise.
+       * g++.old-deja/g++.pt/crash36.C: Likewise.
+       * g++.old-deja/g++.pt/derived3.C: Likewise.
+       * g++.old-deja/g++.robertl/eb109.C: Likewise.
+       * g++.old-deja/g++.robertl/eb4.C: Likewise.
+
 2010-04-06  Sebastian Pop  <sebastian.pop@amd.com>
 
        PR middle-end/43519
index 0e1a888..812c695 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-options "-std=gnu++0x" }
-template <typename... T> struct A
-{ // { dg-error "candidates|A" }
+template <typename... T> struct A // { dg-error "candidates|A" }
+{
   A(T* p) {  // { dg-error "parameter packs|T" }
    (A<T...>*)(p); 
   }
index 0c3a072..ab9fea0 100644 (file)
@@ -2,8 +2,8 @@
 // Test that we warn when an attribute preceding the class-key is ignored.
 // { dg-do compile }
 
-__attribute__ ((packed)) struct A
-{                              // { dg-warning "attribute" }
+__attribute__ ((packed)) struct A // { dg-warning "attribute" }
+{
   char c;
   int x;
   void f();
index 3d89505..40effc7 100644 (file)
@@ -3,8 +3,8 @@
 /* { dg-options "" } */
 /* { dg-options "-mno-ms-bitfields" { target i?86-*-netware } } */
 
-struct t
-{ /* { dg-message "note: Offset of packed bit-field 't::b' has changed in GCC 4.4" "" { target pcc_bitfield_type_matters } } */
+struct t /* { dg-message "note: Offset of packed bit-field 't::b' has changed in GCC 4.4" "" { target pcc_bitfield_type_matters } } */
+{
   char a:4;
   char b:8;
   char c:4;
index f9858d7..8dacfaf 100644 (file)
@@ -2,8 +2,8 @@
 /* { dg-options "" } */
 /* { dg-options "-mno-ms-bitfields" { target i?86-*-netware } } */
 
-struct t
-{ /* { dg-message "note: Offset of packed bit-field 't::b' has changed in GCC 4.4" "" { target pcc_bitfield_type_matters } } */
+struct t /* { dg-message "note: Offset of packed bit-field 't::b' has changed in GCC 4.4" "" { target pcc_bitfield_type_matters } } */
+{
   char a:4;
   char b:8 __attribute__ ((packed));
   char c:4;
index 3a9637d..475179f 100644 (file)
@@ -8,8 +8,8 @@ namespace N __attribute ((__visibility__ ("hidden")))
   struct A { };
 }
 
-struct B
-{                              // { dg-warning "visibility" }
+struct B                       // { dg-warning "visibility" }
+{
   N::A a;
 };
 
index 2d4ec40..d1d3ba4 100644 (file)
@@ -14,8 +14,8 @@ void A::f() { }
 
 // This gets a warning because B objects might rely
 // on hidden symbols from A.
-struct B
-{                              // { dg-warning "visibility" }
+struct B                       // { dg-warning "visibility" }
+{
   A a;
 };
 
index 3b7a4f8..c49c8b7 100644 (file)
@@ -1,8 +1,8 @@
 // PR c++/26690
 // { dg-do compile }
 
-struct A
-{                                      // { dg-message "A::A\\(const A&\\)" }
+struct A                       // { dg-message "A::A\\(const A&\\)" }
+{
   A (int);                             // { dg-message "candidates" }
 };
 
index 596c679..cbd58bb 100644 (file)
@@ -27,7 +27,7 @@ struct c4 : virtual c3, virtual c0, virtual c1
   int m;
 };
 
-struct c6 : c0, c3, c4
-{ // { dg-warning "direct base" "" }
+struct c6 : c0, c3, c4         // { dg-warning "direct base" "" }
+{
   virtual c1 &f2() volatile;
 };
index 795ce42..624f10b 100644 (file)
@@ -5,8 +5,8 @@ struct G {
   G(G&);                       // { dg-message "" "candidate" }
 };
 
-class A
-{                              // { dg-error "no match" }
+class A                                // { dg-error "no match" }
+{
   const G g;
 };
 
index b250c58..69e27da 100644 (file)
@@ -3,8 +3,8 @@ template <typename T, bool=T::X> struct A
   int i;
 };
 
-template <typename T> struct B : A<T>
-{ // { dg-error "incomplete" }
+template <typename T> struct B : A<T> // { dg-error "incomplete" }
+{
   using A<T>::i; // { dg-error "incomplete" "incomplete" } 
                  // { dg-error "using" "using" { target *-*-* } 8 }
 };
index bc2c457..d6247c4 100644 (file)
@@ -14,8 +14,8 @@ struct a
   int m;
   a(const a&);
 };
-struct b
-{ // { dg-error "cannot bind packed field" "" { target { ! default_packed } } }
+struct b // { dg-error "cannot bind packed field" "" { target { ! default_packed } } }
+{
   char c;
   a aa __attribute__((packed)); // { dg-warning "attribute ignored" "" { target default_packed } }
 };
index d3b1eab..89e8847 100644 (file)
@@ -1,7 +1,7 @@
 //PR c++/28258
 
-struct A 
-{            // { dg-message "note" }
+struct A                       // { dg-message "note" }
+{
   A(void x); // { dg-error "invalid use|incomplete type|candidates" }
 };
 
index 6033c0e..6f3f778 100644 (file)
@@ -1,8 +1,8 @@
 // PR c++/34275
 // { dg-do compile }
 
-struct A
-{              // { dg-message "candidate is" }
+struct A                       // { dg-message "candidate is" }
+{
   virtual A foo ();
 };
 
index c3fc679..0068846 100644 (file)
@@ -1,5 +1,5 @@
-struct A
-{ // { dg-error "forward declaration" }
+struct A // { dg-error "forward declaration" }
+{
   A : A; // { dg-error "expected|incomplete" }
   A : B; // { dg-error "not declared|incomplete" }
   A : A(); // { dg-error "undefined type|incomplete" }
index ba9aacc..3d9dcc3 100644 (file)
@@ -3,7 +3,7 @@
 
 struct A
 {
-  struct B {}; // { dg-error "12:previous definition of 'struct A::B'" }
+  struct B {}; // { dg-error "10:previous definition of 'struct A::B'" }
 };
 
 struct A::B{}; // { dg-error "11:redefinition of 'struct A::B'" }
index 39c2d78..0955e6a 100644 (file)
@@ -1,8 +1,8 @@
 // { dg-options "-fshow-column -fmessage-length=0   -ansi -pedantic-errors -Wno-long-long " }
 // PR C++/17867
 
-struct A
-{  // { dg-message "1:candidate is:" }
+struct A                       // { dg-message "8:candidate is:" }
+{
   A(int);
 };
 
index c07d1d3..90cb231 100644 (file)
@@ -1,8 +1,8 @@
 // { dg-options "-fshow-column -ansi -pedantic-errors -Wno-long-long" }
 // PR c++/20152
 
-struct KrSelectionMode {  virtual void init() = 0; }; // { dg-error "24:previous definition of 'struct KrSelectionMode'" }
-struct KrKDESelectionMode : public KrSelectionMode { void init() { } }; // { dg-error "52:previous definition of 'struct KrKDESelectionMode'" }
+struct KrSelectionMode {  virtual void init() = 0; }; // { dg-error "8:previous definition of 'struct KrSelectionMode'" }
+struct KrKDESelectionMode : public KrSelectionMode { void init() { } }; // { dg-error "8:previous definition of 'struct KrKDESelectionMode'" }
 struct KrSelectionMode {  virtual void init() = 0; }; // { dg-error "8:redefinition of 'struct KrSelectionMode'" }
 struct KrKDESelectionMode : public KrSelectionMode { void init() { } }; // { dg-error "8:redefinition of 'struct KrKDESelectionMode'" }
 KrKDESelectionMode krKDESelectionMode;
index 50ad960..7e235a1 100644 (file)
@@ -2,7 +2,7 @@
 // PR c++/21908
 
 struct virt { virt () {} virt (int i) {} };
-struct der : public virtual virt { // { dg-message "34:der::der" }
+struct der : public virtual virt { // { dg-message "8:der::der" }
   der (int i) : virt(i) {} // { dg-message "3:candidates are: der" }
 };
 struct top : public der { 
index adb47a0..33732fc 100644 (file)
@@ -2,8 +2,8 @@
 // Origin: Alexander Zvyagin <Alexander.Zviagine@cern.ch>
 // { dg-do compile }
 
-template <int N,typename T> struct A
-{ //  { dg-error "" } 
+template <int N,typename T> struct A //  { dg-error "" }
+{
     typedef T X;
     template <int M> void foo (const A<M,X>&);
 };
index 86486a2..5bd9b87 100644 (file)
@@ -15,8 +15,8 @@ template<class T> struct X
 template<class T >
 struct Derived
 {
-  class Nested : public X<T>
-  { // { dg-message "instantiated" "" }
+  class Nested : public X<T> // { dg-message "instantiated" "" }
+  {
   };
   
   Nested m; // { dg-message "instantiated" "" }
index c691c4c..6c5e8ac 100644 (file)
@@ -1,5 +1,5 @@
-template <class T> struct PCVector2
-{ // { dg-message "candidate is" }
+template <class T> struct PCVector2 // { dg-message "candidate is" }
+{
     template <class T2> PCVector2(const PCVector2<T> &cv) ;
 
     PCVector2<T> operator- (const PCVector2<T> &ov) const 
index 0f97c32..b1c6119 100644 (file)
@@ -12,8 +12,8 @@ template <template <class> class TT> struct X
        TT<int> y;
 };
 
-template <class T> struct X<T::template B>
-{      // { dg-error "previous" }
+template <class T> struct X<T::template B> // { dg-error "previous" }
+{
        T z;
 };
 
index cd078ac..d40de3d 100644 (file)
@@ -6,37 +6,37 @@
 // destructor, in which case it would be possible but unsafe to delete
 // an instance of a derived class through a pointer to the base class.
 
-struct A
-{ // { dg-bogus "non-virtual destructor" }
+struct A // { dg-bogus "non-virtual destructor" }
+{
 protected:
   ~A();
 public:
   virtual void f() = 0;
 };
 
-struct B
-{ // { dg-bogus "non-virtual destructor" }
+struct B // { dg-bogus "non-virtual destructor" }
+{
 private:
   ~B();
 public:
   virtual void f() = 0;
 };
 
-struct C
-{ // { dg-warning "non-virtual destructor" }
+struct C // { dg-warning "non-virtual destructor" }
+{
   virtual void f() = 0;
 };
 
-struct D
-{ // { dg-warning "non-virtual destructor" }
+struct D // { dg-warning "non-virtual destructor" }
+{
   ~D();
   virtual void f() = 0;
 };
 
 struct E;
 
-struct F
-{ // { dg-warning "non-virtual destructor" }
+struct F // { dg-warning "non-virtual destructor" }
+{
 protected:
   friend class E;
   ~F();
@@ -44,8 +44,8 @@ public:
   virtual void f() = 0;
 };
 
-struct G
-{ // { dg-warning "non-virtual destructor" }
+struct G // { dg-warning "non-virtual destructor" }
+{
 private:
   friend class E;
   ~G();
index fee48b4..0ba6790 100644 (file)
@@ -7,7 +7,7 @@
 struct B { std::auto_ptr<A> p; };
 
 #line 10 "foo.C"
-struct C
-{ // { dg-warning "uses the anonymous namespace" }
+struct C                  // { dg-warning "uses the anonymous namespace" }
+{
   std::auto_ptr<A> p;
 };
index ae13ee8..aa5530f 100644 (file)
@@ -9,8 +9,8 @@ public:
   ~bahamian ();  
 };
 
-class miami : public bahamian
-{ // { dg-warning "" } // WARNING -
+class miami : public bahamian  // { dg-warning "" } // WARNING -
+{
 public:
    miami ();
    ~miami ();
index fd2fa2f..33be95f 100644 (file)
@@ -6,8 +6,8 @@ union Value
        Value(){}
 };
 
-struct GlobalAddress
-{// { dg-message "note" }
+struct GlobalAddress           // { dg-message "note" }
+{
        GlobalAddress(Value *nvar){} // { dg-message "candidates" }
 };
 
index b6e7f26..015bbef 100644 (file)
@@ -122,8 +122,8 @@ struct B1 : A
 {
 };
 
-struct C : A, A1
-{ // { dg-error "" } looser throw - A::~A()
+struct C : A, A1               // { dg-error "" } looser throw - A::~A()
+{
   virtual void foo() throw(int);    // { dg-error "" } looser throw - A::foo
   virtual void bar() throw(int);    // { dg-error "" } looser throw - A1::bar
 };
index 5d5b3af..e94cc7c 100644 (file)
@@ -2,8 +2,8 @@
 // Bug: g++ tries to generate initialization semantics for a Node from an int,
 // and fails.
 
-struct Node
-{                              // { dg-message "note" } 
+struct Node                    // { dg-message "note" }
+{
   Node* child[2];
 };
 
index a28860f..62c8f8f 100644 (file)
@@ -10,8 +10,8 @@ struct X
 struct Y : public X
 {};
 
-struct Z : public Y, public X
-{};                            // { dg-warning "" } 
+struct Z : public Y, public X  // { dg-warning "" }
+{};
 
 void foo ()
 {
index 02c5fb0..7c37622 100644 (file)
@@ -5,8 +5,8 @@
 // Subject: bug in handling static const object of the enclosing class
 // Date: Tue, 1 Sep 92 10:38:44 EDT
 
-class X
-{ // { dg-message "1:X::X\\(const X&\\)" } implicit constructor
+class X              // { dg-message "7:X::X\\(const X&\\)" } implicit constructor
+{
   private:
     int x;
   public:
index 17207f6..43ba126 100644 (file)
@@ -20,8 +20,8 @@ Foo::Foo(int aa)
 { }
 
 
-struct var_Foo: public Foo
-{ // { dg-message "note" }  base.*// ERROR -  in class.*
+struct var_Foo: public Foo // { dg-message "note" }  base.*// ERROR -  in class.*
+{
   var_Foo* operator-> () {return this;}
 };
 
index 1da61f3..a2c9853 100644 (file)
@@ -24,8 +24,8 @@ const ccObjectInfo& ccHandle<T>::repInvariant (int)
 class ccHandleBase : public ccObjectInfo
 {};
 
-class cc_CircleHdl : public virtual ccHandleBase, public ccObjectInfo
-{                              // { dg-warning "" } 
+class cc_CircleHdl : public virtual ccHandleBase, public ccObjectInfo // { dg-warning "" } 
+{
 public:
   virtual const ccObjectInfo& ri (int);
 };
index e9fcb0c..96ba124 100644 (file)
@@ -26,8 +26,8 @@ const ccObjectInfo& ccHandle<T>::repInvariant (int)
 class ccHandleBase : public ccObjectInfo
 {};
 
-class cc_CircleHdl : public virtual ccHandleBase, public ccObjectInfo
-{                              // { dg-warning "" } 
+class cc_CircleHdl : public virtual ccHandleBase, public ccObjectInfo // { dg-warning "" } 
+{
 public:
   virtual const ccObjectInfo& repInvariant (int);
 };
index b1f943f..699d524 100644 (file)
@@ -6,36 +6,36 @@
 // Duplicate definitions are wrong, we should just cough
 // politely, but we used to die horribly.
 
-class Y
-{   // { dg-error "" } previous definition
+class Y // { dg-error "" } previous definition
+{
 };
 class Y // { dg-error "" } redefinition
 {   
 };
 
-template<class T> class X
-{   // { dg-error "" } previous definition
+template<class T> class X // { dg-error "" } previous definition
+{
 };
 template<class T> class X // { dg-error "" } redefinition
 {   
 };
 
-template<class T> class X<T *>
-{   // { dg-error "" } previous definition
+template<class T> class X<T *> // { dg-error "" } previous definition
+{
 };
 template<class T> class X<T *> // { dg-error "" } redefinition
 {   
 };
 
-template<> class X<int>
-{   // { dg-error "" } previous definition
+template<> class X<int> // { dg-error "" } previous definition
+{
 };
 template<> class X<int> // { dg-error "" } redefinition
 {   
 };
 
-template<> class X<int *>
-{   // { dg-error "" } previous definition
+template<> class X<int *> // { dg-error "" } previous definition
+{
 };
 template<> class X<int *> // { dg-error "" } redefinition
 {   
index 9e72ea2..5c58728 100644 (file)
@@ -2,9 +2,8 @@
 // Test that failed lvalue-to-rvalue conversion of vf doesn't crash the
 // compiler.
 
-class f_class
-{ };                           // { dg-message "candidates" "candidates" } 
-// { dg-message "note" "note" { target *-*-* } 6 }
+class f_class                 // { dg-message "note" "candidates" }
+{ };
 
 volatile f_class
 ret_v_f_class()
index 9bf99d1..fa9401b 100644 (file)
@@ -13,8 +13,8 @@ struct iterator {
 
 
 template <class Iterator>
-struct reverse_iterator : public
-iterator<typename iterator_traits<Iterator>::iterator_category> { // { dg-message "instantiated" } no type iterator_category
+struct reverse_iterator : public // { dg-message "instantiated" } no type iterator_category
+iterator<typename iterator_traits<Iterator>::iterator_category> {
   protected:
   Iterator current;
   
index 2c56049..b0d1d3b 100644 (file)
@@ -5,8 +5,8 @@
 
 template<class T>
 class X {
-       class Y : public T
-       { // { dg-error "base type .* fails to be" }
+       class Y : public T      // { dg-error "base type .* fails to be" }
+       {
        };
        Y y;                    // { dg-message "instantiated" }
 };
index 5a70e19..dae13b6 100644 (file)
@@ -19,8 +19,8 @@ inline istream& operator>>(istream& is, Empty& ) { return is;}
 
 
 template<class VertexType, class EdgeType>
-class Graph
-{  // { dg-message "note" } candidates
+class Graph                    // { dg-message "note" } candidates
+{
   public:
     // public type interface
     typedef std::map<int, EdgeType > Successor;
index 5f82e1f..dfd3d6c 100644 (file)
@@ -16,8 +16,8 @@ public:
         int i;
         };
 
-class some_derived : public some_base
-        {  // { dg-message "note" }
+class some_derived : public some_base // { dg-message "note" }
+        {
 public:
         class derived_func_args;
         void func(derived_func_args &);
index a874814..e09ab75 100644 (file)
@@ -33,6 +33,6 @@ int main()
 }
 
 // { dg-error "deleted function" "" { target *-*-* } 72 }
-// { dg-error "used here" "" { target *-*-* } 31 }
+// { dg-error "used here" "" { target *-*-* } 30 }
 // { dg-error "first required here" "" { target *-*-* } 30 }
 // { dg-excess-errors "copy constructor" }
index 0124822..e02ab10 100644 (file)
@@ -32,7 +32,7 @@ void test02()
   test_base io1;
   test_base io2 = io1; 
 }
-// { dg-error "within this context" "" { target *-*-* } 27 } 
+// { dg-error "within this context" "" { target *-*-* } 26 }
 // { dg-error "synthesized" "" { target *-*-* } 33 } 
 // { dg-error "is private" "" { target *-*-* } 785 } 
 // { dg-error "copy constructor" "" { target *-*-* } 0 } 
index cafaf39..ba3dd76 100644 (file)
@@ -36,4 +36,4 @@ int main()
 }
 
 // { dg-error "invalid use of incomplete" "" { target *-*-* } 28 } 
-// { dg-error "declaration of" "" { target *-*-* } 62 } 
+// { dg-error "declaration of" "" { target *-*-* } 61 }
index 0b73904..2347a14 100644 (file)
@@ -36,4 +36,4 @@ int main()
 }
 
 // { dg-error "invalid use of incomplete" "" { target *-*-* } 28 } 
-// { dg-error "declaration of" "" { target *-*-* } 105 } 
+// { dg-error "declaration of" "" { target *-*-* } 104 }