https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63819
Bug ID: 63819 Summary: [5 Regression]: Cannot build compiler with --enable-gather-detailed-mem-stats (error: default argument given for parameter 5 of ‘void* ggc_internal_cleared_alloc) Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: rguenth at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org ../configure --prefix=/home/marxin/Programming/bin/gcc2 --disable-multilib --enable-languages=c,c++ --enable-checking=release --disable-bootstrap --enable-gather-detailed-mem-stats Error: g++ -c -g -DIN_GCC -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 -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../../gcc -I../../gcc/build -I../../gcc/../include -I../../gcc/../libcpp/include \ -o build/genmatch.o ../../gcc/genmatch.c ../../gcc/genmatch.c: In function ‘void* ggc_internal_cleared_alloc(size_t, void (*)(void*), size_t, size_t, const char*, int, const char*)’: ../../gcc/genmatch.c:41:24: error: default argument given for parameter 5 of ‘void* ggc_internal_cleared_alloc(size_t, void (*)(void*), size_t, size_t, const char*, int, const char*)’ [-fpermissive] CXX_MEM_STAT_INFO) ^ In file included from ../../gcc/genmatch.c:28:0: ../../gcc/ggc.h:153:14: error: after previous specification in ‘void* ggc_internal_cleared_alloc(size_t, void (*)(void*), size_t, size_t, const char*, int, const char*)’ [-fpermissive] extern void *ggc_internal_cleared_alloc (size_t, void (*)(void *), ^ ../../gcc/genmatch.c:41:24: error: default argument given for parameter 6 of ‘void* ggc_internal_cleared_alloc(size_t, void (*)(void*), size_t, size_t, const char*, int, const char*)’ [-fpermissive] CXX_MEM_STAT_INFO) ^ In file included from ../../gcc/genmatch.c:28:0: ../../gcc/ggc.h:153:14: error: after previous specification in ‘void* ggc_internal_cleared_alloc(size_t, void (*)(void*), size_t, size_t, const char*, int, const char*)’ [-fpermissive] extern void *ggc_internal_cleared_alloc (size_t, void (*)(void *), ^ ../../gcc/genmatch.c:41:24: error: default argument given for parameter 7 of ‘void* ggc_internal_cleared_alloc(size_t, void (*)(void*), size_t, size_t, const char*, int, const char*)’ [-fpermissive] CXX_MEM_STAT_INFO) ^ In file included from ../../gcc/genmatch.c:28:0: ../../gcc/ggc.h:153:14: error: after previous specification in ‘void* ggc_internal_cleared_alloc(size_t, void (*)(void*), size_t, size_t, const char*, int, const char*)’ [-fpermissive] extern void *ggc_internal_cleared_alloc (size_t, void (*)(void *), ^ ../../gcc/genmatch.c: At global scope: ../../gcc/genmatch.c:39:7: warning: unused parameter ‘_loc_name’ [-Wunused-parameter] void *ggc_internal_cleared_alloc (size_t, void (*)(void *), ^ ../../gcc/genmatch.c:39:7: warning: unused parameter ‘_loc_line’ [-Wunused-parameter] ../../gcc/genmatch.c:39:7: warning: unused parameter ‘_loc_function’ [-Wunused-parameter] In file included from ../../gcc/genmatch.c:32:0: ../../gcc/hash-table.h: In instantiation of ‘hash_table<Descriptor, Allocator, true>::hash_table(size_t, bool) [with Descriptor = hash_map<const char*, unsigned int, capture_id_map_hasher>::hash_entry; Allocator = xcallocator; size_t = long unsigned int]’: ../../gcc/hash-map.h:190:72: required from ‘hash_map< <template-parameter-1-1>, <template-parameter-1-2>, <template-parameter-1-3> >::hash_map(size_t, bool) [with Key = const char*; Value = unsigned int; Traits = capture_id_map_hasher; size_t = long unsigned int]’ ../../gcc/genmatch.c:2843:21: required from here ../../gcc/hash-table.h:1234:56: error: call of overloaded ‘ggc_cleared_vec_alloc(size_t&)’ is ambiguous m_entries = ggc_cleared_vec_alloc<value_type> (size); ^ ../../gcc/hash-table.h:1234:56: note: candidates are: In file included from ../../gcc/genmatch.c:28:0: ../../gcc/ggc.h:233:1: note: T* ggc_cleared_vec_alloc(size_t, const char*, int, const char*) [with T = hash_map<const char*, unsigned int, capture_id_map_hasher>::hash_entry; size_t = long unsigned int] ggc_cleared_vec_alloc (size_t c CXX_MEM_STAT_INFO) ^ In file included from ../../gcc/genmatch.c:32:0: ../../gcc/hash-table.h:203:4: note: T* ggc_cleared_vec_alloc(size_t) [with T = hash_map<const char*, unsigned int, capture_id_map_hasher>::hash_entry; size_t = long unsigned int] T *ggc_cleared_vec_alloc (size_t); ^ ../../gcc/hash-table.h: In instantiation of ‘void hash_table<Descriptor, Allocator, true>::expand() [with Descriptor = hash_map<const char*, unsigned int, capture_id_map_hasher>::hash_entry; Allocator = xcallocator]’: ../../gcc/hash-table.h:1462:13: required from ‘hash_table<Descriptor, Allocator, true>::value_type* hash_table<Descriptor, Allocator, true>::find_slot_with_hash(const compare_type&, hashval_t, insert_option) [with Descriptor = hash_map<const char*, unsigned int, capture_id_map_hasher>::hash_entry; Allocator = xcallocator; hash_table<Descriptor, Allocator, true>::value_type = hash_map<const char*, unsigned int, capture_id_map_hasher>::hash_entry; hash_table<Descriptor, Allocator, true>::compare_type = const char*; hashval_t = unsigned int]’ ../../gcc/hash-map.h:231:16: required from ‘Value& hash_map< <template-parameter-1-1>, <template-parameter-1-2>, <template-parameter-1-3> >::get_or_insert(const Key&, bool*) [with Key = const char*; Value = unsigned int; Traits = capture_id_map_hasher]’ ../../gcc/genmatch.c:2659:59: required from here ../../gcc/hash-table.h:1327:56: error: call of overloaded ‘ggc_cleared_vec_alloc(size_t&)’ is ambiguous nentries = ggc_cleared_vec_alloc<value_type> (nsize); ^ ../../gcc/hash-table.h:1327:56: note: candidates are: In file included from ../../gcc/genmatch.c:28:0: ../../gcc/ggc.h:233:1: note: T* ggc_cleared_vec_alloc(size_t, const char*, int, const char*) [with T = hash_map<const char*, unsigned int, capture_id_map_hasher>::hash_entry; size_t = long unsigned int] ggc_cleared_vec_alloc (size_t c CXX_MEM_STAT_INFO) ^ In file included from ../../gcc/genmatch.c:32:0: ../../gcc/hash-table.h:203:4: note: T* ggc_cleared_vec_alloc(size_t) [with T = hash_map<const char*, unsigned int, capture_id_map_hasher>::hash_entry; size_t = long unsigned int] T *ggc_cleared_vec_alloc (size_t); ^ Makefile:2394: recipe for target 'build/genmatch.o' failed make: *** [build/genmatch.o] Error 1 Thanks, Martin