#include "adt/error.h"
static struct obstack _type_obst;
-struct obstack *type_obst = &_type_obst;
static FILE *out;
-static int type_visited = 0;
+struct obstack *type_obst = &_type_obst;
+static int type_visited = 0;
+static bool print_implicit_array_size = true;
static void intern_print_type_pre(const type_t *type, bool top);
static void intern_print_type_post(const type_t *type, bool top);
fputs("static ", out);
}
print_type_qualifiers(type->type.qualifiers);
- if(type->size != NULL) {
+ if(type->size != NULL
+ && (print_implicit_array_size || !type->has_implicit_size)) {
print_expression(type->size);
}
fputc(']', out);
if(typeof_type->typeof_type != NULL) {
type = typeof_type->typeof_type;
} else {
- type = typeof_type->expression->base.datatype;
+ type = typeof_type->expression->base.type;
}
continue;
}