This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: Update ld test for gcc 4.2


C++ in gcc 4.2 will issue warning when matching "const char *" with
"char *".  This patch makes those tests to pass with gcc 4.2.


H.J.
---
2006-04-26  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-cdtest/cdtest-foo.cc (Foo::Foo): Add const to char *.
	* ld-cdtest/cdtest-foo.h (Foo::Foo): Likewise.
	* ld-srec/sr3.cc (Foo::Foo): Likewise.

--- ld/testsuite/ld-cdtest/cdtest-foo.cc.gcc	1999-08-17 00:56:29.000000000 -0700
+++ ld/testsuite/ld-cdtest/cdtest-foo.cc	2006-04-29 15:30:21.000000000 -0700
@@ -38,7 +38,7 @@ Foo::Foo ()
 #endif
 }
 
-Foo::Foo (char* msg)
+Foo::Foo (const char* msg)
 {
     i = ++foos;
     strncpy( message, msg, len);
--- ld/testsuite/ld-cdtest/cdtest-foo.h.gcc	1999-05-03 00:29:08.000000000 -0700
+++ ld/testsuite/ld-cdtest/cdtest-foo.h	2006-04-29 15:28:48.000000000 -0700
@@ -17,7 +17,7 @@ public: 
     static void init_foo ();
     static int nb_foos() { return foos; }
     Foo();
-    Foo( char* message);
+    Foo(const char* message);
     Foo(const Foo&);
     Foo & operator= (const Foo&);
     ~Foo ();
--- ld/testsuite/ld-srec/sr3.cc.gcc	2002-06-02 21:56:52.000000000 -0700
+++ ld/testsuite/ld-srec/sr3.cc	2006-04-29 15:33:52.000000000 -0700
@@ -11,7 +11,7 @@ public:
     static void init_foo ();
     static int nb_foos() { return foos; }
     Foo();
-    Foo( char* message);
+    Foo(const char* message);
     Foo(const Foo&);
     Foo & operator= (const Foo&);
     ~Foo ();
@@ -93,7 +93,7 @@ Foo::Foo ()
   i = ++foos;
 }
 
-Foo::Foo (char*)
+Foo::Foo (const char*)
 {
   i = ++foos;
 }


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