From c3a7b1206d72edcfeb965fdbd6cfd0c9d0100eba Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 29 Mar 2011 02:52:36 +0000 Subject: [PATCH] PR ld/12613 * ldlex.l (lex_warn_invalid): Don't assume char is unsigned. --- ld/ChangeLog | 5 +++++ ld/ldlex.l | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index bcfd3016db9..e41fc137d8b 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2011-03-29 Alan Modra + + PR ld/12613 + * ldlex.l (lex_warn_invalid): Don't assume char is unsigned. + 2011-03-26 John Marino * configure.host: Update *-*-dragonfly* host entry. diff --git a/ld/ldlex.l b/ld/ldlex.l index a1c954837a0..013c07e473a 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; } -- 2.30.2