[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
g++ freezes on errneous array initialization
From: |
Daniel Junglas |
Subject: |
g++ freezes on errneous array initialization |
Date: |
Mon, 12 May 2003 23:42:30 +0200 |
User-agent: |
KMail/1.5.1 |
Hi there,
I do not have the time to check the archives wether this is a known/fixed bug
or not, so please excuse if you already know about this one:
I have SuSE-Linux 8.2 and g++ --version yields:
g++ (GCC) 3.3 20030226 (prerelease) (SuSE Linux)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
Consider the following program (which I did attach do this email as well):
int main (int, char**)
{
static int const array[] = {
0; // <-- this should be a comma instead of a semicolon
1,
2
}
return 0;
}
When I compile this program using
g++ -o bug bug.cpp
I (correctly) see the error message
bug.cpp: In function `int main(int, char**)':
bug.cpp:4: error: parse error before `;' token
But after printing this message, g++ seems to freeze: nothing happens for
minutes and I can see with the top utility that g++ grabs megabytes of memory.
Kind regards
Daniel Junglas
bug.cpp
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- g++ freezes on errneous array initialization,
Daniel Junglas <=