Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!wuarchive!uunet!cimshop!davidm From: cimshop!davidm@uunet.UU.NET (David S. Masterson) Newsgroups: comp.sys.amiga.programmer Subject: Re: REVIEW: Comeau C++ compiler Message-ID: Date: 25 Apr 91 19:17:12 GMT References: <1540@tronsbox.xei.com> <36963@ditka.Chicago.COM> <1991Apr17.174759.16250@jato.jpl.nasa.gov> <37123@ditka.Chicago.COM> Sender: davidm@cimshop.UUCP Organization: Consilium Inc., Mountain View, California Lines: 40 In-reply-to: iwm@doc.ic.ac.uk's message of 24 Apr 91 14:38:39 GMT >>>>> On 24 Apr 91 14:38:39 GMT, iwm@doc.ic.ac.uk (Ian Moor) said: Ian> In article <37123@ditka.Chicago.COM> comeau@ditka.Chicago.COM (Greg Ian> Comeau) writes: Greg> From my discussion with other compiler writers as well as my own Greg> feelings, there is very little that say a direct native code compiler Greg> could do better, and when it can, it usually comes down Ian> One problem with using a fairly complex language as an intermediate code, Ian> especially when the `backend' is error reporting. As a case in point, I Ian> am evaluating a Modula-2 compiler for SPARC that produces C, I get an Ian> error message from Sun's C compiler about an intermediate file: is it a Ian> bug in the C compiler, or has the modula compiler generated incorrect C? Ian> The intermediate code is not meant to be read, and I have to assume the Ian> modula compiler is wrong, since GCC does not like the file either. Ian> You may find with the different C compilers SAS/Lattice/PDC/DICE/GCC... Ian> that one will work and the others not. This seems to be a contentious issue. One the one hand, compiling into C code is seen as a means of making the compiler easier to port from system to system (ANSI-C is more standard than the various assembly codes for the various systems that run ANSI-C). The advantage is that the output of the compiler will be more useful across a wider range of systems, but the disadvantage is that there may be problems and inefficiences in the back-end C compiler that the front-end compiler can't take into account. On the other hand, compiling into the lower level code means greater efficiencies can be implemented into the compiled code and compilation should be faster (one pass instead of two). The advantage is integration and performance, the disadvantage is more difficulties in porting. Also, adopting the view that code should compile to (at least) assembly level begs the question (in the case of C++) why should the language remain ANSI-C compliant? -- ==================================================================== David Masterson Consilium, Inc. (415) 691-6311 640 Clyde Ct. uunet!cimshop!davidm Mtn. View, CA 94043 ==================================================================== "If someone thinks they know what I said, then I didn't say it!"