Hello, with gcc moving to C++, a few things need adapting. In particular, when asking for the gmp memory functions, this: void (*gmp_free) (void *, size_t); mp_get_memory_functions (NULL, NULL, &gmp_free); becomes wrong. One should have somewhere (protected by tests on __cplusplus since we are still building with C compilers): extern "C" { typedef void (*mytype) (void *, size_t); } And then: mytype gmp_free; mp_get_memory_functions (NULL, NULL, &gmp_free); g++ can't see the difference (yet? see Bug 2316), but some other compilers can (sunpro), and we want other C++ compilers to be usable for stage1. This code appears in 2 files: ./gcc/graphite-ppl.c ./gcc/graphite-interchange.c
Confirmed.
Note that this could also be solved by using gmp_fprintf. (Or by using mpz_class::get_str, since we seem to be moving to C++ anyway)
Author: glisse Date: Thu Jan 3 20:06:49 2013 New Revision: 194868 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194868 Log: 2013-01-03 Marc Glisse <marc.glisse@inria.fr> PR bootstrap/50167 gcc/ * graphite-interchange.c (pdr_stride_in_loop): Use gmp_fprintf. * graphite-poly.c (debug_gmp_value): Likewise. PR bootstrap/50177 libcpp/ * line-map.c (get_combined_adhoc_loc): Cast from extern "C" type. (new_linemap): Likewise. (linemap_enter_macro): Likewise. Modified: trunk/gcc/ChangeLog trunk/gcc/graphite-interchange.c trunk/gcc/graphite-poly.c trunk/libcpp/ChangeLog trunk/libcpp/line-map.c
.