* tree.c (build_function_type_list): Work correctly if there are
no arguments.
From-SVN: r94878
+2005-02-11 Ian Lance Taylor <ian@airs.com>
+
+ * tree.c (build_function_type_list): Work correctly if there are
+ no arguments.
+
2005-02-11 Ulrich Weigand <uweigand@de.ibm.com>
* config/s390/s390.md ("*cmpdi_cct", "*cmpsi_cct", "*cmpdi_ccs",
for (args = NULL_TREE; t != NULL_TREE; t = va_arg (p, tree))
args = tree_cons (NULL_TREE, t, args);
- last = args;
- args = nreverse (args);
- TREE_CHAIN (last) = void_list_node;
+ if (args == NULL_TREE)
+ args = void_list_node;
+ else
+ {
+ last = args;
+ args = nreverse (args);
+ TREE_CHAIN (last) = void_list_node;
+ }
args = build_function_type (return_type, args);
va_end (p);