RE: [U-Boot-Users] printf question

Broken toolchain sounds correct.... I have the exact same problem in Microsoft Visual Studio 6... :)
-----Original Message----- From: wd@denx.de [mailto:wd@denx.de] Sent: Wednesday, March 24, 2004 11:55 To: Rune Torgersen Cc: u-boot-users@lists.sourceforge.net Subject: Re: [U-Boot-Users] printf question
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
participants (1)
-
Rune Torgersen