www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/01/29/09:42:31

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f
From: pavenis AT lanet DOT lv
To: eli Zaretskii <eliz AT is DOT elta DOT co DOT il>, dj AT redhat DOT com
Date: Tue, 29 Jan 2002 16:41:26 +0200
MIME-Version: 1.0
Subject: gcc-3.0.X
Cc: djgpp-workers AT delorie DOT com
Message-ID: <3C56D0B6.30778.157576F@localhost>
X-mailer: Pegasus Mail for Windows (v4.01)
Reply-To: djgpp-workers AT delorie DOT com

Seems I have found so serious trouble with DJGPP port of GCC-3.0.X that
I would never ask DJ to put it in better place than v2gnu/betas before
it would be fixed. But it is in v2gnu now (maybe we need to move it to
v2gnu/betas or to v2gnu/alphas ... )

ofstream class are seriously broken as following simple example outputs 
random contents in major part of output file:

#include <fstream>

int main (void)
{
   std::ofstream output ("Test.out");
   for (double x=1; x<65536.0; x++)
      output << x << "\n";
}

Flushing file to avoid filebuf overflow workarounds trouble, but of 
course it is not enough. It also seems that the reason of this breakage
is my attempt to fix filebuf problems with DOS style text files as the problem 
disappears after reverting these changes.

For example use of  'output << x  << std::endl;'  does not expose this problem
as std::endl flushes filebuf;

Andris

PS. Noticed it while testing port of experimental versions of gcc-3.1 2002012X.
as the problem is also there.

- Raw text -


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