Subject: Bug: printf() in combination with long long
From: [email-masked] (Stefan Briesenick)

13 Jan 1999 18:13:00 -0800
Message-ID: <[email-masked]>
Reply-To: [email-masked]
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: cygwin <[email-masked]>

Hello!

try this:

#include <stdlib.h>

int main(void)
{
   unsigned long long var1, var2, var2;

   var1 = 12345;
   var2 = 54321;
   var3 = 98765;

   printf("wrong: %Lu - %Lu - %Lu\n",var1,var2,var3);

   printf("right: %Lu - ",var1);
   printf("%Lu - ",var2);
   printf("%Lu\n",var3);

   return 0;
}

this program produces following Output:

wrong: 12345 - 0 - 54321
right: 12345 - 54321 - 98765

seems to be a stack-problem?

Stefan Briesenick
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".