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

Dave Goodell goodell at mcs.anl.gov
Fri Mar 1 22:51:24 CST 2013


On Mar 1, 2013, at 9:57 PM CST, Jeff Hammond wrote:

> 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;

Don't compile with -pedantic.  It's almost never a useful flag.  Alternatively, add "-Wno-long-long" if you need other windmills to tilt at.

-Dave




More information about the discuss mailing list