N2912 Draft: Amendment Required in Section 6.7.2.3 (Tags)

16 views
Skip to first unread message

arnab chatterjee

unread,
Jul 23, 2022, 9:00:24 AMJul 23
to
In the latest C2x working draft <www.open-std.org/jtc1/sc22/wg14/www/docs/n2912.pdf>, footnote 145 in section 6.7.2.3 states: "If there is no identifier, the type can, within the translation unit, *only* be referred to by the declaration of which it is a part. Of course, when the declaration is of a typedef name, subsequent declarations can make use of that typedef name to declare objects having the specified structure, union, or enumerated type."

The word 'identifier' here refers to the optional struct/union/enum tag, such as "struct-or-union attribute-specifier-sequence_opt identifier_opt { member-declaration-list }". Introduction of 'typeof' brings a new approach; for example, we can write:
struct {int x, y;} p;
typeof (p) q;
typeof (q) r;

So the word *only* in quoted footnote seems no longer applicable.
Reply all
Reply to author
Forward
0 new messages