http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50167
Bug #: 50167 Summary: gmp memory functions are extern "C" (graphite) Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: bootstrap AssignedTo: unassig...@gcc.gnu.org ReportedBy: marc.gli...@normalesup.org 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