This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12883] destructor of array object not called if no prior instantiation of the template has happened
- From: "flopiano at bigfoot dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Nov 2003 18:31:48 -0000
- Subject: [Bug c++/12883] destructor of array object not called if no prior instantiation of the template has happened
- References: <20031103115217.12883.mxm01@comm2000.it>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12883
------- Additional Comments From flopiano at bigfoot dot com 2003-11-03 18:31 -------
Note also that if the size of the array is explicitly specified, the destructors are correctely
called as in :
---------
extern "C" void abort ();
template <int> struct X {
X(int) { }
~X() { abort(); }
};
int main() {
X<0> array[1] = { 0 }; // <-- specify size
}
--------