rfg@pink.ACA.MCC.COM (Ron Guilmette) (05/28/89)
I recently posted a flame here about the lack of agreement between cfront and g++, and Michael Tiemann followed up on the info-g++ mailing list. I wanted to respond to his response here, so here it is: ---------------------------------------------------------------- > >What is the current status of the AT&T C++ 2.0 compatible > >GNU C++ compiler? > > You must be joking! Compatibility? Ha! > [...] > To say that G++ was, is, or will be "compatible" with any version > of cfront is highly misleading however. I for one have detected a > [...] > Compatibility is only an issue if you are porting code. If you are, > I hope for your sake that you are *not* porting anything big (i.e. > over 1000 lines) between cfront and G++. > > Ron spends a great deal of time wandering into the "dark corners" of > the language, and in these corners, AT&T C++, GNU C++, The Book, The > Lime Book, and other references all disagree in one way or another. I would like to appologize (if that's appropriate) and clarify my earlier remarks (if I may). Michael is quite right that I *do* poke into the dark corners of the language, and he is also correct that standards do not exist yet. The lack of standards is most glaringly evident in exactly those dark corners that I have been visiting recently. It is the lack of current "standards" for C++ that I was bemoaning in my earlier posting and not any individual langauge processor's ability (or inability) to handle any given construct or set of constructs. I hope that nobody has misinterpreted my previous comments as gripes about any particular C++ language processor. On the contrary, I am very impressed with the work that both Bjarne and Michael Tiemann have done. They have both worked very hard to create very great products, and many of their (independent) innovations and additions to the language are fantastically useful. No, I'm just bothered by the fact that these great products aren't more alike. And I freely admit to being a total snob in this regard. You see, I spent a lot of time (in a previous incarnation) working on Ada (please don't anybody hold that against me) and one thing that *is* impressive about Ada in the extent to which it is standardized. I mean we're talking STANDARDIZED. The Ada Compiler Evaluation Suite (produced at great taxpayer expense) consists of over 3000 individual test files, each of which probably contains between 10 and 20 individual tests (on average). This suite insures a high degree of conformity between compilers, but, if you keep up with comp.lang.ada, you will nonetheless occasionally see sombody over there moaning about how how his code was *still* painful to port, even though he was going from one "validated" compiler to another "validated" compiler (sometime even on the same machine & OS). > Such reconnaisance has uncovered lots of things, from bugs in > compilers to typos in the specifications. (But mostly I uncovered a large amount of my own ignorance :-) > Be that as it may, 1000 > line programs can be ported from AT&T to GNU C++ often with no changes > to source code. Michael is right, and I retract my earlier statement (which overstated the porting problem to emphasize the standardization issue). > The libg++ header files make up most of the > differences you are likely to find. There are hundreds of thousands of > lines of C++ code which compile under both AT&T and GNU C++, and there > is no reason to believe that what has worked for many will not work > for you. All true, but I advise caution anyway. Never *plan* on porting 10,000 lines from G++ to cfront (or vise versa) in a single day. You may be disappointed. > Whatever your beliefs about AT&T vs GNU, I can tell you > this: don't expect to go from C++ 1.2 to C++ 2.0 without source code > changes, especially if you ever use protected members, virtual > functions, or destructors in your programs. Yep. There's *that* incompatibility also. Just another thing for me to groan about! :-) -- // Ron Guilmette - MCC - Experimental Systems Kit Project // 3500 West Balcones Center Drive, Austin, TX 78759 - (512)338-3740 // ARPA: rfg@mcc.com // UUCP: {rutgers,uunet,gatech,ames,pyramid}!cs.utexas.edu!pp!rfg