problems with vtable-thunks

Joost Kraaijeveld J.Kraaijeveld@Askesis.nl
Tue Jun 20 03:54:00 GMT 2000


If I compile the following source with -fvtable-thunks it prints
"s.fail()", if I compile it without -fvtable-thunks it does not. Is this
a bug or is this by design? If by design, can anyone point explain it to
me (or point me to a URL).

Yes, I know strstream is depricated.


#include <iostream>
#include <strstream>

class Base
{
   public:
      Base() : ulong(10) {}
      unsigned long ulong;
};

int main(int argc, char* argv[], char* /*envp[]*/)
{
   Base base;
   std::strstream s;
   s.write(&base,sizeof(Base));
   if(s.fail())
   {
      std::cout << "s.fail()" << std::endl;
   }
   return 0;
}
  

Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
email: J.Kraaijeveld@Askesis.nl
web: www.askesis.nl 


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list