This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: printf("%d,%ld",a,b); always prints unsigned
- From: "Gary D. Thomas" <gary dot thomas at mind dot be>
- To: Bob Holmberg <bob_holmberg at yahoo dot com>
- Cc: eCos Discussion <ecos-discuss at sources dot redhat dot com>
- Date: 16 May 2003 16:00:03 -0600
- Subject: Re: [ECOS] printf("%d,%ld",a,b); always prints unsigned
- Organization:
- References: <20030516215200.59115.qmail@web14007.mail.yahoo.com>
On Fri, 2003-05-16 at 15:52, Bob Holmberg wrote:
> Gary,
>
> == The program:
>
> #include <cyg/infra/diag.h>
>
> int
> main(void)
> {
> int a = -1;
> long b = -1;
> diag_printf("Should show -1 --> %d, %ld\n",a,b);
> }
>
> == gives the results:
> Should show -1 --> -1,-1
> ==
>
> It's different than when I use printf.
> I guess that's a work-around for now.
>
It also points where to look, since those functions are quite
separate.
--
Gary D. Thomas <gary.thomas@mind.be>
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss