public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "H. J. Lu" <hjl@lucon.org>
To: binutils@sources.redhat.com
Subject: PATCH: Update ld test for gcc 4.2
Date: Sun, 30 Apr 2006 19:50:00 -0000	[thread overview]
Message-ID: <20060430000401.GB6593@lucon.org> (raw)

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;
 }

             reply	other threads:[~2006-04-30  0:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-30 19:50 H. J. Lu [this message]
2006-05-02  9:59 ` Nick Clifton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060430000401.GB6593@lucon.org \
    --to=hjl@lucon.org \
    --cc=binutils@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).