
24 Mar
2004
24 Mar
'04
6:55 p.m.
In message DCEAAC0833DD314AB0B58112AD99B93B06DA9D@ismail.innsys.innovsys.com you wrote:
This usually works even on cranky compilers:
unsigned char x = 0xC2; printf("this is the problem %02X\n", (unsigned int)x);
But we agree that the conversion "unsigned char" ==> "unsigned int" must result in exactly the same result, no matter if done implicitely or by explicit cast?
If this doesn't work it means that the toolchain is broken and/or misconfigured. Maybe there is no valid prototype for printf() active, etc., but this should be visible when compiling with warnings turned on.
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de
God runs electromagnetics by wave theory on Monday, Wednesday, and
Friday, and the Devil runs them by quantum theory on Tuesday, Thurs-
day, and Saturday. -- William Bragg