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


3214. Redeclaration of types and namespaces and their aliases

Section: 6.7  [basic.link]     Status: open     Submitter: Yehuda Bernáth     Date: 2026-08-02

(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]