Topic: Defect Report: derived-declarator-type-list undefined


Author: Christopher Yeleighton <krixel@qed.pl>
Date: Thu, 29 Dec 2005 19:52:44 +0000 (UTC)
Raw View
[moderator's note: forwarded to C++ committee. -sdc]

The syntactic category
derived-declarator-type-list

 is used in several places of the International Standard, starting from
8.3.1/1, but the syntactic category

derived-declarator-type

remains undefined.




[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]





Author: william.m.miller@gmail.com
Date: Tue, 10 Jan 2006 12:26:00 CST
Raw View
Christopher Yeleighton wrote:
> [moderator's note: forwarded to C++ committee. -sdc]
>
> The syntactic category
> derived-declarator-type-list
>
>  is used in several places of the International Standard, starting from
> 8.3.1/1, but the syntactic category
>
> derived-declarator-type
>
> remains undefined.

There's a good reason for that: neither derived-declarator-type-list
nor derived-declarator-type is a syntactic category (nonterminals
are not the only uses of italics in the Standard).  The term
derived-declarator-type-list is used in the construction of the
_English_ description of the cumulative effect of the various
declarator operators.  For example, in a declaration like
"int *p[10];", 8.3.4 tells us that the type of "int p[10]" is
"array of 10 int".  The "array of 10" part of that becomes the
derived-declarator-type-list for the next level up, so substituting
in 8.3.1 into the phrase "derived-declarator-type-list
cv-qualifier-seq pointer to T" gives "array of 10 pointer to int."
There's no syntactic definition for derived-declarator-type because
"array of 10" is English, not C++.

Note that this style of presentation for the effect of the declarator
operators was taken directly from the C89/C90 Standard, and that the
C99 Standard has also kept it verbatim.  As a result, I don't think
that there will be any great enthusiasm for the wholesale invention
of a new way describing this material.  However, I have forwarded this
note to the project editor with the suggestion that this part of the
Standard might be clearer if the introductory material in 8.3 mentioned
the phrase derived-declarator-type-list and briefly described how it is
used in the following subsections.  It's clearly not a defect, though,
just a question of optimal clarity of presentation, and thus is a
matter for editorial discretion.

-- William M. (Mike) Miller
  Edison Design Group

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]