This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
gcc-3.3.2 freebsd 4.9 bug?
- From: "znsoft" <my at zndev dot com>
- To: "gcc" <gcc at gcc dot gnu dot org>
- Date: Mon, 19 Jan 2004 13:47:42 +0800
- Subject: gcc-3.3.2 freebsd 4.9 bug?
Hi, is this a bug of gcc?
I compile these code under gcc-3.3.2 or gcc-3.3.3-20040112 ,FreeBSD 4.9 , can't run correct. but under linux ,it run good!
#include <stdio.h>
#include <iostream>
#include <fstream>
using namespace std;
int main(int argc, char *argv[])
{
int nCount,total=0;
char buf[129];
fstream ff(argv[1],ios::in|ios::binary);
while((nCount = ff.readsome(buf,128))>0)
{
total+=nCount;
}
printf("size: %d\n",total);
return 0;
}
=====================================================================