What namespaces are available?

Mark Brader msb at sq.com
Sat Mar 18 09:54:31 AEST 1989


Here's what section 4.1.2.1 actually says, in part:

#   All identifiers that begin with an underscore and either an
#   upper-case letter or another underscore are always reserved
#   for any use.
#
#   All identifiers that begin with an underscore are always
#   reserved for use as identifiers with file scope in both the
#   ordinary identifier and tag name spaces.

Karl elected to coin the term "semi-reserved" for the second group,
there being no term defined in the proposed Standard.

4.1.2.1 goes on to describe the identifiers and identifier classes
that are reserved by being specifically mentioned, as opposed to the
syntactically distinguished ones mentioned above, and then says:

#   No other identifiers are reserved.  If the program declares or
#   defines an identifier with the same name as an identifier reserved
#   in that context (other than as allowed by section 4.1.6 [that's
#   things like FILE *fopen(); in place of #include <stdio.h>]), the
#   behavior is undefined.

A footnote notes that you have to be especially careful about macro names
because they "are replaced wherever found, independent of scope and name
space".

All this seems clear enough to me.

Mark Brader	  "I'm not a lawyer, but I'm pedantic and that's just as good."
utzoo!sq!msb, msb at sq.com				       -- D Gary Grady



More information about the Comp.std.c mailing list