Issue 1055: Incomplete enumerated types in the standard library

Authors: Jay Ghiron
Date: 2026-05-07
Submitted against: C23
Status: Open
Cross-references: 1035, 1043

There is currently an idea of an incomplete enumerated type, though such types can never actually be named:

A type specifier of the form

enum identifier

without an enumerator list shall only appear after the type it specifies is complete.

(C23 6.7.3.4 "Tags" paragraph 2.)

Some existing implementations do actually allow naming these types though, for example GCC. And it seems like these incomplete enumerated types really are integer types and scalar types, since "basic type" is defined specifically for the purpose of excluding enumerated types when defining basic types as complete object types rather than all arithmetic types. Some types in the standard library seem to even be allowed to use such definitions:

enum _FILE;//GCC extension
typedef enum _FILE FILE;

Though this does not seem to cause any problems. A case which would be more problematic is:

enum _Incomplete;//GCC extension
typedef enum _Incomplete time_t;

That is surely not intended to be valid. The following suggested correction assumes that issue 1043 is resolved to not allow the types described there to be enumerated types.

Suggested correction

Modify C23 7.17.1 paragraph 5:

The types include

memory_order

which is an complete enumerated type whose enumerators identify memory ordering constraints;

Note: N3366 stdc_mcerr should also be modified in the same way.

Modify C23 7.29.1 paragraph 4:

The types declared are size_t (described in 7.21);

clock_t

and

time_t

which are complete real types capable of representing times;

Modify C23 7.32.1 paragraph 2:

The types declared are wint_t described in 7.31.1;

wctrans_t

which is a complete scalar type that can hold values which represent locale-specific character mappings; and

wctype_t

which is a complete scalar type that can hold values which represent locale-specific character classifications.

Note: This interacts with the same wording as issue 1035.