B
Brian Salter-Duke
I am trying to compile a large piece of Fortran code that interfaces in
a small piece of C code. For the C code compile:-
Compiling with the intel icc C compiler gives this warning:-
warning #159: declaration is incompatible with previous "shmat"
(declared at line 57 of "/usr/include/sys/shm.h")
char *shmat();
^
Compiling with gcc4 gives this error:-
error: conflicting types for 'shmat'
/usr/include/sys/shm.h:58: error: previous declaration of 'shmat'
was here
Now clearly this is a problem. shmat is declared void in shm.f. However
the icc compile actually works. I have good reasons why I do not want to
try to fix this. I would like to use gcc4 to reproduce the icc
behaviour. Is there a compiler argument that changes this problem from
an error to a warning with gcc4? I have looked long and hard, but my
lack of experience with C is telling. I came up with nothing, so I
thought I would ask those who really know C.
Brian.
a small piece of C code. For the C code compile:-
Compiling with the intel icc C compiler gives this warning:-
warning #159: declaration is incompatible with previous "shmat"
(declared at line 57 of "/usr/include/sys/shm.h")
char *shmat();
^
Compiling with gcc4 gives this error:-
error: conflicting types for 'shmat'
/usr/include/sys/shm.h:58: error: previous declaration of 'shmat'
was here
Now clearly this is a problem. shmat is declared void in shm.f. However
the icc compile actually works. I have good reasons why I do not want to
try to fix this. I would like to use gcc4 to reproduce the icc
behaviour. Is there a compiler argument that changes this problem from
an error to a warning with gcc4? I have looked long and hard, but my
lack of experience with C is telling. I came up with nothing, so I
thought I would ask those who really know C.
Brian.