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

Dave Goodell goodell at mcs.anl.gov
Sat Mar 2 11:09:26 CST 2013


On Mar 2, 2013, at 8:28 AM CST, Jeff Hammond wrote:

> Is there a configure option that will cause MPICH to "typedef long
> MPI_Count" instead?


No, not without someone writing some new configure logic.  The ROMIO code that picks this value starts searching at the largest integer type it expects it might find ("long long") and goes down the list of types in decreasing integer rank until it finds one that works.  It doesn't look for the type with the smallest integer rank which still yields 8 bytes or anything like that, which is sort of what you are implying would be preferable behavior.

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.

-Dave




More information about the discuss mailing list