On Tue, 2015-06-23 15:57:48 +0100, Richard Sandiford wrote: > At this point all hash_map traits know what kind of key they're > dealing with, so we can make that a traits typedef, like it is for > hash_table traits. Then, if we make the default hash traits for > T be T, we can use hash_table-style traits as the first template > parameter to hash_map, without the need for a third. That is, if > foo_hash hashes elements of type foo_type: > > typedef simple_hashmap_traits foo_traits; > hash_map x; > > becomes just: > > hash_map x; > > just like a hash_table of foo_types would be: > > hash_table y; > > This patch makes that simplification. One of the patches around yours, and I guess it's specifically this one, makes g++ (GCC) 4.7.2 20121109 (Red Hat 4.7.2-8) (on gcc110.fsffrance.org) unhappy: g++ -fno-PIE -c -DIN_GCC_FRONTEND -DIN_GCC_FRONTEND -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -I. -Ic-family -I/home/jbglaw/repos/gcc/gcc -I/home/jbglaw/repos/gcc/gcc/c-family -I/home/jbglaw/repos/gcc/gcc/../include -I/home/jbglaw/repos/gcc/gcc/../libcpp/include -I/home/jbglaw/repos/gcc/gcc/../libdecnumber -I/home/jbglaw/repos/gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I/home/jbglaw/repos/gcc/gcc/../libbacktrace -o c-family/cilk.o -MT c-family/cilk.o -MMD -MP -MF c-family/.deps/cilk.TPo /home/jbglaw/repos/gcc/gcc/c-family/cilk.c In file included from /home/jbglaw/repos/gcc/gcc/coretypes.h:319:0, from /home/jbglaw/repos/gcc/gcc/c-family/cilk.c:25: /home/jbglaw/repos/gcc/gcc/input.h:37:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] /home/jbglaw/repos/gcc/gcc/c-family/cilk.c: In function ‘void build_wrapper_type(wrapper_data*)’: /home/jbglaw/repos/gcc/gcc/c-family/cilk.c:438:77: error: no matching function for call to ‘hash_map::traverse(auto_vec*)’ /home/jbglaw/repos/gcc/gcc/c-family/cilk.c:438:77: note: candidates are: In file included from /home/jbglaw/repos/gcc/gcc/hash-table.h:553:0, from /home/jbglaw/repos/gcc/gcc/coretypes.h:317, from /home/jbglaw/repos/gcc/gcc/c-family/cilk.c:25: /home/jbglaw/repos/gcc/gcc/hash-map.h:173:8: note: template void hash_map::traverse(Arg) const [with Arg = Arg; bool (* f)(typename Traits::key_type&, const Value&, Arg) = f; KeyId = tree_node*; Value = tree_node*; Traits = simple_hashmap_traits >] /home/jbglaw/repos/gcc/gcc/hash-map.h:173:8: note: template argument deduction/substitution failed: /home/jbglaw/repos/gcc/gcc/c-family/cilk.c:438:77: error: could not convert template argument ‘fill_decls_vec’ to ‘bool (*)(tree_node*&, tree_node* const&, auto_vec*)’ In file included from /home/jbglaw/repos/gcc/gcc/hash-table.h:553:0, from /home/jbglaw/repos/gcc/gcc/coretypes.h:317, from /home/jbglaw/repos/gcc/gcc/c-family/cilk.c:25: /home/jbglaw/repos/gcc/gcc/hash-map.h:181:8: note: template void hash_map::traverse(Arg) const [with Arg = Arg; bool (* f)(typename Traits::key_type&, Value*, Arg) = f; KeyId = tree_node*; Value = tree_node*; Traits = simple_hashmap_traits >] /home/jbglaw/repos/gcc/gcc/hash-map.h:181:8: note: template argument deduction/substitution failed: /home/jbglaw/repos/gcc/gcc/c-family/cilk.c:438:77: error: could not convert template argument ‘fill_decls_vec’ to ‘bool (*)(tree_node*&, tree_node**, auto_vec*)’ /home/jbglaw/repos/gcc/gcc/c-family/cilk.c: In function ‘void cilk_outline(tree, tree_node**, void*)’: /home/jbglaw/repos/gcc/gcc/c-family/cilk.c:542:77: error: no matching function for call to ‘hash_map::traverse(auto_vec*)’ /home/jbglaw/repos/gcc/gcc/c-family/cilk.c:542:77: note: candidates are: In file included from /home/jbglaw/repos/gcc/gcc/hash-table.h:553:0, from /home/jbglaw/repos/gcc/gcc/coretypes.h:317, from /home/jbglaw/repos/gcc/gcc/c-family/cilk.c:25: /home/jbglaw/repos/gcc/gcc/hash-map.h:173:8: note: template void hash_map::traverse(Arg) const [with Arg = Arg; bool (* f)(typename Traits::key_type&, const Value&, Arg) = f; KeyId = tree_node*; Value = tree_node*; Traits = simple_hashmap_traits >] /home/jbglaw/repos/gcc/gcc/hash-map.h:173:8: note: template argument deduction/substitution failed: /home/jbglaw/repos/gcc/gcc/c-family/cilk.c:542:77: error: could not convert template argument ‘fill_decls_vec’ to ‘bool (*)(tree_node*&, tree_node* const&, auto_vec*)’ In file included from /home/jbglaw/repos/gcc/gcc/hash-table.h:553:0, from /home/jbglaw/repos/gcc/gcc/coretypes.h:317, from /home/jbglaw/repos/gcc/gcc/c-family/cilk.c:25: /home/jbglaw/repos/gcc/gcc/hash-map.h:181:8: note: template void hash_map::traverse(Arg) const [with Arg = Arg; bool (* f)(typename Traits::key_type&, Value*, Arg) = f; KeyId = tree_node*; Value = tree_node*; Traits = simple_hashmap_traits >] /home/jbglaw/repos/gcc/gcc/hash-map.h:181:8: note: template argument deduction/substitution failed: /home/jbglaw/repos/gcc/gcc/c-family/cilk.c:542:77: error: could not convert template argument ‘fill_decls_vec’ to ‘bool (*)(tree_node*&, tree_node**, auto_vec*)’ /home/jbglaw/repos/gcc/gcc/c-family/cilk.c: In function ‘tree_node* create_cilk_wrapper(tree, tree_node**)’: /home/jbglaw/repos/gcc/gcc/c-family/cilk.c:749:76: error: no matching function for call to ‘hash_map::traverse(auto_vec*)’ /home/jbglaw/repos/gcc/gcc/c-family/cilk.c:749:76: note: candidates are: In file included from /home/jbglaw/repos/gcc/gcc/hash-table.h:553:0, from /home/jbglaw/repos/gcc/gcc/coretypes.h:317, from /home/jbglaw/repos/gcc/gcc/c-family/cilk.c:25: /home/jbglaw/repos/gcc/gcc/hash-map.h:173:8: note: template void hash_map::traverse(Arg) const [with Arg = Arg; bool (* f)(typename Traits::key_type&, const Value&, Arg) = f; KeyId = tree_node*; Value = tree_node*; Traits = simple_hashmap_traits >] /home/jbglaw/repos/gcc/gcc/hash-map.h:173:8: note: template argument deduction/substitution failed: /home/jbglaw/repos/gcc/gcc/c-family/cilk.c:749:76: error: could not convert template argument ‘fill_decls_vec’ to ‘bool (*)(tree_node*&, tree_node* const&, auto_vec*)’ In file included from /home/jbglaw/repos/gcc/gcc/hash-table.h:553:0, from /home/jbglaw/repos/gcc/gcc/coretypes.h:317, from /home/jbglaw/repos/gcc/gcc/c-family/cilk.c:25: /home/jbglaw/repos/gcc/gcc/hash-map.h:181:8: note: template void hash_map::traverse(Arg) const [with Arg = Arg; bool (* f)(typename Traits::key_type&, Value*, Arg) = f; KeyId = tree_node*; Value = tree_node*; Traits = simple_hashmap_traits >] /home/jbglaw/repos/gcc/gcc/hash-map.h:181:8: note: template argument deduction/substitution failed: /home/jbglaw/repos/gcc/gcc/c-family/cilk.c:749:76: error: could not convert template argument ‘fill_decls_vec’ to ‘bool (*)(tree_node*&, tree_node**, auto_vec*)’ make[1]: *** [c-family/cilk.o] Error 1 make[1]: Leaving directory `/home/jbglaw/build/cris/build-gcc/gcc' make: *** [all-gcc] Error 2 See eg. http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=448826 MfG, JBG -- Jan-Benedict Glaw jbglaw@lug-owl.de +49-172-7608481 Signature of: If it doesn't work, force it. the second : If it breaks, it needed replacing anyway.