Fix macro usage error found by Martin von Loewis's checking patch.
authorJim Wilson <wilson@cygnus.com>
Thu, 23 Apr 1998 19:52:46 +0000 (19:52 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Thu, 23 Apr 1998 19:52:46 +0000 (12:52 -0700)
* c-aux-info.c (gen_type): Use DECL_NAME only for TYPE_DECL.

From-SVN: r19389

gcc/ChangeLog
gcc/c-aux-info.c

index 24a5a0836c7028ba4cdf8caade6d56e93dfa35d0..d94a40f13caf171ee150d59fa47248d830bbe828 100644 (file)
@@ -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.
index 2f2f8c213ba54d74333d65aad917d5063d6e5fb1..84ab0e90e38ae1a38ea376d5414a6fab62a46234 100644 (file)
@@ -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
     {