Nick Stoughton <nick@usenix.org> wrote, on 03 Jul 2008:
>
> The C++ standard currently (in the 1998 and 2003 editions) has some
> typedef names that overlap into the POSIX reserved namespace rules (XSH
> 2.2.2). In particular the reservation of "_t" for ANY header (D5.1, page
> 472, line 16036) collides with some some of the names in C++.
>
> In the new revision, C++0x, further names are being proposed in this
> space.
>
> My belief is that the namespace is reserved for implementation and
> standards use.
There is a subtle difference between reserving a namespace for
standards use, and reserving a namespace for implementation use but
also defining some standard identifiers in that namespace. What
POSIX does is mostly the latter. The only namespace it reserves
purely for standards use is the prefixes posix_, POSIX_, and _POSIX_.
So unless C++0x defines names beginning with posix_, POSIX_, or
_POSIX_ (which seems highly unlikely), I believe there is no conflict
between C++0x and POSIX here. The only potential conflict is between
C++0x and individual POSIX implementations, but that is no different
from the potential conflict when a POSIX revision adds new standard
names in a namespace it reserved for implementation use.
> I'd like to be able to give an official liaison statement back to the C
> ++ committee that blesses what they've done/are doing. Specifically:
>
> 1. It is OK for the C++ standard to use the names listed in the attached
> email.
Agreed.
> 2. Provided that appropriate due diligence is done to ensure that no
> existing applications or implementations are broken, they may use other
> names (e.g. *_MAX) as they see fit.
They may use other names as they see fit, as long as they don't begin
with posix_, POSIX_, and _POSIX_. The due diligence is up to them,
not something we can impose on them.
> 3. Request that they inform us of such names they are planning to use,
> for liaison purposes (this is part of the due-diligence against breaking
> stuff, and so that we realize what a particular name is being used for
> in a different standard).
This applies equally well to any additional names, not just those in
reserved namespaces.
--
Geoff Clare <g.clare@opengroup.org>
The Open Group, Thames Tower, Station Road, Reading, RG1 1LX, England
|