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]

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


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