#include "parse.h"
#include "scan.h"
-static int verify_specs(struct cdecl_declspec *s)
+static int verify_declspecs(struct cdecl_declspec *s)
{
unsigned num_storage = 0;
unsigned long typemap;
break;
case CDECL_SPEC_QUAL:
/*
- * Since we don't support pointer types yet, all
- * restrict qualifiers are invalid. Other qualifiers
- * are always valid.
+ * Restrict qualifiers are only valid in the
+ * pointer qualifier list, which isn't checked here.
*/
if (c->type == CDECL_QUAL_RESTRICT) {
fprintf(stderr, "only pointer types can be restrict-qualified.\n");
break;
case CDECL_SPEC_FUNC:
/*
- * Likewise for function specifiers.
+ * We don't support functions yet.
*/
fprintf(stderr, "only function declarations may have function specifiers.\n");
return -1;
static int verify_decl(struct cdecl *decl)
{
- return verify_specs(decl->specifiers);
+ return verify_declspecs(decl->specifiers);
}
struct cdecl *cdecl_parse_decl(const char *declstr)