Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!think!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!att!dptg!pegasus!hansen From: hansen@pegasus.ATT.COM (Tony L. Hansen) Newsgroups: comp.lang.c++ Subject: Re: C++ syntactic ambiguity (long/tedious) Summary: it's no longer true Keywords: C++, evolution Message-ID: <4244@pegasus.ATT.COM> Date: 13 Nov 89 01:12:55 GMT References: <405@lpi.UUCP> Reply-To: hansen@pegasus.ATT.COM (Tony L. Hansen) Organization: AT&T Bell Labs Middletown/Lincroft NJ USA Lines: 26 < AT&T C++ (2.0) seems to choose #2. This choice seems to be based on a a < new and incompatible (with old C and ANSI C) prohibition of redundant < parentheses around declarators; the simple declaration "int (x);" (inside < a function definition) has been rendered illegal. In "The C++ Answer < Book" by Tony Hansen (on page 522 in appendix A), there is a statement < that superfluous parentheses in declarations, while legal in ANSI C, are < *not* permitted in C++. But in "C++: From Research to Practice" by S.B. < Lippman and B.E. Moo (in the 1988 USENIX C++ Conference Proceedings) there < is an indication that C++ *does* allow extraneous parentheses in < declarations. In addition, in "The Evolution of C++: 1985 to 1987" by < Bjarne Stroustrup, there is an assertion that redundant parentheses are < *illegal* in declarations, but in the follow up "The Evolution of C++: < 1985 to 1989", that assertion seems to have been removed. When I wrote that paragraph, the restriction was very definitely present. Unfortunately, I didn't catch the fact that the restriction had later been removed while I was reviewing the 2.0 reference manual. That's right, the restriction is no longer present. Isn't language evolution wonderful? :-) The other statements within that section in Appendix A are correct. Tony Hansen att!pegasus!hansen, attmail!tony hansen@pegasus.att.com