At 06:22 AM 11/15/2004, Ryuta Suzuki wrote:
>I got the LAM/MPI subversion to compile by GCC 3.4.3 and got the following
>error:
>
>.... ...
>
>getbuf.c:57: error: conflicting types for 'malloc'
>getbuf.c:57: error: conflicting types for 'malloc'
>make[2]: *** [getbuf.lo] Error 1
>
>Has anybody got the same problem? It seems like gcc got confused with
>"extern char *malloc" but my guess is that this problem is peculiar to new
>GCC since I didn't have any such trouble with Intel compilers.
Has a header inclusion been omitted?
#include <stdlib.h>
According to certain textbooks based on C89, extern char *malloc() is
correct, in spite of the requirement for the header.
Tim Prince
|