This rule as-is describes (more or less) the type-specifier rule in the C11 standard:
type-specifier:
void
char
short
int
long
float
double
signed
unsigned
_Bool
_Complex
atomic-type-specifier
struct-or-union-specifier
enum-specifier
typedef-name
However, since the typespec function of chibicc also parses storage classes, alignments, etc, I think the comment should mention this. Parsing storage classes, alignments, and the link also makes the "typespec" function more like the declaration_specifiers rule in the C standard:
Consider the following comment:
This rule as-is describes (more or less) the
type-specifier
rule in the C11 standard:However, since the
typespec
function ofchibicc
also parses storage classes, alignments, etc, I think the comment should mention this. Parsing storage classes, alignments, and the link also makes the "typespec" function more like thedeclaration_specifiers
rule in the C standard:So maybe "declspec" might be a better name? I'm not sure.