cpphash.c (collect_params): Fix off-by-one error.
authorZack Weinberg <zack@wolery.cumb.org>
Tue, 2 May 2000 18:10:52 +0000 (18:10 +0000)
committerZack Weinberg <zack@gcc.gnu.org>
Tue, 2 May 2000 18:10:52 +0000 (18:10 +0000)
* cpphash.c (collect_params): Fix off-by-one error.
(dump_hash_helper): Dump all four macro nodetypes.

From-SVN: r33613

gcc/ChangeLog
gcc/cpphash.c

index c751b6fe49c3a6e66593eb5e3521b7678eeeb724..020031c07962964167e274973042087b7de7db9e 100644 (file)
@@ -1,3 +1,8 @@
+2000-05-02  Zack Weinberg  <zack@wolery.cumb.org>
+
+       * cpphash.c (collect_params): Fix off-by-one error.
+       (dump_hash_helper): Dump all four macro nodetypes.
+
 2000-05-02  Jakub Jelinek  <jakub@redhat.com>
 
        * cpphash.c (trad_stringify): Adjust p after stringification as
index 3fcd006962be34394d88b4da86b12c47a7bea84e..8684b65c6d528a2177e8f28815c3db7ba50fbc2f 100644 (file)
@@ -804,7 +804,7 @@ collect_params (pfile, list, arglist)
        argv[a].len = len;
        argv[a].name = p;
        argv[a].rest_arg = 0;
-       p += len;
+       p += len + 1;
        a++;
        break;
 
@@ -1934,7 +1934,8 @@ dump_hash_helper (h, p)
   HASHNODE *hp = (HASHNODE *)*h;
   cpp_reader *pfile = (cpp_reader *)p;
 
-  if (hp->type == T_MACRO)
+  if (hp->type == T_MACRO || hp->type == T_FMACRO
+      || hp->type == T_IDENTITY || hp->type == T_EMPTY)
     _cpp_dump_definition (pfile, hp);
   return 1;
 }