Mail Archives: djgpp/1995/04/21/06:42:07
Greetings,
I am new on this list --- I subscribed just because of the bug (?) I think
I found from the latest release (2.6.3) of gcc, namely in cc1plus.
The following program (which is not the kind of program I usually write
but produced automatically with another program) causes cc1plus to
"Abort!" due to segment violation, but cc1 compiles it just fine
(no flags used in the command line).
I was unable to verify exactly whether this is a FSF problem or a DJGPP
problem, since our unix boxes are running gcc versions 2.5.8 and 2.6.0
(they compiled it just fine). If someone reading this list would kindly test
the program below with a non-djgpp v2.6.3 gcc, then the right address
would be clear.
Anyway, here's the troublemaker. Save as "test.cc" and try to compile
with "gcc -c test.cc", for example.
==================== BEGIN TEST.CC ===============
/*
When compiled, cc1plus crashes, cc1 does not
*/
void f1(char *s) { };
int f2(char *s, int n) { };
int main() {
int result;
result = (f1("string"), f2("string", 1));
}
==================== END TEST.CC ===============
Timo Knuutila Dept. of Computer Science
University of Turku
knuutila AT cs DOT utu DOT fi Lemminkaisenkatu 14 A
SF-20520 Turku, Finland
- Raw text -