delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/03/24/17:09:31

From: "Mark E." <snowball3 AT bigfoot DOT com>
To: djgpp-workers AT delorie DOT com
Date: Sat, 24 Mar 2001 17:09:47 -0500
MIME-Version: 1.0
Subject: trouble with long longs
Message-ID: <3ABCD4DB.28432.886F3@localhost>
X-mailer: Pegasus Mail for Win32 (v3.12c)
Reply-To: djgpp-workers AT delorie DOT com

Hola,

I ran into this bug while testing the new pipe(). It seems 'long long' type 
arguments are rather fragile. For example, the innocent looking program below 
requires ctrl-c to stop it using 2.95.2 and above: 

int long_long_test(long long x)
{
  do
  {
    x =- 1;
  } while (x);

  return 0;
}

int main()
{
  long long val = 5LL;
  long_long_test(val);

  return 0;
}

I tried it with mingw and it goes into an  infinite loop there too.

Mark

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019