Path: utzoo!utgpu!water!watmath!clyde!bellcore!rutgers!mailrus!ames!necntc!necis!mrst!sdti!mjy From: mjy@sdti.UUCP (Michael J. Young) Newsgroups: comp.lang.c++ Subject: Re: Zortech C++ Compiler Keywords: C++, cheap compiler Message-ID: <282@sdti.UUCP> Date: 11 Jul 88 14:49:22 GMT References: <352@fenix.Atlanta.NCR.COM> Reply-To: mjy@sdti.UUCP (0000-Michael J. Young) Organization: Software Development Technologies, Sudbury MA Lines: 93 In article <352@fenix.Atlanta.NCR.COM> tek@fenix.Atlanta.NCR.COM (Tom Klempay) writes: >I recently received some literature on the new Zortech C++ Compiler. This >thing sounds like the greatest thing since sliced bread (and for only $99.95, >the compiler, not sliced bread :-). I would appreciate it if anybody out >there who has any experience using this, if you could mail me your thoughts/ >feelings/problems with this product. From reading the articles Zortech sent me, >everything seems extremely positive for the compiler but I would appreciate >any input you might have. One specific question I have is "What version of >AT&T C++ does Zortech support?". Since there have been a number of questions about this compiler, I thought I'd post instead of reply via mail. The Zortech C++ compiler is indeed real. We just received our copy last Friday. We haven't had much time to play with it yet. I personally haven't tried it out at all, but a colleague has. First of all, ZC++ supports version 1.1 of cfront. The public and protected keywords are missing. The author said that only those things that were described in Stroustrup's book were implemented, but he's working on bringing it up to date. The reported Codeview compatibility really just means support for global symbols and source line numbers. Local symbols are not supported. Since there is also a documented bug in the processing of the #line directive, I'm not even sure how you can usefully use Codeview with inline functions. But I'll reserve judgement until I get to try it myself. Zortech is also working on a new debugger for C++, but I don't know when it will be available. The manual (according to my colleague) seems to be readable and well-organized. Dr. Stroustrup posted a message on Bix saying that he thought it was reasonable as well. Dr. Stroustrup did have a complaint about the fact that ZC++ did not do prototyping correctly. They practice something that they call 'autoprototyping'. To paraphrase, ZC++ interprets the declaration int f(); as meaning that f can take any number of parameters (as in the obsolescent ANSI C usage) rather than meaning that f can take no parameters. In addition, ZC++ will implicitly provide a prototype based on the first usage of the function. So the statement a = f (5); will result in an implied prototype of int f(int); which will be used for all future invocations. As you can imagine, this causes problems for variadic functions like printf(). Dr. Stroustrup was sympathetic to what they were trying to accomplish (he said he experimented with 'autoprototyping' early in the development of C++), but he had learned from experience that it was a mistake. Note however, that autoprototyping can be turned off by a command line option. As with any new product, there are some bugs. Many are documented with the package, and I assume Zortech is working feverishly to fix them all. ZC++ seems to have problems dealing with disambiguating functions in some cases. As an example that my colleague noticed, struct two; struct one { one (two &q); one (){} }; struct two { one & func(); }; two t; void junk (){ one x = t.func(); } results in an error message that it can't figure out which constructor of one to call. It is also documented that some overloaded operators (like operator++) don't work at all. As I said, we haven't had a chance to really wring it out yet, but from our initial look at it I don't expect to be able to port our existing C++ code from cfront to ZC++ without a lot of work. I think ZC++ is a step in the right direction, and I wish Zortech success. But I think it is still a very new product, and it will take another release or two to bring it completely in line with what we are used to with cfront. From what I've heard about Datalight C, I'm expecting that we won't have to wait very long. -- Mike Young - Software Development Technologies, Inc., Sudbury MA 01776 UUCP : {decvax,harvard,linus,mit-eddie}!necntc!necis!mrst!sdti!mjy Internet : mjy%sdti.uucp@harvard.harvard.edu Tel: +1 617 443 5779