This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 120b. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2026-08-09
(From #9241.)
Consider:
struct T; typedef struct T T;
According to 6.7 [basic.link] paragraph 8, these two declarations declare the same entity. However, type aliases are separate entities nowadays.
Possible resolution:
Add bullets and change in 6.7 [basic.link] paragraph 8 as follows:
Two declarations of entities declare the same entity if, considering declarations of unnamed types to introduce their names for linkage purposes, if any (9.2.4 [dcl.typedef], 9.8.1 [dcl.enum]),[Note 3: There are other circumstances in which declarations declare the same entity (9.12 [dcl.link], 13.6 [temp.type], 13.7.6 [temp.spec.partial]). —end note]
- they correspond (6.4.1 [basic.scope.scope]),
- both have the same target scope that is not a function or template parameter scope,
- neither is a name-independent declaration,
and- if either declares a type alias, both do,
- if either declares a namespace alias, both do, and
eitherone of the following holds:
- they appear in the same translation unit, or
- they both declare type aliases or namespace aliases that have the same underlying entity, or
- they both declare names with module or external linkage and are attached to the same module.