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

Jeff Hammond jhammond at alcf.anl.gov
Sat Mar 2 12:05:58 CST 2013


>>> 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".

Thanks for the clarification.  Makes sense to me.

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