gcc: problem with scanf/printf with 64 bit integers on cygwin with -mno-cygwin
Helmut Brandl
helmut.brandl@gmx.net
Wed Feb 25 23:34:00 GMT 2009
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/
More information about the Cygwin
mailing list