- declaration = ctf_type_declarator_visit(fd, depth,
- length,
- &dummy_id, NULL,
- declaration_scope,
- NULL, trace);
- assert(declaration->id == CTF_TYPE_INTEGER);
+ declaration = ctf_type_specifier_list_visit(fd, depth,
+ length, declaration_scope, trace);
+ if (!declaration) {
+ fprintf(fd, "[error] %s: unable to find declaration type for sequence length\n", __func__);
+ return NULL;
+ }
+ if (declaration->id != CTF_TYPE_INTEGER) {
+ fprintf(fd, "[error] %s: length type for sequence is expected to be an integer (unsigned).\n", __func__);
+ declaration_unref(declaration);
+ return NULL;
+ }