This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug bootstrap/50167] New: gmp memory functions are extern "C" (graphite)
- From: "marc.glisse at normalesup dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 23 Aug 2011 15:51:21 +0000
- Subject: [Bug bootstrap/50167] New: gmp memory functions are extern "C" (graphite)
- Auto-submitted: auto-generated
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: unassigned@gcc.gnu.org
ReportedBy: marc.glisse@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