Title
Global namespace scope
Status
tc1
Section
9.8 [basic.namespace]
Submitter
Greg Lutz

Created on 1999-09-19.00:00:00 last changed 262 months ago

Messages

Date: 1999-10-15.00:00:00

Proposed resolution (10/00):

  1. Replace the first sentence of 6.4.6 [basic.scope.namespace] paragraph 3 with

    The outermost declarative region of a translation unit is also a namespace, called the global namespace. A name declared in the global namespace has global namespace scope (also called global scope).
  2. In the last sentence of the same paragraph, change "Names declared in the global namespace scope" to "Names with global namespace scope."

  3. Replace 9.8 [basic.namespace] paragraph 2 with

    The outermost declarative region of a translation unit is a namespace; see 6.4.6 [basic.scope.namespace].

Date: 2022-02-18.07:47:23

9.8 [basic.namespace] paragraph 2 says:

A name declared outside all named namespaces, blocks (8.4 [stmt.block] ) and classes (Clause 11 [class] ) has global namespace scope (6.4.6 [basic.scope.namespace] ).
But 6.4.6 [basic.scope.namespace] paragraph 3 says:
A name declared outside all named or unnamed namespaces (9.8 [basic.namespace] ), blocks (8.4 [stmt.block] ), function declarations (9.3.4.6 [dcl.fct] ), function definitions (9.5 [dcl.fct.def] ) and classes (Clause 11 [class] ) has global namespace scope (also called global scope).
9.8 [basic.namespace] should evidently be changed to match the wording in 6.4.6 [basic.scope.namespace] — the unnamed namespace is not global scope.
History
Date User Action Args
2003-04-25 00:00:00adminsetstatus: dr -> tc1
2000-11-18 00:00:00adminsetstatus: ready -> dr
2000-05-21 00:00:00adminsetstatus: review -> ready
2000-02-23 00:00:00adminsetmessages: + msg221
1999-09-19 00:00:00admincreate