| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| X-SWARE-Spam-Status: | No, hits=-0.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS |
| X-Spam-Check-By: | sourceware.org |
| Message-ID: | <49A5D593.4080805@gmx.net> |
| Date: | Wed, 25 Feb 2009 17:34:43 -0600 |
| From: | Helmut Brandl <helmut DOT brandl AT gmx DOT net> |
| User-Agent: | Thunderbird 2.0.0.18 (X11/20081206) |
| MIME-Version: | 1.0 |
| To: | cygwin AT cygwin DOT com |
| Subject: | gcc: problem with scanf/printf with 64 bit integers on cygwin with -mno-cygwin |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |