Re: ppc_8xx-gcc from eldk strange behaviour
From: Wolfgang Denk <hidden>
Date: 2007-08-29 23:28:03
In message <F1F6EC0C8B75034F9E3A79FC85122E8EA185B5@aquib01a> you wrote:
quoted
C does not specify the signedness of char. If you care, you need to explicitly specify.Sorry, I didn't know this. Anyway I would expect the same behaviour from both host gcc and ppc_8xx-gcc. In this case host gcc is wrong.
No, it is not wrong. The behaviour is just not defined by the standard, so the compiler is free to do what he likes. Some systems default to singend chars, others to unsigned. Both is perfectly legal. It is code that makes any such assumptions which is broken. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de Death, when unnecessary, is a tragic thing. -- Flint, "Requiem for Methuselah", stardate 5843.7