[ECOS] printf("%d,%ld",a,b); always prints unsigned

Bob Holmberg bob_holmberg@yahoo.com
Fri May 16 21:52:00 GMT 2003


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.

-- Bob H


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss



More information about the Ecos-discuss mailing list