Mail Archives: djgpp/1998/10/14/08:21:58
Hi all,
i'm try to compile the following file
with Gnu Cpp for ms-dos. latest version.
#include <vector.h>
class Obj {
private:
long int lCodeObj;
public:
Obj();
};
inline Obj::Obj()
{
lCodeObj=1;
};
// if include the line below there's : Abort ! error
// with -O or -O1
// works fine with -O2 end above or with no optimization
vector <Obj> VObjs(10);
// This works fine
vector <int> Vint(10);
int main()
{
return 0;
}
Like explained in the source, the line
vector <Obj> VObjs(10);
cause an Abort ! Error if compiled with Gcc optimizations options set to -O
-O1 while all seems works with Gcc optimizations options set to -O2 -O3
ecc. or without optimizations.
The line
vector <Obj> VObjs;
without specify the size, is compiled perfectly in every case.
A note.
The line
VObjs.resize(10);
cause the same compilation error.
TIA
>>mailed by ''~``
Stefano Del Furia ( o o )
__________________________________.oooO--(_)--Oooo._
| ___/ / _/__ www.geocities.com/SiliconValley/3546/ |
|/ _ / _(_-< Computer Science Department |
|\_,_/_//___/ delfo AT tech-center DOT com .oooO |
|ITIS "E.FERMI" Bibbiena 52010 AR IT ( ) Oooo. |
|_____________________________________\ (____( )___|
THEORY is when you know everything \_) ) /
but nothing works. (_/
PRACTICE is when everything works
but you don't know why.
Our aim is to join THEORY and PRACTICE:
(-: NOTHING works and we don't know WHY :-)
- Raw text -