diff options
author | wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-04-23 19:52:46 +0000 |
---|---|---|
committer | wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-04-23 19:52:46 +0000 |
commit | 3ef373de7e267d97455cd05987adf742f0e3bf77 (patch) | |
tree | 7250ed5cdeb637c13c99c642a6b7dd93a0bde8a4 /gcc/c-aux-info.c | |
parent | c3b641a26b32ca0831b6c55ae4954fcaa2e29265 (diff) | |
download | gcc-3ef373de7e267d97455cd05987adf742f0e3bf77.tar.gz |
Fix macro usage error found by Martin von Loewis's checking patch.
* c-aux-info.c (gen_type): Use DECL_NAME only for TYPE_DECL.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@19389 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-aux-info.c')
-rw-r--r-- | gcc/c-aux-info.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/c-aux-info.c b/gcc/c-aux-info.c index 2f2f8c213ba..84ab0e90e38 100644 --- a/gcc/c-aux-info.c +++ b/gcc/c-aux-info.c @@ -361,7 +361,8 @@ gen_type (ret_val, t, style) { tree chain_p; - if (TYPE_NAME (t) && DECL_NAME (TYPE_NAME (t))) + /* If there is a typedef name for this type, use it. */ + if (TYPE_NAME (t) && TREE_CODE (TYPE_NAME (t)) == TYPE_DECL) data_type = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (t))); else { |