This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Gcc problem on HP Unix
- To: gcc at gcc dot gnu dot org
- Subject: Gcc problem on HP Unix
- From: =?gb2312?q?Lee=20Stephen?= <lihaoming2000 at yahoo dot com dot cn>
- Date: Fri, 19 Oct 2001 16:08:40 +0800 (CST)
Hi,everybody.
I compiled this program under HPPA 9000 system
,with gcc 3.0.There's neither error nor warning during
the compile process.But when I ran it,segmentation
fault happened and the program terminated.
Here is the program:
#include <stdio.h>
#include <string>
using namespace std;
class mapnode
{
string srcName,desName;
};
int main()
{
fprintf(stderr,"Before mapnode constructor\n");
mapnode a[2000];
fprintf(stderr,"Mapnode constructor accomplished\n");
return 1;
}
And my compile option: g++ main.cpp
I ran this program on Solaris and Linux,everything is
OK.I am sure the error is related with the array
because it's too large.But I can't believe the system
could not provide less than 10KB memory for this array.
_________________________________________________________
Do You Yahoo!? 登录免费雅虎电邮! http://mail.yahoo.com.cn
<font color=#6666FF>无聊?郁闷?高兴?没理由?都来聊天吧!</font>——
雅虎全新聊天室! http://cn.chat.yahoo.com/c/roomlist.html