This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: printf("%d,%ld",a,b); always prints unsigned


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]