+2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
+
2018-05-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/85933
+2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
+ splay_tree_delete_pointers.
+
2018-05-26 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/85921
struct c_fileinfo *fi;
if (!file_info_tree)
- file_info_tree = splay_tree_new ((splay_tree_compare_fn)
- (void (*) (void)) strcmp,
+ file_info_tree = splay_tree_new (splay_tree_compare_strings,
0,
- (splay_tree_delete_value_fn)
- (void (*) (void)) free);
+ splay_tree_delete_pointers);
n = splay_tree_lookup (file_info_tree, (splay_tree_key) name);
if (n)
+2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ * decl2.c (start_static_storage_duration_function): Use
+ splay_tree_delete_pointers.
+
2018-05-25 Jason Merrill <jason@redhat.com>
PR c++/85815 - reference to member of enclosing template.
priority_info_map = splay_tree_new (splay_tree_compare_ints,
/*delete_key_fn=*/0,
/*delete_value_fn=*/
- (splay_tree_delete_value_fn)
- (void (*) (void)) free);
+ splay_tree_delete_pointers);
/* We always need to generate functions for the
DEFAULT_INIT_PRIORITY so enter it now. That way when we walk
di.flags = flags;
di.node = t;
di.nodes = splay_tree_new (splay_tree_compare_pointers, 0,
- (splay_tree_delete_value_fn)
- (void (*) (void)) free);
+ splay_tree_delete_pointers);
/* Queue up the first node. */
queue (&di, t, DUMP_NONE);
+2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ * splay-tree.h (splay_tree_compare_strings,
+ splay_tree_delete_pointers): Declare new utility functions.
+
2018-05-24 Tom Rix <trix@juniper.net>
* dwarf2.def (DW_FORM_strx*, DW_FORM_addrx*): New.
extern splay_tree_node splay_tree_min (splay_tree);
extern int splay_tree_foreach (splay_tree, splay_tree_foreach_fn, void*);
extern int splay_tree_compare_ints (splay_tree_key, splay_tree_key);
-extern int splay_tree_compare_pointers (splay_tree_key, splay_tree_key);
+extern int splay_tree_compare_pointers (splay_tree_key, splay_tree_key);
+extern int splay_tree_compare_strings (splay_tree_key, splay_tree_key);
+extern void splay_tree_delete_pointers (splay_tree_value);
#ifdef __cplusplus
}
+2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ * splay-tree.c (splay_tree_compare_strings,
+ splay_tree_delete_pointers): New utility functions.
+
2018-05-10 Martin Liska <mliska@suse.cz>
PR bootstrap/64914
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
#include <stdio.h>
else
return 0;
}
+
+/* Splay-tree comparison function, treating the keys as strings. */
+
+int
+splay_tree_compare_strings (splay_tree_key k1, splay_tree_key k2)
+{
+ return strcmp ((char *) k1, (char *) k2);
+}
+
+/* Splay-tree delete function, simply using free. */
+
+void
+splay_tree_delete_pointers (splay_tree_value value)
+{
+ free ((void *) value);
+}