Re: [Mpi-forum] Compile problems with examples in MPI Standard
24 Jul
2012
24 Jul
'12
10:39 a.m.
* William Gropp <[email protected]> [2012-07-24 10:27:43]:
Here's the test case for everyone. No const.
int MPI_Init( int *argc_p, char *((*argv_p)[]) ); int main( int argc, char *argv[] ) { MPI_Init( &argc, &argv ); return 0; }
This gives a warning with my gcc:
GroppsMac3:MPI-3.0 gropp$ gcc -c f1.c f1.c: In function ‘main’: f1.c:4: warning: passing argument 2 of ‘MPI_Init’ from incompatible pointer type
gcc 4.5.3 gives the reason for the warning in more detail: t.c: In function ‘main’: t.c:5:6: warning: passing argument 2 of ‘MPI_Init’ from incompatible pointer type t.c:2:5: note: expected ‘char * (*)[]’ but argument is of type ‘char ***’ Dries
5113
Age (days ago)
5113
Last active (days ago)
0 comments
1 participants
participants (1)
-
Dries Kimpe