aboutsummaryrefslogtreecommitdiff
path: root/ld/ldlex.l
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2011-03-29 02:52:36 +0000
committerAlan Modra <amodra@gmail.com>2011-03-29 02:52:36 +0000
commitc3a7b1206d72edcfeb965fdbd6cfd0c9d0100eba (patch)
treeeadc379401a4f8cb895abe4ce14dcd724f65bf47 /ld/ldlex.l
parent9382dad2ae0113981f7b1a27145d6d790b492b55 (diff)
downloadgdb-c3a7b1206d72edcfeb965fdbd6cfd0c9d0100eba.zip
gdb-c3a7b1206d72edcfeb965fdbd6cfd0c9d0100eba.tar.gz
gdb-c3a7b1206d72edcfeb965fdbd6cfd0c9d0100eba.tar.bz2
PR ld/12613
* ldlex.l (lex_warn_invalid): Don't assume char is unsigned.
Diffstat (limited to 'ld/ldlex.l')
-rw-r--r--ld/ldlex.l2
1 files changed, 1 insertions, 1 deletions
diff --git a/ld/ldlex.l b/ld/ldlex.l
index a1c9548..013c07e 100644
--- a/ld/ldlex.l
+++ b/ld/ldlex.l
@@ -689,7 +689,7 @@ lex_warn_invalid (char *where, char *what)
if (! ISPRINT (*what))
{
- sprintf (buf, "\\%03o", (unsigned int) *what);
+ sprintf (buf, "\\%03o", *(unsigned char *) what);
what = buf;
}