Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!mcsun!ukc!harrier.ukc.ac.uk!mr3 From: mr3@ukc.ac.uk (M.Rizzo) Newsgroups: comp.sys.amiga.programmer Subject: Re: REVIEW: Comeau C++ compiler Keywords: programming, language, C++, compiler Message-ID: <7482@harrier.ukc.ac.uk> Date: 1 May 91 19:04:58 GMT References: <36851@ditka.Chicago.COM> <7285@harrier.ukc.ac.uk> <37228@ditka.Chicago.COM> Reply-To: mr3@ukc.ac.uk (M.Rizzo) Organization: Computing Lab, University of Kent at Canterbury, UK. Lines: 49 In article <37228@ditka.Chicago.COM> comeau@csanta.attmail.com (Greg Comeau) writes: >In article <7285@harrier.ukc.ac.uk> mr3@ukc.ac.uk (M.Rizzo) writes: >>I can understand that CPR will work with C++ code and will try to do its >>best - but I can't see how it will be able to understand the "this" >>pointer. The GNU debugger gdb required a number of extensions to work >>properly with GNU g++ - I think CPR will need a few as well. > >I don't see why. > >``this'' is just a const pointer to the object being passed. Therefore >a class member is just this->'d. What problem di g++/gcc have in this >area? Oops (no pun intended) silly me - you're right Greg. In fact gdb didn't have any problem with "this" at all. It was just a wrong impression that I had - I should've checked before I opened my big mouth. I deserve to be flamed ! However I do recall seeing somewhere (probably on some gnu newsgroup) that there were a number of areas where gdb was being improved to provide better support for g++ i.e. gdb always worked with g++, but not always in a friendly manner, one of the problems being name mangling (see below) which has been resolved in the latest version of gdb. Another had to do with better understanding of multiple inheritance (exactly how I'm not sure). >>Another problem >>is that member function names of the form "class::function" get translated >>to some other C function name internally - I don't know for sure but I expect >>this is the case with Comeau C++ (that's how its done on GNU and Zortech). > >That is correct. We find that initial purchasers of Comeau C++ will >sometimes call up about this, but often never call twice as they get >used to it since C++ has many characteristics which diverts the energy >normally spent in debugging into other areas of the programming cycle. >Nevertheless, this is something that we spend time on solving with the >ports of Comeau C++ we do. For instance, under UNIX we have something called >CCsdb, which allows you to use to C++ names as is. With older versions of GNU gdb there was a small utility g++filt which one could use to translate between C++ and mangled identifiers. Used with a mouse cut-and-paste-text-between-windows as provided by xterm this was very useful. I believe such a PD utility for cutting & pasting text between console windows is available for the Amiga so maybe an equivalent of g++filt would be nice ? >- Greg Mike Rizzo