Path: utzoo!attcan!uunet!husc6!bloom-beacon!mit-eddie!uw-beaver!apollo!mrst!sdti!turner From: turner@sdti.UUCP (Prescott K. Turner) Newsgroups: comp.lang.c++ Subject: Re: unary-expression syntax Summary: not in the book Keywords: new,initializer,C++ Message-ID: <274@sdti.UUCP> Date: 27 May 88 03:52:00 GMT Reply-To: turner@sdti.UUCP (Prescott K. Turner, Jr.) Organization: Software Development Technologies, Sudbury MA Lines: 21 In article <458@polari.UUCP> rlb@polari.UUCP (rlb) writes: >In Stroustrup's book, section 7.2 of the reference manual contains: > unary-expression: > ... > new type-name initializer.opt > ... >I could not immediately find any examples elsewhere that showed that >"initializer" could be other than "( expression-list )" for the "new" operator. When I tried some examples out on cfront last year, it accepted only initializers of the form "( expression-list )". The grammar in the book is a simplified guide for programming, and has a number of ambiguities more subtle than those resolved by the precedence of operators. Stroustrup acknowledges the book's inadequacy in defining C++. A real language definition is in the works. -- Prescott K. Turner, Jr. Software Development Technologies, Inc. 375 Dutton Rd., Sudbury, MA 01776 USA (617) 443-5779 UUCP:genrad!mrst!sdti!turner