calling destructors without calling constructors! for static object

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Fri Dec 31 20:54:00 GMT 1999


> The following code demonstrates what I would call a bug.
> It calls global destructor for C although C was never constructed!

Thanks for your bug report. This is a known problem: g++ currently
builds an array of objects to be destructed at compile time. This has
a number of limitations; your code exposes one of them.

Regards,
Martin



More information about the Gcc-bugs mailing list