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

Dave Goodell goodell at mcs.anl.gov
Sat Mar 2 12:03:42 CST 2013


On Mar 2, 2013, at 11:57 AM CST, Jeff Hammond wrote:

>> If you actually had a compiler that would give an _error_ when "long long" was used in C++, then we could skip checking "long long" in that case.  So maybe "-Werror=long-long"?
>> 
>> This really is a waste of everyone's time.  Just add "-Wno-long-long" and move on to a real problem.
> 
> Sure, but it still surprises me that MPI_Count requires a C99 type
> when at least one member of the MPICH team is quite strict about the
> need for MPICH to use only C89 features in order to work with the
> Microsoft C compiler.

MPI_Count does not require C99 types in all cases.  It just uses them when the *C* compiler used to build MPICH supports "long long" and the device does not set MPID_NO_LONG_LONG=yes in its "_PREREQ_" m4 macros in subconfigure.m4.  The issue is that none of the code is testing whether the C++ compiler supports "long long".  It's just not worth actually doing it, since they all support it unless you go out of your way to disable that support with "-Werror=long-long".

-Dave




More information about the discuss mailing list