* PATCH: Update ld test for gcc 4.2
@ 2006-04-30 19:50 H. J. Lu
2006-05-02 9:59 ` Nick Clifton
0 siblings, 1 reply; 2+ messages in thread
From: H. J. Lu @ 2006-04-30 19:50 UTC (permalink / raw)
To: binutils
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;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: PATCH: Update ld test for gcc 4.2
2006-04-30 19:50 PATCH: Update ld test for gcc 4.2 H. J. Lu
@ 2006-05-02 9:59 ` Nick Clifton
0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2006-05-02 9:59 UTC (permalink / raw)
To: H. J. Lu; +Cc: binutils
Hi 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.
Approved - please apply.
Cheers
Nick
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-05-02 9:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-30 19:50 PATCH: Update ld test for gcc 4.2 H. J. Lu
2006-05-02 9:59 ` Nick Clifton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).