The segmentation fault is a bug in your code, not in gcc. A temporary
is getting constructed, and you are using the compiler generated
assignment operator, so you get two instances deallocating the same
memory. Try adding a private operator=
class ScalarVector : public Vector {
private:
Package: g++
Version: 2:2.95.4-14
Severity: normal
Hi !
We have problems with a C++ program reported in detail below.
It is not a Debian specific problem. In particular we checked:
- there is the same problem using GNU C++ compiler on SuSE Linux
and MacOS X
- Code compiles and executes properly
2 matches
Mail list logo