Topic: basic concepts and fundamental types


Author: "MuTPu4" <MuTPu4@gmail.com>
Date: Sun, 10 Sep 2006 23:42:36 CST
Raw View
As I have understood from syntactic (A.6) and semantic (2.10), (2.11)
rules of the current standart, keywords, which denotes fundamental
types are identifiers. Moreover (3/3-4) implies that such identifiers
are names.
If above interpretation is correct and it is an original intent, the
next paragraph (3/5) seems to introduce contradiction. Also, clause
about declarative regions and scopes (3.3) does not confirm a
requirement of (3/5) paragraph. Can we consider declaration or at least
scopes fo such names?
Pargraph (3.4/1) claims that all names are subject of name lookup. Does
this means that name lookup rules applicable to names of fundamental
types? Requirement that "Name lookup associates the use of a name with
a declaration of that name" also seems contradictive.
Does such names have linkage? I think that (3.5/8) implies that they
have no linkage which is very strange.

P.s. I am sorry for spelling or grammar mistakes, English is not my
native language.

---
[ 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.comeaucomputing.com/csc/faq.html                      ]





Author: "Greg Herlihy" <greghe@pacbell.net>
Date: Mon, 11 Sep 2006 09:43:24 CST
Raw View
MuTPu4 wrote:
> As I have understood from syntactic (A.6) and semantic (2.10), (2.11)
> rules of the current standart, keywords, which denotes fundamental
> types are identifiers. Moreover (3/3-4) implies that such identifiers
> are names.

Not exactly. The set of C++ keywords consists of a certain set of
identifiers that have been designated "keywords". In other words, a
keyword is an "ex-identifier', and now belongs in a different set.
Therefore a keyword should not be considered an identifier (by virtue
of its keyword designation). In fact, identifiers and keywords (along
with literals, operators and now, puntuators) are all distinct "token"
types in the C++ grammar (see    2.6).

As a practical consequence, a keyword is always recognized as a keyword
and can never be used as a name in a C++ program.

Greg


---
[ 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.comeaucomputing.com/csc/faq.html                      ]





Author: kuyper@wizard.net
Date: Mon, 11 Sep 2006 09:44:19 CST
Raw View
MuTPu4 wrote:
> As I have understood from syntactic (A.6) and semantic (2.10), (2.11)
> rules of the current standart, keywords, which denotes fundamental
> types are identifiers. Moreover (3/3-4) implies that such identifiers
> are names.

You should first read 3p4, says "a _name_ is a use of an
identfier(2.10) that denotes an entity or _label_ (6.6.4,6.1)"

Keywords do not identify either entities or labels, and are therefore
not names. I don't see how you could read 3.3p4 as implying otherwise.

---
[ 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.comeaucomputing.com/csc/faq.html                      ]