diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2001-01-08 11:45:22 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2001-01-08 11:45:22 +0000 |
commit | 1f0d71c5bb8b6db96c0b99ccfad95d157f4f2064 (patch) | |
tree | 72296bcec27421bafd13d8b6ff336a18c5760854 /gcc | |
parent | 5bf15e846bf1aa784d9abc09c5402f309fb0bf46 (diff) | |
download | gcc-1f0d71c5bb8b6db96c0b99ccfad95d157f4f2064.zip gcc-1f0d71c5bb8b6db96c0b99ccfad95d157f4f2064.tar.gz gcc-1f0d71c5bb8b6db96c0b99ccfad95d157f4f2064.tar.bz2 |
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
Diffstat (limited to 'gcc')
31 files changed, 122 insertions, 74 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 1a6c074..91d53af 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,11 @@ 2001-01-08 Nathan Sidwell <nathan@codesourcery.com> + * 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 <nathan@codesourcery.com> + * decl.c (struct binding_level): Adjust class_shadowed comments to reflect reality. (push_class_level_binding): Ajust comments to reflect reality. diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 65281a6..08027ef 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 e15e77c..58fa5cd 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 0a02df6..4be78f2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,36 @@ 2001-01-08 Nathan Sidwell <nathan@codesourcery.com> + * 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 <nathan@codesourcery.com> + * g++.old-deja/g++.other/lookup16.C: Remove XFAIL. 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 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 ec83fb4..ac3a5ec 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 1b483c86..5a8155a 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 7072eab..70da8d50 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 72bbdc7..b6af6a4 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 6dc9da0..86523d8 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 d20a9d9..312c93a 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 0296362..962e718 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 f763480..9769518 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 54123f2..7c4089a 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 6ecaec0..1bde4cb 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 c3709c5..bf63291 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 231d08e..195a823 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 eab071c..1f5f0b0 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 <fstream.h> -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 3fc5804..faba9ba 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 d926e64..4a7d24c 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 4552791..97200e2 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 f18d056..ff37d87 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 ea1a6cc..6335c96 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 <cc_CircleHdl> {}; diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p3538b.C b/gcc/testsuite/g++.old-deja/g++.mike/p3538b.C index 4dcd60b..b9bead0 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 <cc_CircleHdl> {}; diff --git a/gcc/testsuite/g++.old-deja/g++.mike/virt3.C b/gcc/testsuite/g++.old-deja/g++.mike/virt3.C index 3795b89..3d482fe 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 7ada1dc..9865b8c 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 cace544..c6d97e1 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 d22d512..a431a95 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 4827c56..6429630 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 T> -class X { +class X { // WARNING - only private destructors private: ~X (); -}; // WARNING - only private destructors +}; template class X<int>; template class X<double>; template <class T> -class Y { +class Y { // WARNING - only private constructors private: Y (); Y (const Y&); -}; // WARNING - only private constructors +}; template <class T> -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 434dadd..cb957ec 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 4dfa523..2daa5fe 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 1417c4a..a9ed564 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) |