]> git.saurik.com Git - bison.git/blobdiff - src/symlist.c
* tests/cxx-type.at: Construct a tree, count the parents of shared
[bison.git] / src / symlist.c
index 3615626117d2d031c15d6aa507521144d1623b2f..7c3ebff6b637ae6ce2278bbdf7596b6e232e3a53 100644 (file)
@@ -19,6 +19,7 @@
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
    Boston, MA 02110-1301, USA.  */
 
+#include <config.h>
 #include "system.h"
 
 #include "complain.h"
@@ -49,10 +50,14 @@ symbol_list_new (symbol *sym, location loc)
 `------------------*/
 
 void
-symbol_list_print (FILE *f, symbol_list *l)
+symbol_list_print (symbol_list *l, FILE *f)
 {
-  for (/* Nothing. */; l; l = l->next)
-    symbol_print (f, l->sym);
+  for (/* Nothing. */; l && l->sym; l = l->next)
+    {
+      symbol_print (l->sym, f);
+      if (l && l->sym)
+       fputc (' ', f);
+    }
 }
 
 
@@ -118,7 +123,6 @@ symbol_list_n_type_name_get (symbol_list *rp, location loc, int n)
       if (rp == NULL || rp->sym == NULL)
        {
          complain_at (loc, _("invalid $ value: $%d"), n);
-         fprintf (stderr, "\n");
          return NULL;
        }
       ++i;