explain_prologue(char *buf, size_t n, struct cdecl_declarator *d)
{
while (d) {
- if (d->type == CDECL_DECL_IDENT)
+ if (d->type == CDECL_DECL_IDENT) {
+ if (!d->u.ident)
+ return snprintf(buf, n, "type");
return snprintf(buf, n, "declare %s as", d->u.ident);
+ }
d = next_declarator(d);
}
}