X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/33231edf2cf2a3615965d676f3d5c7f37a951569..2bcb5dd3317c733c31c288ae79e72fb28863d936:/src/smpi/smpi_mpi_dt.cpp diff --git a/src/smpi/smpi_mpi_dt.cpp b/src/smpi/smpi_mpi_dt.cpp index 8c63b07790..630ca733df 100644 --- a/src/smpi/smpi_mpi_dt.cpp +++ b/src/smpi/smpi_mpi_dt.cpp @@ -1,6 +1,5 @@ /* smpi_mpi_dt.c -- MPI primitives to handle datatypes */ -/* Copyright (c) 2009-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2009-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -1403,8 +1402,9 @@ void smpi_op_apply(MPI_Op op, void *invec, void *inoutvec, int *len, MPI_Datatyp op->func(invec, inoutvec, len, datatype); else{ int tmp = smpi_type_c2f(*datatype); - void* tmpptr=static_cast(&tmp); - op->func(invec, inoutvec, len, static_cast(tmpptr) ); + /* Unfortunately, the C and Fortran version of the MPI standard do not agree on the type here, + thus the reinterpret_cast. */ + op->func(invec, inoutvec, len, reinterpret_cast(&tmp) ); } } }