#include "i18n.h"
#include "normalize.h"
-/*
- * Determine if a declarator declares an identifier (other than a function
- * parameter).
- */
-static bool is_abstract(struct cdecl_declarator *d)
-{
- while (d->child)
- d = d->child;
-
- return d->type != CDECL_DECL_IDENT;
-}
-
/*
* Verify the declaration specifiers of a declaration. If top is true, treat
* this as a top-level declaration. Otherwise, treat this as a function
{
struct cdecl_declspec *specs = decl->specifiers;
struct cdecl_declarator *d = decl->declarators;
- bool abstract = is_abstract(d);
+ bool abstract = cdecl_is_abstract(d);
unsigned num_storage = 0;
unsigned long typemap;
if (!valid_declspecs(i, true))
goto err;
- if (is_abstract(i->declarators) && (i != decl || i->next)) {
+ if (cdecl_is_abstract(i->declarators)
+ && (i != decl || i->next)) {
fprintf(stderr, "mixing type names and declarations is not allowed\n");
goto err;
}