When you use -features=extensions, incomplete enum types are taken as forward declarations. For example, the following invalid code will compile when you use the -features=extensions option.
typedef enum E F; // invalid, E is incomplete |
As noted previously, you can always include the definition of an enum type before it is used.