This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Fix spurious dllimport testsuite failures on MinGW and Cygwin.


Recently, there was a change in the line number that certain dllimport
warnings are displayed on.  The new line numbers point to the line the
functinon definitions begin on, which is probably an improvement.  This
patch adjusts three tests accordingly.

I have a copyright assignment but no CVS access.
2004-10-16  Aaron W. LaFramboise <aaronavay62@aaronwl.com>

	* g++.dg/ext/dllimport1.C: Move dg-warnings.
	* g++.dg/ext/dllimport2.C: Same.
	* g++.dg/ext/dllimport8.C: Same.

Index: gcc/gcc/testsuite/g++.dg/ext/dllimport1.C
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/g++.dg/ext/dllimport1.C,v
retrieving revision 1.2
diff -c -3 -p -r1.2 dllimport1.C
*** gcc/gcc/testsuite/g++.dg/ext/dllimport1.C	4 Jul 2003 07:52:38 -0000	1.2
--- gcc/gcc/testsuite/g++.dg/ext/dllimport1.C	16 Oct 2004 08:07:52 -0000
***************
*** 5,18 ****
  class __attribute__((dllimport)) Foo
  {
   public:
!   virtual void dummy_foo_func(void)
!     {}	// { dg-warning "inline function" }
    void Foo::dummy_foo_fun2();
    virtual ~Foo();  //  avoid warning  
  };
  
! void Foo::dummy_foo_fun2()
! {	//  { dg-warning "defined" }
  }
  
  class Bar : public Foo
--- 5,18 ----
  class __attribute__((dllimport)) Foo
  {
   public:
!   virtual void dummy_foo_func(void)	// { dg-warning "inline function" }
!     {}
    void Foo::dummy_foo_fun2();
    virtual ~Foo();  //  avoid warning  
  };
  
! void Foo::dummy_foo_fun2()	//  { dg-warning "defined" }
! {
  }
  
  class Bar : public Foo
Index: gcc/gcc/testsuite/g++.dg/ext/dllimport2.C
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/g++.dg/ext/dllimport2.C,v
retrieving revision 1.2
diff -c -3 -p -r1.2 dllimport2.C
*** gcc/gcc/testsuite/g++.dg/ext/dllimport2.C	4 Jul 2003 07:52:38 -0000	1.2
--- gcc/gcc/testsuite/g++.dg/ext/dllimport2.C	16 Oct 2004 08:07:52 -0000
*************** void Foo(void)
*** 15,22 ****
      Boz++;	 
    }
   
! void Bar(void)
!   {			// { dg-warning "defined" }
    }
  
  void Baz(void);		// { dg-warning "redeclared" }
--- 15,22 ----
      Boz++;	 
    }
   
! void Bar(void)		// { dg-warning "defined" }
!   {
    }
  
  void Baz(void);		// { dg-warning "redeclared" }
Index: gcc/gcc/testsuite/g++.dg/ext/dllimport8.C
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/g++.dg/ext/dllimport8.C,v
retrieving revision 1.1
diff -c -3 -p -r1.1 dllimport8.C
*** gcc/gcc/testsuite/g++.dg/ext/dllimport8.C	4 Jul 2003 07:52:38 -0000	1.1
--- gcc/gcc/testsuite/g++.dg/ext/dllimport8.C	16 Oct 2004 08:07:52 -0000
*************** struct  __attribute__((dllimport)) Foo
*** 12,23 ****
      static void static_func2();
   };
  
! void Foo::static_func1()
!   {		//  { dg-warning "defined" }
    }
  
! inline void Foo::static_func2()
!  {		//  { dg-warning "inline function" }
   }
  
  void testfoo()
--- 12,23 ----
      static void static_func2();
   };
  
! void Foo::static_func1()	//  { dg-warning "defined" }
!   {
    }
  
! inline void Foo::static_func2()	//  { dg-warning "inline function" }
!  {
   }
  
  void testfoo()

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]