From: Nathan Sidwell Date: Mon, 8 Jan 2001 11:45:22 +0000 (+0000) Subject: class.c (duplicate_tag_error): Adjust diagnostic. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1f0d71c5bb8b6db96c0b99ccfad95d157f4f2064;p=gcc.git class.c (duplicate_tag_error): Adjust diagnostic. cp: * class.c (duplicate_tag_error): Adjust diagnostic. (finish_struct): Locally set location to start of struct. * decl.c (fixup_anonymous_aggr): Use cp_error_at. testsuite: * g++.old-deja/g++.benjamin/15309-1.C: Expect diagnostic at start of structs. * g++.old-deja/g++.benjamin/15309-2.C: Likewise. * g++.old-deja/g++.brendan/crash17.C: Likewise. * g++.old-deja/g++.brendan/crash29.C: Likewise. * g++.old-deja/g++.brendan/crash48.C: Likewise. * g++.old-deja/g++.brendan/ns1.C: Likewise. * g++.old-deja/g++.brendan/warnings1.C: Likewise. * g++.old-deja/g++.bugs/900205_04.C: Likewise. * g++.old-deja/g++.bugs/900514_03.C: Likewise. * g++.old-deja/g++.eh/spec6.C: Likewise. * g++.old-deja/g++.jason/crash3.C: Likewise. * g++.old-deja/g++.law/ctors11.C: Likewise. * g++.old-deja/g++.law/ctors17.C: Likewise. * g++.old-deja/g++.law/ctors5.C: Likewise. * g++.old-deja/g++.law/ctors9.C: Likewise. * g++.old-deja/g++.mike/ambig1.C: Likewise. * g++.old-deja/g++.mike/net22.C: Likewise. * g++.old-deja/g++.mike/p3538a.C: Likewise. * g++.old-deja/g++.mike/p3538b.C: Likewise. * g++.old-deja/g++.mike/virt3.C: Likewise. * g++.old-deja/g++.niklas/t128.C: Likewise. * g++.old-deja/g++.other/anon4.C: Likewise. * g++.old-deja/g++.other/using1.C: Likewise. * g++.old-deja/g++.other/warn3.C: Likewise. * g++.old-deja/g++.pt/t37.C: Likewise. * g++.old-deja/g++.robertl/eb69.C: Likewise. * g++.old-deja/g++.robertl/eb71.C: Likewise. From-SVN: r38798 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 1a6c0748b02..91d53afc9d6 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2001-01-08 Nathan Sidwell + + * class.c (duplicate_tag_error): Adjust diagnostic. + (finish_struct): Locally set location to start of struct. + * decl.c (fixup_anonymous_aggr): Use cp_error_at. + 2001-01-08 Nathan Sidwell * decl.c (struct binding_level): Adjust class_shadowed comments diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 65281a64f34..08027ef91d7 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -1,6 +1,6 @@ /* Functions related to building classes and their related objects. Copyright (C) 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000 Free Software Foundation, Inc. + 1999, 2000, 2001 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) This file is part of GNU CC. @@ -2316,7 +2316,7 @@ duplicate_tag_error (t) tree t; { cp_error ("redefinition of `%#T'", t); - cp_error_at ("previous definition here", t); + cp_error_at ("previous definition of `%#T'", t); /* Pretend we haven't defined this type. */ @@ -5328,12 +5328,20 @@ tree finish_struct (t, attributes) tree t, attributes; { + char *saved_filename = input_filename; + int saved_lineno = lineno; + /* Now that we've got all the field declarations, reverse everything as necessary. */ unreverse_member_declarations (t); cplus_decl_attributes (t, attributes, NULL_TREE); + /* Nadger the current location so that diagnostics point to the start of + the struct, not the end. */ + input_filename = DECL_SOURCE_FILE (TYPE_NAME (t)); + lineno = DECL_SOURCE_LINE (TYPE_NAME (t)); + if (processing_template_decl) { finish_struct_methods (t); @@ -5342,6 +5350,9 @@ finish_struct (t, attributes) else finish_struct_1 (t); + input_filename = saved_filename; + lineno = saved_lineno; + TYPE_BEING_DEFINED (t) = 0; if (current_class_type) diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index e15e77c479b..58fa5cda3e2 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -6837,7 +6837,7 @@ fixup_anonymous_aggr (t) /* ISO C++ 9.5.3. Anonymous unions may not have function members. */ if (TYPE_METHODS (t)) - error ("an anonymous union cannot have function members"); + cp_error_at ("an anonymous union cannot have function members", t); } /* Make sure that a declaration with no declarator is well-formed, i.e. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0a02df628af..4be78f2b329 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,34 @@ +2001-01-08 Nathan Sidwell + + * g++.old-deja/g++.benjamin/15309-1.C: Expect diagnostic at + start of structs. + * g++.old-deja/g++.benjamin/15309-2.C: Likewise. + * g++.old-deja/g++.brendan/crash17.C: Likewise. + * g++.old-deja/g++.brendan/crash29.C: Likewise. + * g++.old-deja/g++.brendan/crash48.C: Likewise. + * g++.old-deja/g++.brendan/ns1.C: Likewise. + * g++.old-deja/g++.brendan/warnings1.C: Likewise. + * g++.old-deja/g++.bugs/900205_04.C: Likewise. + * g++.old-deja/g++.bugs/900514_03.C: Likewise. + * g++.old-deja/g++.eh/spec6.C: Likewise. + * g++.old-deja/g++.jason/crash3.C: Likewise. + * g++.old-deja/g++.law/ctors11.C: Likewise. + * g++.old-deja/g++.law/ctors17.C: Likewise. + * g++.old-deja/g++.law/ctors5.C: Likewise. + * g++.old-deja/g++.law/ctors9.C: Likewise. + * g++.old-deja/g++.mike/ambig1.C: Likewise. + * g++.old-deja/g++.mike/net22.C: Likewise. + * g++.old-deja/g++.mike/p3538a.C: Likewise. + * g++.old-deja/g++.mike/p3538b.C: Likewise. + * g++.old-deja/g++.mike/virt3.C: Likewise. + * g++.old-deja/g++.niklas/t128.C: Likewise. + * g++.old-deja/g++.other/anon4.C: Likewise. + * g++.old-deja/g++.other/using1.C: Likewise. + * g++.old-deja/g++.other/warn3.C: Likewise. + * g++.old-deja/g++.pt/t37.C: Likewise. + * g++.old-deja/g++.robertl/eb69.C: Likewise. + * g++.old-deja/g++.robertl/eb71.C: Likewise. + 2001-01-08 Nathan Sidwell * g++.old-deja/g++.other/lookup16.C: Remove XFAIL. diff --git a/gcc/testsuite/g++.old-deja/g++.benjamin/15309-1.C b/gcc/testsuite/g++.old-deja/g++.benjamin/15309-1.C index ec83fb46ae4..ac3a5ec0971 100644 --- a/gcc/testsuite/g++.old-deja/g++.benjamin/15309-1.C +++ b/gcc/testsuite/g++.old-deja/g++.benjamin/15309-1.C @@ -10,11 +10,11 @@ public: }; class miami : public bahamian -{ +{ // WARNING - // WARNING - public: miami (); ~miami (); -}; // WARNING - // WARNING - +}; diff --git a/gcc/testsuite/g++.old-deja/g++.benjamin/15309-2.C b/gcc/testsuite/g++.old-deja/g++.benjamin/15309-2.C index 1b483c869b9..5a8155a3643 100644 --- a/gcc/testsuite/g++.old-deja/g++.benjamin/15309-2.C +++ b/gcc/testsuite/g++.old-deja/g++.benjamin/15309-2.C @@ -3,8 +3,8 @@ // Build don't link: // Special g++ Options: -Wnon-virtual-dtor -Weffc++ -class bermuda { +class bermuda { // WARNING - // WARNING - public: virtual int func1(int); ~bermuda(); -}; // WARNING - // WARNING - +}; diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash17.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash17.C index 7072eab2c88..70da8d50ada 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/crash17.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash17.C @@ -30,6 +30,6 @@ class GnWidget : public GnObject { virtual ~GnWidget(); }; -class GnOptionGroup : public GnObject, public GnWidget { -};// ERROR - warning +class GnOptionGroup : public GnObject, public GnWidget {// ERROR - warning +}; diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash29.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash29.C index 72bbdc77849..b6af6a4d911 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/crash29.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash29.C @@ -7,9 +7,9 @@ union Value }; struct GlobalAddress -{ +{// ERROR - candidates .* GlobalAddress(Value *nvar){}// ERROR - .* -};// ERROR - candidates .* +}; int main() diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash48.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash48.C index 6dc9da09d0a..86523d82d9c 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/crash48.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash48.C @@ -1,14 +1,14 @@ // Build don't link: // GROUPS passed old-abort -class internal { +class internal { // ERROR - candidates are int field; int anotherfield; -}; // ERROR - candidates are +}; -class bug { +class bug { // ERROR - several errors internal* numbers; bug(int size); -}; // ERROR - several errors +}; bug::bug(int size) { // ERROR - candidates diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/ns1.C b/gcc/testsuite/g++.old-deja/g++.brendan/ns1.C index d20a9d93929..312c93ae618 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/ns1.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/ns1.C @@ -7,12 +7,12 @@ struct B }; class C -{ +{ // ERROR - warning int g(); -};// ERROR - warning +}; class D2 : public B -{ +{ // ERROR - type C is not a base type for type D2 using B::f; // ok: B is a base of D using C::g; // error: C isn't a base of D2 -}; // ERROR - type C is not a base type for type D2 +}; diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/warnings1.C b/gcc/testsuite/g++.old-deja/g++.brendan/warnings1.C index 02963623a22..962e718d01c 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/warnings1.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/warnings1.C @@ -1,6 +1,6 @@ // Build don't link: // GROUPS passed warnings // there should be a warning about foo only defining private methods -class foo { +class foo { // ERROR - .* int bar(); -};// ERROR - .* +}; diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900205_04.C b/gcc/testsuite/g++.old-deja/g++.bugs/900205_04.C index f763480d45f..976951815cf 100644 --- a/gcc/testsuite/g++.old-deja/g++.bugs/900205_04.C +++ b/gcc/testsuite/g++.old-deja/g++.bugs/900205_04.C @@ -18,8 +18,8 @@ struct0::struct0 (int, void *) { } -struct struct0_derived_struct_0 : public struct0 { -}; // ERROR - +struct struct0_derived_struct_0 : public struct0 { // ERROR - +}; // struct0_derived_struct_0 object; // would give g++ error if compiled diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900514_03.C b/gcc/testsuite/g++.old-deja/g++.bugs/900514_03.C index 54123f2bb19..7c4089a1bbf 100644 --- a/gcc/testsuite/g++.old-deja/g++.bugs/900514_03.C +++ b/gcc/testsuite/g++.old-deja/g++.bugs/900514_03.C @@ -13,12 +13,12 @@ struct t_0_st_0; -struct t_0_st_1 { +struct t_0_st_1 { // ERROR - int member; t_0_st_1 (t_0_st_0&);// ERROR - t_0_st_1 (); -};// ERROR - +}; struct t_0_st_0 { int member; @@ -80,12 +80,12 @@ void t_1_local_init () struct t_2_st_0; -struct t_2_st_1 { +struct t_2_st_1 { // ERROR - candidate int member; t_2_st_1 (t_2_st_0); // ERROR - candidate t_2_st_1 (); -}; // ERROR - candidate +}; struct t_2_st_0 { int member; diff --git a/gcc/testsuite/g++.old-deja/g++.eh/spec6.C b/gcc/testsuite/g++.old-deja/g++.eh/spec6.C index 6ecaec0b116..1bde4cb92b8 100644 --- a/gcc/testsuite/g++.old-deja/g++.eh/spec6.C +++ b/gcc/testsuite/g++.old-deja/g++.eh/spec6.C @@ -123,10 +123,10 @@ struct B1 : A }; struct C : A, A1 -{ +{ // ERROR - looser throw - A::~A() virtual void foo() throw(int); // ERROR - looser throw - A::foo virtual void bar() throw(int); // ERROR - looser throw - A1::bar -}; // ERROR - looser throw - A::~A() +}; struct D : A, A1 { diff --git a/gcc/testsuite/g++.old-deja/g++.jason/crash3.C b/gcc/testsuite/g++.old-deja/g++.jason/crash3.C index c3709c55536..bf63291abef 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/crash3.C +++ b/gcc/testsuite/g++.old-deja/g++.jason/crash3.C @@ -3,9 +3,9 @@ // Build don't link: struct Node -{ +{ // ERROR - Node* child[2]; -}; // ERROR - +}; void bug(int i) { diff --git a/gcc/testsuite/g++.old-deja/g++.law/ctors11.C b/gcc/testsuite/g++.old-deja/g++.law/ctors11.C index 231d08ede6e..195a8234560 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/ctors11.C +++ b/gcc/testsuite/g++.old-deja/g++.law/ctors11.C @@ -10,10 +10,10 @@ public: inline A(int x){printf("constructing A with %d\n", x);} }; -class B:public A{ +class B:public A{ // ERROR - non-default constructor private: public: -}; // ERROR - non-default constructor +}; int main() { diff --git a/gcc/testsuite/g++.old-deja/g++.law/ctors17.C b/gcc/testsuite/g++.old-deja/g++.law/ctors17.C index eab071c1248..1f5f0b00c6c 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/ctors17.C +++ b/gcc/testsuite/g++.old-deja/g++.law/ctors17.C @@ -9,10 +9,10 @@ #include -class X : public ifstream { +class X : public ifstream { // ERROR - candidate public: X(int a, char *b) {} // ERROR - candidate -}; // ERROR - candidate +}; int main() { X *y = new X(10, "123"); diff --git a/gcc/testsuite/g++.old-deja/g++.law/ctors5.C b/gcc/testsuite/g++.old-deja/g++.law/ctors5.C index 3fc58041192..faba9ba98b5 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/ctors5.C +++ b/gcc/testsuite/g++.old-deja/g++.law/ctors5.C @@ -5,13 +5,13 @@ // Date: Tue, 1 Sep 92 10:38:44 EDT class X -{ +{ // ERROR - candidate private: int x; public: static const X x0; X( int ); -}; // ERROR - candidate +}; class Y { diff --git a/gcc/testsuite/g++.old-deja/g++.law/ctors9.C b/gcc/testsuite/g++.old-deja/g++.law/ctors9.C index d926e64a075..4a7d24c6664 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/ctors9.C +++ b/gcc/testsuite/g++.old-deja/g++.law/ctors9.C @@ -21,9 +21,9 @@ Foo::Foo(int aa) struct var_Foo: public Foo -{ +{ // ERROR - base.*// ERROR - in class.* var_Foo* operator-> () {return this;} -};// ERROR - base.*// ERROR - in class.* +}; int blort(Foo& f) { diff --git a/gcc/testsuite/g++.old-deja/g++.mike/ambig1.C b/gcc/testsuite/g++.old-deja/g++.mike/ambig1.C index 4552791ad5e..97200e2a8e7 100644 --- a/gcc/testsuite/g++.old-deja/g++.mike/ambig1.C +++ b/gcc/testsuite/g++.old-deja/g++.mike/ambig1.C @@ -20,8 +20,8 @@ class lM : public M { class rM : public M { }; -class D : public lM, rM { -} d; // ERROR - ambiguous function +class D : public lM, rM { // ERROR - ambiguous function +} d; int main() { ((lM*)&d)->i = 1; diff --git a/gcc/testsuite/g++.old-deja/g++.mike/net22.C b/gcc/testsuite/g++.old-deja/g++.mike/net22.C index f18d0563f9f..ff37d872a78 100644 --- a/gcc/testsuite/g++.old-deja/g++.mike/net22.C +++ b/gcc/testsuite/g++.old-deja/g++.mike/net22.C @@ -4,8 +4,8 @@ public: Parent( char *s ) {} }; -class Child : public Parent { -}; // ERROR - called +class Child : public Parent { // ERROR - called +}; int main() { Child c( "String initializer" ); // ERROR - bad diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p3538a.C b/gcc/testsuite/g++.old-deja/g++.mike/p3538a.C index ea1a6cc53a7..6335c9631be 100644 --- a/gcc/testsuite/g++.old-deja/g++.mike/p3538a.C +++ b/gcc/testsuite/g++.old-deja/g++.mike/p3538a.C @@ -25,9 +25,9 @@ class ccHandleBase : public ccObjectInfo {}; class cc_CircleHdl : public virtual ccHandleBase, public ccObjectInfo -{ +{ // WARNING - public: virtual const ccObjectInfo& ri (int); -}; // WARNING - +}; class ccCircleHdl : public ccHandle {}; diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p3538b.C b/gcc/testsuite/g++.old-deja/g++.mike/p3538b.C index 4dcd60b3d10..b9bead04594 100644 --- a/gcc/testsuite/g++.old-deja/g++.mike/p3538b.C +++ b/gcc/testsuite/g++.old-deja/g++.mike/p3538b.C @@ -27,9 +27,9 @@ class ccHandleBase : public ccObjectInfo {}; class cc_CircleHdl : public virtual ccHandleBase, public ccObjectInfo -{ +{ // WARNING - public: virtual const ccObjectInfo& repInvariant (int); -}; // WARNING - +}; class ccCircleHdl : public ccHandle {}; diff --git a/gcc/testsuite/g++.old-deja/g++.mike/virt3.C b/gcc/testsuite/g++.old-deja/g++.mike/virt3.C index 3795b89cca6..3d482feb992 100644 --- a/gcc/testsuite/g++.old-deja/g++.mike/virt3.C +++ b/gcc/testsuite/g++.old-deja/g++.mike/virt3.C @@ -10,8 +10,8 @@ class D : private B { int Di; }; -class E : public virtual D, public B { +class E : public virtual D, public B { // WARNING - direct base inaccessible due to ambiguity int Ei; -}; // WARNING - direct base inaccessible due to ambiguity +}; E e; diff --git a/gcc/testsuite/g++.old-deja/g++.niklas/t128.C b/gcc/testsuite/g++.old-deja/g++.niklas/t128.C index 7ada1dc685e..9865b8ca8e3 100644 --- a/gcc/testsuite/g++.old-deja/g++.niklas/t128.C +++ b/gcc/testsuite/g++.old-deja/g++.niklas/t128.C @@ -1,5 +1,5 @@ // Build don't link: // GROUPS niklas uncaught default-construct struct A { A (int); }; -struct B : A {}; // ERROR - +struct B : A {}; // ERROR - without ctor // ERROR - candidates void f () { B (0); }// ERROR - .* diff --git a/gcc/testsuite/g++.old-deja/g++.other/anon4.C b/gcc/testsuite/g++.old-deja/g++.other/anon4.C index cace54456c8..c6d97e14ce5 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/anon4.C +++ b/gcc/testsuite/g++.old-deja/g++.other/anon4.C @@ -10,7 +10,7 @@ struct A { union - { + { // ERROR - anon union cannot have member fns void bad(); - }; // ERROR - anon union cannot have member fns + }; }; diff --git a/gcc/testsuite/g++.old-deja/g++.other/using1.C b/gcc/testsuite/g++.old-deja/g++.other/using1.C index d22d512f64b..a431a957a39 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/using1.C +++ b/gcc/testsuite/g++.old-deja/g++.other/using1.C @@ -9,18 +9,18 @@ protected: friend class D2; }; -class D : public B { +class D : public B { // ERROR - within this context public: using B::a; using B::b; -}; // ERROR - within this context +}; -class D2 : public B { +class D2 : public B { // ERROR - conflicting access specifications public: using B::a; using B::b; private: using B::b; -}; // ERROR - conflicting access specifications +}; diff --git a/gcc/testsuite/g++.old-deja/g++.other/warn3.C b/gcc/testsuite/g++.old-deja/g++.other/warn3.C index 4827c5645f2..64296306102 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/warn3.C +++ b/gcc/testsuite/g++.old-deja/g++.other/warn3.C @@ -4,51 +4,51 @@ class A { }; -class B { +class B { // WARNING - only private constructors public: void f(); private: B (); B (const B&); -}; // WARNING - only private constructors +}; -class C { +class C { // WARNING - only private destructors public: void f(); private: ~C (); -}; // WARNING - only private destructors +}; -class D { +class D { // WARNING - all member functions are private private: void f(); -}; // WARNING - all member functions are private +}; template -class X { +class X { // WARNING - only private destructors private: ~X (); -}; // WARNING - only private destructors +}; template class X; template class X; template -class Y { +class Y { // WARNING - only private constructors private: Y (); Y (const Y&); -}; // WARNING - only private constructors +}; template -class Z { +class Z { // WARNING - all member functions are private private: void f(); -}; // WARNING - all member functions are private +}; diff --git a/gcc/testsuite/g++.old-deja/g++.pt/t37.C b/gcc/testsuite/g++.old-deja/g++.pt/t37.C index 434dadd8228..cb957ecdd2b 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/t37.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/t37.C @@ -1,11 +1,11 @@ // Build don't link: -class A { +class A { // ERROR - synthesized copy ctor public: A(int); // ERROR - referenced below A(float); // ERROR - referenced below ~A(); -}; // ERROR - synthesized copy ctor +}; A::A() { // ERROR - } diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb69.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb69.C index 4dfa523f98e..2daa5fe3e45 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb69.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb69.C @@ -4,9 +4,9 @@ int r = 0; -struct foo { +struct foo { // ERROR - candidate foo(int x) { r = 1; } // ERROR - candidate -}; // ERROR - candidate +}; struct bar : foo { typedef int an_int; diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb71.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb71.C index 1417c4ab891..a9ed56457d1 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb71.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb71.C @@ -15,10 +15,10 @@ friend class D; unsigned counter; }; -class D { +class D { //WARNING - only private members int ins( B*&); -}; //WARNING - only private members +}; int D::ins( B*& tempN)