Type-spec
Fixtype of type specifiers [C:6.7.3] [C:A.2.2].
This is a tagged union type, introduced by fty::deftagsum.
Member Tags → Types
- :void → type-spec-void
- :char → type-spec-char
- :short → type-spec-short
- :int → type-spec-int
- :long → type-spec-long
- :float → type-spec-float
- :double → type-spec-double
- :signed → type-spec-signed
- :unsigned → type-spec-unsigned
- :bool → type-spec-bool
- :complex → type-spec-complex
- :atomic → type-spec-atomic
- :struct → type-spec-struct
- :union → type-spec-union
- :enum → type-spec-enum
- :typedef → type-spec-typedef
- :int128 → type-spec-int128
- :float128 → type-spec-float128
- :builtin-va-list → type-spec-builtin-va-list
- :typeof-expr → type-spec-typeof-expr
- :typeof-type → type-spec-typeof-type
- :typeof-ambig → type-spec-typeof-ambig
This captures type-specifier in the grammar in [C].
We model atomic-type-specifier
by inlining the type name into the :atomic case of this fixtype.
We make two separate cases for structures and unions,
avoiding explicit modeling of the struct-or-union nonterminal.
We model typedef-name
by inlining the type name into the :typedef case of this fixtype.
We include the GCC extension variant keywords
__signed and __signed__ of signed.
An indicator of which variant is included
in the :signed case of this fixtype.
We also include the GCC extension __int128,
which is a (non-standard) integer type: see https://gcc.gnu.org/onlinedocs/gcc/_005f_005fint128.html.
We also include the GCC extension _Float128,
which is a floating type: see https://gcc.gnu.org/onlinedocs/gcc/Floating-Types.html.
We also include the GCC extension __builtin_va_list,
whch is a type.
Although we did not see it in the GCC documentation,
we encountered it in practical code,
and we indeed verified that it is accepted as a type
in at least an implementation of GCC in macOS.
As a GCC extension, we include typeof,
along with its variants __typeof and __typeof__.
The argument may be an expression or a type name,
and therefore we also need to include the ambiguous possibility.
Subtopics
- Type-spec-case
- Case macro for the different kinds of type-spec structures.
- Type-specp
- Recognizer for type-spec structures.
- Type-spec-equiv
- Basic equivalence relation for type-spec structures.
- Type-spec-kind
- Get the kind (tag) of a type-spec structure.
- Type-spec-typeof-ambig
- Type-spec-typeof-type
- Type-spec-typeof-expr
- Type-spec-union
- Type-spec-typedef
- Type-spec-struct
- Type-spec-signed
- Type-spec-enum
- Type-spec-atomic
- Type-spec-void
- Type-spec-unsigned
- Type-spec-short
- Type-spec-long
- Type-spec-int128
- Type-spec-int
- Type-spec-float128
- Type-spec-float
- Type-spec-double
- Type-spec-complex
- Type-spec-char
- Type-spec-builtin-va-list
- Type-spec-bool
- Type-spec-fix
- Fixing function for type-spec structures.
- Type-spec-count
- Measure for recurring over type-spec structures.