This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: calling destructors without calling constructors! for static object


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]