This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 118c. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-10-11
[Voted into WP at March 2004 meeting.]
I wonder if perhaps the core issue 56 change in 9.2.4 [dcl.typedef] paragraph 2 wasn't quite careful enough. The intent was to remove the allowance for:
struct S {
typedef int I;
typedef int I;
};
but I think it also disallows the following:
class B {
typedef struct A {} A;
void f(struct B::A*p);
};
See also issue 407.
Proposed resolution (October 2003):
At the end of 9.2.4 [dcl.typedef] paragraph 2, add the following:
In a given class scope, a typedef specifier can be used to redefine
any class-name declared in that scope that is not
also a typedef-name
to refer to the type to which it already refers. [Example:
struct S {
typedef struct A {} A; // OK
typedef struct B B; // OK
typedef A A; // error
};
]