---------- Forwarded message ---------- From: art yerkes <art.yer...@gmail.com> Date: 2009/1/9 Subject: Re: mpr: fix a compiler error on PowerPC To: Steven Edwards <winehac...@gmail.com> According to Art Yerkes who has a copy of PPC VC++
"Here's what I get. The first test (char) works identically to the second test (signed char), so the default has to be signed." -- Steven Edwards "There is one thing stronger than all the armies in the world, and that is an idea whose time has come." - Victor Hugo
const char a = 'a'; const signed char signed_a = 'a'; const unsigned char unsigned_a = 'a'; void bar(); int foo() { if (a < 0) bar(); if (signed_a < 0) bar(); if (unsigned_a < 0) bar(); }
testsign.obj
Description: Binary data
testsign.b: file format binary Disassembly of section .data: 00000000 <.data>: 0: 00 00 4b 89 lbz r10,0(r11) 4: 75 07 49 7d extsb. r9,r10 8: 08 00 80 40 bge- 0x10 c: e5 ff ff 4b bl 0xfffffff0 10: 00 00 00 3d lis r8,0 14: 00 00 e8 88 lbz r7,0(r8) 18: 75 07 e6 7c extsb. r6,r7 1c: 08 00 80 40 bge- 0x24 20: d1 ff ff 4b bl 0xfffffff0 24: 00 00 a0 3c lis r5,0 28: 00 00 85 88 lbz r4,0(r5) 2c: 3f 06 83 54 clrlwi. r3,r4,24 30: 08 00 80 40 bge- 0x38 34: bd ff ff 4b bl 0xfffffff0 38: 40 00 21 38 addi r1,r1,64 3c: a6 03 e8 7f mtlr r31 40: fc ff e1 83 lwz r31,-4(r1) 44: 20 00 80 4e blr