+ case NODE_ROOT:
+ break; /* OK */
+
+ case NODE_EVENT:
+ case NODE_STREAM:
+ case NODE_ENV:
+ case NODE_TRACE:
+ case NODE_CLOCK:
+ case NODE_UNARY_EXPRESSION:
+ case NODE_TYPEALIAS:
+ case NODE_TYPE_SPECIFIER:
+ case NODE_TYPE_SPECIFIER_LIST:
+ case NODE_POINTER:
+ case NODE_FLOATING_POINT:
+ case NODE_INTEGER:
+ case NODE_STRING:
+ case NODE_ENUMERATOR:
+ case NODE_VARIANT:
+ case NODE_STRUCT:
+ default:
+ goto errinval;
+ }
+ return 0;
+errinval:
+ fprintf(fd, "[error] %s: incoherent parent type %s for node type %s\n", __func__,
+ node_type(node->parent), node_type(node));
+ return -EINVAL; /* Incoherent structure */
+}
+
+static
+int ctf_visitor_type_specifier(FILE *fd, int depth, struct ctf_node *node)
+{
+ switch (node->parent->type) {
+ case NODE_TYPE_SPECIFIER_LIST: