Xref: utzoo comp.lang.c++:2813 gnu.g++:106 Path: utzoo!attcan!uunet!bu-cs!bloom-beacon!tut.cis.ohio-state.edu!mailrus!csd4.milw.wisc.edu!uxc!garcon!garcon.cso.uiuc.edu!grunwald From: grunwald@flute.cs.uiuc.edu Newsgroups: comp.lang.c++,gnu.g++ Subject: AAGAGGGGHHHHH Message-ID: Date: 18 Mar 89 04:26:14 GMT Sender: news@garcon.cso.uiuc.edu Distribution: comp,gnu Organization: University of Illinois, Urbana-Champaign Lines: 24 ``The subject sez it all.'' This is a plea to all C++ implementors out there. PLEASE GIVE A WARNING MESSAGE WHEN YOU SEE ``delete foo'' BUT YOU HAVEN'T SEEN THE CLASS BODY FOR ``foo''!!!!!! I just spent 3 days tracking down a bug related to this. A class ``Message'' had a destructor. However, in the one file where Messages were deleted, I didn't include (through oversight) the .h file. Class ``Messages'' has a private block-allocator, and uses a destructor to chain items on a freelist. Without seeing that class definition, the AT&T C++ 1.2 and G++ 1.34.1 compilers both assumed that a call to __builtin_delete or whatever was just fine. This trashes malloc() is a very un-debuggable way. -- Dirk Grunwald Univ. of Illinois grunwald@flute.cs.uiuc.edu