Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!caen!sdd.hp.com!spool.mu.edu!uwm.edu!linac!unixhub!ditka!comeau From: comeau@ditka.Chicago.COM (Greg Comeau) Newsgroups: comp.sys.amiga.programmer Subject: Re: REVIEW: Comeau C++ compiler Message-ID: <37917@ditka.Chicago.COM> Date: 30 Apr 91 20:41:16 GMT References: <37123@ditka.Chicago.COM> Sender: comeau@ditka.Chicago.COM (Greg Comeau) Reply-To: comeau@csanta.attmail.com (Greg Comeau) Organization: Comeau Computing Lines: 53 In article cimshop!davidm@uunet.UU.NET (David S. Masterson) writes: >>>>>> On 24 Apr 91 14:38:39 GMT, iwm@doc.ic.ac.uk (Ian Moor) said: >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? I dunno. That's a hard one to call given the information you've provided. What I can tell you is that the number of times such a scenario has popped up its head with our compiler is almost non-existant and the users almost always were able to understand the problem. To be honest, I've had more problems of this sort in asm generating C compilers than in any other situation (and I've both written and used other "to C" compilers). >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). Right. To add a few points: we don't require an ANSI C compiler. A K&R compiler will work fine as well. Also, the issue of things like cross-compiling and embedded systems in gneral cannot be handled as smoothly any other way (that is portability of the compiler itself is not the only issue although that is important) >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. True, but for the most part these problems are as non-existant as the sporadic problems of other mechanisms. It is practical to say that it's a non-issue. >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? C++ should *not* reamin ANSI-C compliant. (Although this by no means says that it should and will make tangental leaps off that track... only to say that even though C is a subset of C++, they are 2 different languages). - Greg -- Comeau Computing, 91-34 120th Street, Richmond Hill, NY, 11418 Producers of Comeau C++ 2.1 Here:attmail.com!csanta!comeau / BIX:comeau / CIS:72331,3421 Voice:718-945-0009 / Fax:718-441-2310