diff options
author | rms <rms@138bc75d-0d04-0410-961f-82ee72b054a4> | 1992-07-20 01:53:57 +0000 |
---|---|---|
committer | rms <rms@138bc75d-0d04-0410-961f-82ee72b054a4> | 1992-07-20 01:53:57 +0000 |
commit | 77cc810bf51aec50101bcc6b6882bd7dfbff275e (patch) | |
tree | e98a595fb40eba69f940759d112cf608eae9b007 /gcc/c-aux-info.c | |
parent | 228d5e678b488e6cac4acddcdb5c2aaa55edf4c1 (diff) | |
download | gcc-77cc810bf51aec50101bcc6b6882bd7dfbff275e.tar.gz |
(gen_type): For array type, state the size.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@1634 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-aux-info.c')
-rw-r--r-- | gcc/c-aux-info.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/c-aux-info.c b/gcc/c-aux-info.c index 27dad2aba84..2e1506447e3 100644 --- a/gcc/c-aux-info.c +++ b/gcc/c-aux-info.c @@ -384,7 +384,18 @@ gen_type (ret_val, t, style) return ret_val; case ARRAY_TYPE: - ret_val = gen_type (concat (ret_val, "[]"), TREE_TYPE (t), style); + if (TYPE_SIZE (t) == 0 || TREE_CODE (TYPE_SIZE (t)) != INTEGER_CST) + ret_val = gen_type (concat (ret_val, "[]"), TREE_TYPE (t), style); + else if (int_size_in_bytes (t) == 0) + ret_val = gen_type (concat (ret_val, "[0]"), 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), + TREE_TYPE (t), style); + } break; case FUNCTION_TYPE: |