diff mbox

sh: char isn't signed

Message ID 452568f8d68a6ac4e01163a5c01bfceaa327af79.1416497838.git.segher@kernel.crashing.org
State New
Headers show

Commit Message

Segher Boessenkool Nov. 20, 2014, 3:41 p.m. UTC
An sh compiler fails to build on systems that have plain char unsigned.
Fix that.


2014-11-20  Segher Boessenkool  <segher@kernel.crashing.org>

gcc/
	PR target/60111
	* config/sh/sh.c: Use signed char for signed field.

---
 gcc/config/sh/sh.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Oleg Endo Nov. 20, 2014, 3:45 p.m. UTC | #1
On Thu, 2014-11-20 at 07:41 -0800, Segher Boessenkool wrote:
> An sh compiler fails to build on systems that have plain char unsigned.
> Fix that.

Ouch.  Thanks for spotting this.  OK for trunk, 4.9 and 4.8.

Cheers,
Oleg
diff mbox

Patch

diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index be944da..175af44 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -3013,7 +3013,7 @@  enum
 struct ashl_lshr_sequence
 {
   char insn_count;
-  char amount[6];
+  signed char amount[6];
   char clobbers_t;
 };