- case ARRAY_TYPE:
- ret_val = gen_type (concat (ret_val, "[]"), TREE_TYPE (t), style);
- break;
+ case ARRAY_TYPE:
+ if (!COMPLETE_TYPE_P (t) || TREE_CODE (TYPE_SIZE (t)) != INTEGER_CST)
+ ret_val = gen_type (concat (ret_val, "[]", NULL),
+ TREE_TYPE (t), style);
+ else if (int_size_in_bytes (t) == 0)
+ ret_val = gen_type (concat (ret_val, "[0]", NULL),
+ TREE_TYPE (t), style);
+ else
+ {
+ int size = (int_size_in_bytes (t) / int_size_in_bytes (TREE_TYPE (t)));
+ char buff[10];
+ sprintf (buff, "[%d]", size);
+ ret_val = gen_type (concat (ret_val, buff, NULL),
+ TREE_TYPE (t), style);
+ }
+ break;