This is the mail archive of the cygwin mailing list for the Cygwin 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]

gcc: problem with scanf/printf with 64 bit integers on cygwin with -mno-cygwin


I use the type "unsigned long long" and "long long" to get 64 bit
integers on gcc.

For reading and writing I use the formatting e.g.

  unsigned long long u64;

  u64 = ...;

  printf("a 64 bit integer %llu\n", u64);

This has worked up to now on all systems using gcc except on cygwin
compiling with the option -mno-cygwin and on mingw.

I get the following problems:

- If I print a 64 bit integer alone, the output is ok, if I print 64 bit
and 32 bit integers with the same print statement, the output is not the
content of the integers.

- If I scan a 64 bit integer and the corresponding and the variable into
which I read is not initialized, the input is not correct.

Is this problem known?

Unfortunately the problem is within a big program. But if needed, I
could try to isolate it in a small program. But I don't know, if the
problem is deterministic, so I cannot promise that.


Kind regards
Helmut

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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