Created on 2012-08-24.00:00:00 last changed 141 months ago
[Moved to DR at the April, 2013 meeting.]
Proposed resolution (October, 2012):
Delete 9.2.2 [dcl.stc] paragraph 7:
A name declared in a namespace scope without a storage-class-specifier has external linkage unless it has internal linkage because of a previous declaration and provided it is not declared const. Objects declared const and not explicitly declared extern have internal linkage.
There is a contradiction in the specification of the linkage of members of the unnamed namespace, for example
namespace {
int x;
}
According to 6.7 [basic.link] paragraph 4,
An unnamed namespace or a namespace declared directly or indirectly within an unnamed namespace has internal linkage. All other namespaces have external linkage. A name having namespace scope that has not been given internal linkage above has the same linkage as the enclosing namespace if it is the name of
a variable; or
...
which would give x internal linkage. However, 9.2.2 [dcl.stc] paragraph 7 says,
A name declared in a namespace scope without a storage-class-specifier has external linkage unless it has internal linkage because of a previous declaration and provided it is not declared const.
This would give x external linkage. (This appears to have been a missed edit from the resolution of issue 1113.)
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2014-03-03 00:00:00 | admin | set | status: drwp -> cd3 |
| 2013-10-14 00:00:00 | admin | set | status: dr -> drwp |
| 2013-05-03 00:00:00 | admin | set | messages: + msg4398 |
| 2013-05-03 00:00:00 | admin | set | status: ready -> dr |
| 2012-11-03 00:00:00 | admin | set | messages: + msg4059 |
| 2012-11-03 00:00:00 | admin | set | status: open -> ready |
| 2012-08-24 00:00:00 | admin | create | |