This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PR 12613, error when char is signed
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Date: Tue, 29 Mar 2011 14:50:20 +1030
- Subject: PR 12613, error when char is signed
Applied.
PR ld/12613
* ldlex.l (lex_warn_invalid): Don't assume char is unsigned.
Index: ld/ldlex.l
===================================================================
RCS file: /cvs/src/src/ld/ldlex.l,v
retrieving revision 1.51
diff -u -p -r1.51 ldlex.l
--- ld/ldlex.l 28 Mar 2011 11:18:27 -0000 1.51
+++ ld/ldlex.l 29 Mar 2011 01:00:37 -0000
@@ -689,7 +689,7 @@ lex_warn_invalid (char *where, char *wha
if (! ISPRINT (*what))
{
- sprintf (buf, "\\%03o", (unsigned int) *what);
+ sprintf (buf, "\\%03o", *(unsigned char *) what);
what = buf;
}
--
Alan Modra
Australia Development Lab, IBM