[comp.lang.c++] arg declaration vs. init expression

pkturner@cup.portal.com (Prescott K Turner) (12/21/89)

I have a question about what may be a syntactic ambiguity in C++.
This occurs partly because the Draft Reference Manual no longer
prohibits redundant parentheses in declarators.  What happens is that
something between parentheses following a declarator can be either the
expression-list of an initializer or the argument-declaration-list of a
function declarator.  For example:

   struct S {
      S(int);
      };
   void foo() {
      int y;
      S x(int(y)); // int(y) can be an argument declaration or an expression
      }

Has a resolution for this been proposed?  The 2.0(+?) version of cfront
I'm using interprets int(y) as an expression.
--
Prescott K. Turner, Jr.
13 Burning Tree Rd., Natick, MA 01760 USA    (508) 653-0357
UUCP: ...sun!cup.portal.com!pkturner    Internet: pkturner@cup.portal.com