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]
Other format: [Raw text]

[Bug c++/12883] destructor of array object not called if no prior instantiation of the template has happened


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 
} 
--------


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