Thread View: gnu.g++.bug
1 messages
1 total messages
Started by "Douglas C. Schmidt"
Mon, 26 Sep 1988 18:24
Program causes failed assertion for g++ 1.27
Author: "Douglas C. Schmidt"
Date: Mon, 26 Sep 1988 18:24
Date: Mon, 26 Sep 1988 18:24
58 lines
2121 bytes
2121 bytes
Hi,
The following short program fragment causes a failed assertion for g++
1.27 running on the Sparc.
----------------------------------------
#include <stream.h>
#include <ctype.h>
#include <Obstack.h>
#define NIL(TYPE) ((TYPE *)0)
class Word_Read : Obstack {
private:
int Length;
char *Curr_Word;
public:
Word_Read(int Default_Len = 80): (Default_Len), Length(0), Curr_Word(0) {
// Make the default something reasonable, like 80 columns.
}
Obstack::free; // Allow the derived type to inherit
// only this member function.
friend istream& operator>> (istream& s,Word_Read& Word) {
char c;
while (cin.good() && cin.get(c) && isspace(c)) {
;
}
do {
if (isalnum(c)) {
Word.Obstack::grow(c);
}
else if (isspace(c)) {
Word.Length = Word.Obstack::size();
Word.Curr_Word = (Word.Obstack::finish(0));
return(s);
}
} while (cin.good() && cin.get(c));
return(s);
}
};
----------------------------------------
The diagnostic is:
----------------------------------------
g++ version 1.27.0
/usr/public/lib/g++/gcc-cpp+ -v -I/cd/ua/schmidt/include/ -undef -D__GNU__ -D__GNUG__ -Dsparc -Dsun -Dunix bug.cc /tmp/cca08687.cpp
GNU CPP version 1.27.0
/usr/public/lib/g++/gcc-c++ /tmp/cca08687.cpp -quiet -dumpbase bug.cc -fchar-charconst -noreg -version -o /tmp/cca08687.s
Failed assertion (0) at line 981 of `convert.c'.
GNU C++ version 1.27.0 (sparc) compiled by GNU C version 1.28.
/usr/public/g++: Program c++ got fatal signal 6.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads