aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJim Wilson <wilson@cygnus.com>1998-04-23 19:52:46 +0000
committerJim Wilson <wilson@gcc.gnu.org>1998-04-23 12:52:46 -0700
commitf5880dbeb0ed65793b55c721924f5385ec61ded1 (patch)
tree7250ed5cdeb637c13c99c642a6b7dd93a0bde8a4 /gcc
parent8ade151969ca4ec801611c33f11606cafd2368e6 (diff)
downloadgcc-f5880dbeb0ed65793b55c721924f5385ec61ded1.zip
gcc-f5880dbeb0ed65793b55c721924f5385ec61ded1.tar.gz
gcc-f5880dbeb0ed65793b55c721924f5385ec61ded1.tar.bz2
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. From-SVN: r19389
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/c-aux-info.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 24a5a08..d94a40f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+1998-04-23 Jim Wilson <wilson@cygnus.com>
+
+ * c-aux-info.c (gen_type): Use DECL_NAME only for TYPE_DECL.
+
Thu Apr 23 19:09:33 1998 Jim Wilson <wilson@cygnus.com>
* profile.c (tablejump_entry_p): New function.
diff --git a/gcc/c-aux-info.c b/gcc/c-aux-info.c
index 2f2f8c2..84ab0e9 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
{