g++ global constructor bug?
Douglas S. J. De Couto
decouto@lcs.mit.edu
Fri Jul 5 13:30:00 GMT 2002
the following program doesn't work right with cygwin, it seems the
global object sh constructor is not being called.
--------------------
#include <stdio.h>
struct foobar {
foobar(int i) { printf ("foobar(%d)\n", i); }
};
foobar sh(1);
int
main(int argc, char **argv) {
foobar s(2);
}
--------------------
bash-2.05a$ g++ foo.cc
bash-2.05a$ a.exe
foobar(2)
bash-2.05a$
i expected instead to see
foobar(1)
foobar(2)
i saw lots of stuff about DLLs etc., on the mailing list, but i am not
producing a DLL here.
$ g++ -dumpversion
2.95.3-5
--
Douglas S. J. De Couto decouto@lcs.mit.edu
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list