Commit d4a2b486 by Jason Merrill

parser.c (cp_parser_class_specifier): Set class location to that of…

parser.c (cp_parser_class_specifier): Set class location to that of IDENTIFIER_NODE instead of '{' when possible.

	* 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.

From-SVN: r158030
parent 9310a3e2
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> 2010-04-06 Jason Merrill <jason@redhat.com>
PR c++/43648 PR c++/43648
......
...@@ -16395,6 +16395,9 @@ cp_parser_class_head (cp_parser* parser, ...@@ -16395,6 +16395,9 @@ cp_parser_class_head (cp_parser* parser,
end_specialization (); end_specialization ();
--parser->num_template_parameter_lists; --parser->num_template_parameter_lists;
} }
if (type)
DECL_SOURCE_LOCATION (TYPE_NAME (type)) = type_start_token->location;
*attributes_p = attributes; *attributes_p = attributes;
return type; return type;
} }
......
...@@ -2409,9 +2409,6 @@ begin_class_definition (tree t, tree attributes) ...@@ -2409,9 +2409,6 @@ begin_class_definition (tree t, tree attributes)
pushtag (make_anon_name (), t, /*tag_scope=*/ts_current); 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)) if (TYPE_BEING_DEFINED (t))
{ {
t = make_class_type (TREE_CODE (t)); t = make_class_type (TREE_CODE (t));
......
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> 2010-04-06 Sebastian Pop <sebastian.pop@amd.com>
PR middle-end/43519 PR middle-end/43519
......
// { dg-options "-std=gnu++0x" } // { dg-options "-std=gnu++0x" }
template <typename... T> struct A template <typename... T> struct A // { dg-error "candidates|A" }
{ // { dg-error "candidates|A" } {
A(T* p) { // { dg-error "parameter packs|T" } A(T* p) { // { dg-error "parameter packs|T" }
(A<T...>*)(p); (A<T...>*)(p);
} }
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Test that we warn when an attribute preceding the class-key is ignored. // Test that we warn when an attribute preceding the class-key is ignored.
// { dg-do compile } // { dg-do compile }
__attribute__ ((packed)) struct A __attribute__ ((packed)) struct A // { dg-warning "attribute" }
{ // { dg-warning "attribute" } {
char c; char c;
int x; int x;
void f(); void f();
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
/* { dg-options "" } */ /* { dg-options "" } */
/* { dg-options "-mno-ms-bitfields" { target i?86-*-netware } } */ /* { dg-options "-mno-ms-bitfields" { target i?86-*-netware } } */
struct t struct t /* { dg-message "note: Offset of packed bit-field 't::b' has changed in GCC 4.4" "" { target pcc_bitfield_type_matters } } */
{ /* { 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 a:4;
char b:8; char b:8;
char c:4; char c:4;
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
/* { dg-options "" } */ /* { dg-options "" } */
/* { dg-options "-mno-ms-bitfields" { target i?86-*-netware } } */ /* { dg-options "-mno-ms-bitfields" { target i?86-*-netware } } */
struct t struct t /* { dg-message "note: Offset of packed bit-field 't::b' has changed in GCC 4.4" "" { target pcc_bitfield_type_matters } } */
{ /* { 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 a:4;
char b:8 __attribute__ ((packed)); char b:8 __attribute__ ((packed));
char c:4; char c:4;
......
...@@ -8,8 +8,8 @@ namespace N __attribute ((__visibility__ ("hidden"))) ...@@ -8,8 +8,8 @@ namespace N __attribute ((__visibility__ ("hidden")))
struct A { }; struct A { };
} }
struct B struct B // { dg-warning "visibility" }
{ // { dg-warning "visibility" } {
N::A a; N::A a;
}; };
......
...@@ -14,8 +14,8 @@ void A::f() { } ...@@ -14,8 +14,8 @@ void A::f() { }
// This gets a warning because B objects might rely // This gets a warning because B objects might rely
// on hidden symbols from A. // on hidden symbols from A.
struct B struct B // { dg-warning "visibility" }
{ // { dg-warning "visibility" } {
A a; A a;
}; };
......
// PR c++/26690 // PR c++/26690
// { dg-do compile } // { dg-do compile }
struct A struct A // { dg-message "A::A\\(const A&\\)" }
{ // { dg-message "A::A\\(const A&\\)" } {
A (int); // { dg-message "candidates" } A (int); // { dg-message "candidates" }
}; };
......
...@@ -27,7 +27,7 @@ struct c4 : virtual c3, virtual c0, virtual c1 ...@@ -27,7 +27,7 @@ struct c4 : virtual c3, virtual c0, virtual c1
int m; int m;
}; };
struct c6 : c0, c3, c4 struct c6 : c0, c3, c4 // { dg-warning "direct base" "" }
{ // { dg-warning "direct base" "" } {
virtual c1 &f2() volatile; virtual c1 &f2() volatile;
}; };
...@@ -5,8 +5,8 @@ struct G { ...@@ -5,8 +5,8 @@ struct G {
G(G&); // { dg-message "" "candidate" } G(G&); // { dg-message "" "candidate" }
}; };
class A class A // { dg-error "no match" }
{ // { dg-error "no match" } {
const G g; const G g;
}; };
......
...@@ -3,8 +3,8 @@ template <typename T, bool=T::X> struct A ...@@ -3,8 +3,8 @@ template <typename T, bool=T::X> struct A
int i; int i;
}; };
template <typename T> struct B : A<T> template <typename T> struct B : A<T> // { dg-error "incomplete" }
{ // { dg-error "incomplete" } {
using A<T>::i; // { dg-error "incomplete" "incomplete" } using A<T>::i; // { dg-error "incomplete" "incomplete" }
// { dg-error "using" "using" { target *-*-* } 8 } // { dg-error "using" "using" { target *-*-* } 8 }
}; };
......
...@@ -14,8 +14,8 @@ struct a ...@@ -14,8 +14,8 @@ struct a
int m; int m;
a(const a&); a(const a&);
}; };
struct b struct b // { dg-error "cannot bind packed field" "" { target { ! default_packed } } }
{ // { dg-error "cannot bind packed field" "" { target { ! default_packed } } } {
char c; char c;
a aa __attribute__((packed)); // { dg-warning "attribute ignored" "" { target default_packed } } a aa __attribute__((packed)); // { dg-warning "attribute ignored" "" { target default_packed } }
}; };
......
//PR c++/28258 //PR c++/28258
struct A struct A // { dg-message "note" }
{ // { dg-message "note" } {
A(void x); // { dg-error "invalid use|incomplete type|candidates" } A(void x); // { dg-error "invalid use|incomplete type|candidates" }
}; };
......
// PR c++/34275 // PR c++/34275
// { dg-do compile } // { dg-do compile }
struct A struct A // { dg-message "candidate is" }
{ // { dg-message "candidate is" } {
virtual A foo (); virtual A foo ();
}; };
......
struct A struct A // { dg-error "forward declaration" }
{ // { dg-error "forward declaration" } {
A : A; // { dg-error "expected|incomplete" } A : A; // { dg-error "expected|incomplete" }
A : B; // { dg-error "not declared|incomplete" } A : B; // { dg-error "not declared|incomplete" }
A : A(); // { dg-error "undefined type|incomplete" } A : A(); // { dg-error "undefined type|incomplete" }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
struct A 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'" } struct A::B{}; // { dg-error "11:redefinition of 'struct A::B'" }
// { dg-options "-fshow-column -fmessage-length=0 -ansi -pedantic-errors -Wno-long-long " } // { dg-options "-fshow-column -fmessage-length=0 -ansi -pedantic-errors -Wno-long-long " }
// PR C++/17867 // PR C++/17867
struct A struct A // { dg-message "8:candidate is:" }
{ // { dg-message "1:candidate is:" } {
A(int); A(int);
}; };
......
// { dg-options "-fshow-column -ansi -pedantic-errors -Wno-long-long" } // { dg-options "-fshow-column -ansi -pedantic-errors -Wno-long-long" }
// PR c++/20152 // PR c++/20152
struct KrSelectionMode { virtual void init() = 0; }; // { dg-error "24:previous definition of 'struct KrSelectionMode'" } struct KrSelectionMode { virtual void init() = 0; }; // { dg-error "8:previous definition of 'struct KrSelectionMode'" }
struct KrKDESelectionMode : public KrSelectionMode { void init() { } }; // { dg-error "52:previous definition of 'struct KrKDESelectionMode'" } 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 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'" } struct KrKDESelectionMode : public KrSelectionMode { void init() { } }; // { dg-error "8:redefinition of 'struct KrKDESelectionMode'" }
KrKDESelectionMode krKDESelectionMode; KrKDESelectionMode krKDESelectionMode;
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// PR c++/21908 // PR c++/21908
struct virt { virt () {} virt (int i) {} }; 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" } der (int i) : virt(i) {} // { dg-message "3:candidates are: der" }
}; };
struct top : public der { struct top : public der {
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Origin: Alexander Zvyagin <Alexander.Zviagine@cern.ch> // Origin: Alexander Zvyagin <Alexander.Zviagine@cern.ch>
// { dg-do compile } // { dg-do compile }
template <int N,typename T> struct A template <int N,typename T> struct A // { dg-error "" }
{ // { dg-error "" } {
typedef T X; typedef T X;
template <int M> void foo (const A<M,X>&); template <int M> void foo (const A<M,X>&);
}; };
......
...@@ -15,8 +15,8 @@ template<class T> struct X ...@@ -15,8 +15,8 @@ template<class T> struct X
template<class T > template<class T >
struct Derived struct Derived
{ {
class Nested : public X<T> class Nested : public X<T> // { dg-message "instantiated" "" }
{ // { dg-message "instantiated" "" } {
}; };
Nested m; // { dg-message "instantiated" "" } Nested m; // { dg-message "instantiated" "" }
......
template <class T> struct PCVector2 template <class T> struct PCVector2 // { dg-message "candidate is" }
{ // { dg-message "candidate is" } {
template <class T2> PCVector2(const PCVector2<T> &cv) ; template <class T2> PCVector2(const PCVector2<T> &cv) ;
PCVector2<T> operator- (const PCVector2<T> &ov) const PCVector2<T> operator- (const PCVector2<T> &ov) const
......
...@@ -12,8 +12,8 @@ template <template <class> class TT> struct X ...@@ -12,8 +12,8 @@ template <template <class> class TT> struct X
TT<int> y; TT<int> y;
}; };
template <class T> struct X<T::template B> template <class T> struct X<T::template B> // { dg-error "previous" }
{ // { dg-error "previous" } {
T z; T z;
}; };
......
...@@ -6,37 +6,37 @@ ...@@ -6,37 +6,37 @@
// destructor, in which case it would be possible but unsafe to delete // 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. // an instance of a derived class through a pointer to the base class.
struct A struct A // { dg-bogus "non-virtual destructor" }
{ // { dg-bogus "non-virtual destructor" } {
protected: protected:
~A(); ~A();
public: public:
virtual void f() = 0; virtual void f() = 0;
}; };
struct B struct B // { dg-bogus "non-virtual destructor" }
{ // { dg-bogus "non-virtual destructor" } {
private: private:
~B(); ~B();
public: public:
virtual void f() = 0; virtual void f() = 0;
}; };
struct C struct C // { dg-warning "non-virtual destructor" }
{ // { dg-warning "non-virtual destructor" } {
virtual void f() = 0; virtual void f() = 0;
}; };
struct D struct D // { dg-warning "non-virtual destructor" }
{ // { dg-warning "non-virtual destructor" } {
~D(); ~D();
virtual void f() = 0; virtual void f() = 0;
}; };
struct E; struct E;
struct F struct F // { dg-warning "non-virtual destructor" }
{ // { dg-warning "non-virtual destructor" } {
protected: protected:
friend class E; friend class E;
~F(); ~F();
...@@ -44,8 +44,8 @@ public: ...@@ -44,8 +44,8 @@ public:
virtual void f() = 0; virtual void f() = 0;
}; };
struct G struct G // { dg-warning "non-virtual destructor" }
{ // { dg-warning "non-virtual destructor" } {
private: private:
friend class E; friend class E;
~G(); ~G();
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
struct B { std::auto_ptr<A> p; }; struct B { std::auto_ptr<A> p; };
#line 10 "foo.C" #line 10 "foo.C"
struct C struct C // { dg-warning "uses the anonymous namespace" }
{ // { dg-warning "uses the anonymous namespace" } {
std::auto_ptr<A> p; std::auto_ptr<A> p;
}; };
...@@ -9,8 +9,8 @@ public: ...@@ -9,8 +9,8 @@ public:
~bahamian (); ~bahamian ();
}; };
class miami : public bahamian class miami : public bahamian // { dg-warning "" } // WARNING -
{ // { dg-warning "" } // WARNING - {
public: public:
miami (); miami ();
~miami (); ~miami ();
......
...@@ -6,8 +6,8 @@ union Value ...@@ -6,8 +6,8 @@ union Value
Value(){} Value(){}
}; };
struct GlobalAddress struct GlobalAddress // { dg-message "note" }
{// { dg-message "note" } {
GlobalAddress(Value *nvar){} // { dg-message "candidates" } GlobalAddress(Value *nvar){} // { dg-message "candidates" }
}; };
......
...@@ -122,8 +122,8 @@ struct B1 : A ...@@ -122,8 +122,8 @@ struct B1 : A
{ {
}; };
struct C : A, A1 struct C : A, A1 // { dg-error "" } looser throw - A::~A()
{ // { dg-error "" } looser throw - A::~A() {
virtual void foo() throw(int); // { dg-error "" } looser throw - A::foo virtual void foo() throw(int); // { dg-error "" } looser throw - A::foo
virtual void bar() throw(int); // { dg-error "" } looser throw - A1::bar virtual void bar() throw(int); // { dg-error "" } looser throw - A1::bar
}; };
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Bug: g++ tries to generate initialization semantics for a Node from an int, // Bug: g++ tries to generate initialization semantics for a Node from an int,
// and fails. // and fails.
struct Node struct Node // { dg-message "note" }
{ // { dg-message "note" } {
Node* child[2]; Node* child[2];
}; };
......
...@@ -10,8 +10,8 @@ struct X ...@@ -10,8 +10,8 @@ struct X
struct Y : public X struct Y : public X
{}; {};
struct Z : public Y, public X struct Z : public Y, public X // { dg-warning "" }
{}; // { dg-warning "" } {};
void foo () void foo ()
{ {
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
// Subject: bug in handling static const object of the enclosing class // Subject: bug in handling static const object of the enclosing class
// Date: Tue, 1 Sep 92 10:38:44 EDT // Date: Tue, 1 Sep 92 10:38:44 EDT
class X class X // { dg-message "7:X::X\\(const X&\\)" } implicit constructor
{ // { dg-message "1:X::X\\(const X&\\)" } implicit constructor {
private: private:
int x; int x;
public: public:
......
...@@ -20,8 +20,8 @@ Foo::Foo(int aa) ...@@ -20,8 +20,8 @@ Foo::Foo(int aa)
{ } { }
struct var_Foo: public Foo struct var_Foo: public Foo // { dg-message "note" } base.*// ERROR - in class.*
{ // { dg-message "note" } base.*// ERROR - in class.* {
var_Foo* operator-> () {return this;} var_Foo* operator-> () {return this;}
}; };
......
...@@ -24,8 +24,8 @@ const ccObjectInfo& ccHandle<T>::repInvariant (int) ...@@ -24,8 +24,8 @@ const ccObjectInfo& ccHandle<T>::repInvariant (int)
class ccHandleBase : public ccObjectInfo class ccHandleBase : public ccObjectInfo
{}; {};
class cc_CircleHdl : public virtual ccHandleBase, public ccObjectInfo class cc_CircleHdl : public virtual ccHandleBase, public ccObjectInfo // { dg-warning "" }
{ // { dg-warning "" } {
public: public:
virtual const ccObjectInfo& ri (int); virtual const ccObjectInfo& ri (int);
}; };
......
...@@ -26,8 +26,8 @@ const ccObjectInfo& ccHandle<T>::repInvariant (int) ...@@ -26,8 +26,8 @@ const ccObjectInfo& ccHandle<T>::repInvariant (int)
class ccHandleBase : public ccObjectInfo class ccHandleBase : public ccObjectInfo
{}; {};
class cc_CircleHdl : public virtual ccHandleBase, public ccObjectInfo class cc_CircleHdl : public virtual ccHandleBase, public ccObjectInfo // { dg-warning "" }
{ // { dg-warning "" } {
public: public:
virtual const ccObjectInfo& repInvariant (int); virtual const ccObjectInfo& repInvariant (int);
}; };
......
...@@ -6,36 +6,36 @@ ...@@ -6,36 +6,36 @@
// Duplicate definitions are wrong, we should just cough // Duplicate definitions are wrong, we should just cough
// politely, but we used to die horribly. // politely, but we used to die horribly.
class Y class Y // { dg-error "" } previous definition
{ // { dg-error "" } previous definition {
}; };
class Y // { dg-error "" } redefinition class Y // { dg-error "" } redefinition
{ {
}; };
template<class T> class X template<class T> class X // { dg-error "" } previous definition
{ // { dg-error "" } previous definition {
}; };
template<class T> class X // { dg-error "" } redefinition template<class T> class X // { dg-error "" } redefinition
{ {
}; };
template<class T> class X<T *> template<class T> class X<T *> // { dg-error "" } previous definition
{ // { dg-error "" } previous definition {
}; };
template<class T> class X<T *> // { dg-error "" } redefinition template<class T> class X<T *> // { dg-error "" } redefinition
{ {
}; };
template<> class X<int> template<> class X<int> // { dg-error "" } previous definition
{ // { dg-error "" } previous definition {
}; };
template<> class X<int> // { dg-error "" } redefinition template<> class X<int> // { dg-error "" } redefinition
{ {
}; };
template<> class X<int *> template<> class X<int *> // { dg-error "" } previous definition
{ // { dg-error "" } previous definition {
}; };
template<> class X<int *> // { dg-error "" } redefinition template<> class X<int *> // { dg-error "" } redefinition
{ {
......
...@@ -2,9 +2,8 @@ ...@@ -2,9 +2,8 @@
// Test that failed lvalue-to-rvalue conversion of vf doesn't crash the // Test that failed lvalue-to-rvalue conversion of vf doesn't crash the
// compiler. // compiler.
class f_class class f_class // { dg-message "note" "candidates" }
{ }; // { dg-message "candidates" "candidates" } { };
// { dg-message "note" "note" { target *-*-* } 6 }
volatile f_class volatile f_class
ret_v_f_class() ret_v_f_class()
......
...@@ -13,8 +13,8 @@ struct iterator { ...@@ -13,8 +13,8 @@ struct iterator {
template <class Iterator> template <class Iterator>
struct reverse_iterator : public struct reverse_iterator : public // { dg-message "instantiated" } no type iterator_category
iterator<typename iterator_traits<Iterator>::iterator_category> { // { dg-message "instantiated" } no type iterator_category iterator<typename iterator_traits<Iterator>::iterator_category> {
protected: protected:
Iterator current; Iterator current;
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
template<class T> template<class T>
class X { class X {
class Y : public T class Y : public T // { dg-error "base type .* fails to be" }
{ // { dg-error "base type .* fails to be" } {
}; };
Y y; // { dg-message "instantiated" } Y y; // { dg-message "instantiated" }
}; };
......
...@@ -19,8 +19,8 @@ inline istream& operator>>(istream& is, Empty& ) { return is;} ...@@ -19,8 +19,8 @@ inline istream& operator>>(istream& is, Empty& ) { return is;}
template<class VertexType, class EdgeType> template<class VertexType, class EdgeType>
class Graph class Graph // { dg-message "note" } candidates
{ // { dg-message "note" } candidates {
public: public:
// public type interface // public type interface
typedef std::map<int, EdgeType > Successor; typedef std::map<int, EdgeType > Successor;
......
...@@ -16,8 +16,8 @@ public: ...@@ -16,8 +16,8 @@ public:
int i; int i;
}; };
class some_derived : public some_base class some_derived : public some_base // { dg-message "note" }
{ // { dg-message "note" } {
public: public:
class derived_func_args; class derived_func_args;
void func(derived_func_args &); void func(derived_func_args &);
......
...@@ -33,6 +33,6 @@ int main() ...@@ -33,6 +33,6 @@ int main()
} }
// { dg-error "deleted function" "" { target *-*-* } 72 } // { 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-error "first required here" "" { target *-*-* } 30 }
// { dg-excess-errors "copy constructor" } // { dg-excess-errors "copy constructor" }
...@@ -32,7 +32,7 @@ void test02() ...@@ -32,7 +32,7 @@ void test02()
test_base io1; test_base io1;
test_base io2 = 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 "synthesized" "" { target *-*-* } 33 }
// { dg-error "is private" "" { target *-*-* } 785 } // { dg-error "is private" "" { target *-*-* } 785 }
// { dg-error "copy constructor" "" { target *-*-* } 0 } // { dg-error "copy constructor" "" { target *-*-* } 0 }
...@@ -36,4 +36,4 @@ int main() ...@@ -36,4 +36,4 @@ int main()
} }
// { dg-error "invalid use of incomplete" "" { target *-*-* } 28 } // { dg-error "invalid use of incomplete" "" { target *-*-* } 28 }
// { dg-error "declaration of" "" { target *-*-* } 62 } // { dg-error "declaration of" "" { target *-*-* } 61 }
...@@ -36,4 +36,4 @@ int main() ...@@ -36,4 +36,4 @@ int main()
} }
// { dg-error "invalid use of incomplete" "" { target *-*-* } 28 } // { dg-error "invalid use of incomplete" "" { target *-*-* } 28 }
// { dg-error "declaration of" "" { target *-*-* } 105 } // { dg-error "declaration of" "" { target *-*-* } 104 }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment