[mpich-discuss] using mpi.h with C++ and warnings that result (ultra-pedantic)

Jeff Hammond jhammond at alcf.anl.gov
Fri Mar 1 21:57:58 CST 2013


I apologize in advance for being ultra-pedantic.

I am using MPI in a purely C++ code.  Is there a way to make this
warning go away?  I know at least one MPICH developer who shares my
disdain for compiler warnings, so I hope this isn't too unreasonable.

Since I am using a C++ compiler, I can't exactly tell it to use C99 mode.

/Users/jhammond/eclipse/MPICH2/trunk/install-clang/include/mpi.h:526:9:
warning: 'long long' is an extension when C99 mode is not enabled
[-pedantic,-Wlong-long]
typedef long long MPI_Count;

It's not like I'm going to lose sleep over this, but I am curious if
this is an unavoidable consequence of using the MPI C bindings in C++.
 Or perhaps it's just because MPI implements MPI_Count using "long
long".

Thanks

Jeff

-- 
Jeff Hammond
Argonne Leadership Computing Facility
University of Chicago Computation Institute
jhammond at alcf.anl.gov / (630) 252-5381
http://www.linkedin.com/in/jeffhammond
https://wiki.alcf.anl.gov/parts/index.php/User:Jhammond



More information about the discuss mailing list