<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Plain Text Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.PlainTextChar
{mso-style-name:"Plain Text Char";
mso-style-priority:99;
mso-style-link:"Plain Text";
font-family:"Calibri",sans-serif;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang="DE" link="#0563C1" vlink="#954F72"><div class="WordSection1"><p class="MsoPlainText"><span lang="EN-US">Dear MPICH Discuss,<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoPlainText"><span lang="EN-US">When compiling a program that includes the header mpi.h with the GCC Compiler option –Wcast-qual several compiler warnings occur in mpicxx.h:<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoPlainText"><span lang="EN-US">In file included from /usr/include/mpich/mpi.h:2231:0,<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US"> /usr/include/mpich/mpicxx.h: In member function ‘virtual void MPI::Datatype::Set_attr(int, const void*)’:<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US"> /usr/include/mpich/mpicxx.h:335:90: warning: cast from type ‘const void*’ to type ‘void*’ casts away qualifiers [-Wcast-qual]<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US"> MPIX_CALLWORLD( MPI_Type_set_attr( (MPI_Datatype) the_real_datatype, v2, (void *)v3 ));<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US"> ^<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US"> /usr/include/mpich/mpicxx.h:87:17: note: in definition of macro ‘MPIX_CALLWORLD’<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US"> { int err = fnc ; if (err) MPIR_Call_world_errhand( err ); }<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US"> ^<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoPlainText"><span lang="EN-US">There appear to be 17 compiler warnings of this type:<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoPlainText"><span lang="EN-US">mpicxx.h:335, GNU C Compiler 4 (gcc), Priority: Normal <o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US">cast from type ‘const void*’ to type ‘void*’ casts away qualifiers [-Wcast-qual]<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoPlainText"><span lang="EN-US">mpicxx.h:633, GNU C Compiler 4 (gcc), Priority: Normal <o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US">cast from type ‘const int (*)[3]’ to type ‘int (*)[3]’ casts away qualifiers [-Wcast-qual]<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoPlainText"><span lang="EN-US">mpicxx.h:639, GNU C Compiler 4 (gcc), Priority: Normal <o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US">cast from type ‘const int (*)[3]’ to type ‘int (*)[3]’ casts away qualifiers [-Wcast-qual]<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoPlainText"><span lang="EN-US">mpicxx.h:1087, GNU C Compiler 4 (gcc), Priority: Normal <o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US">cast from type ‘const MPI_Request* {aka const int*}’ to type ‘MPI_Request* {aka int*}’ casts away qualifiers [-Wcast-qual]<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoPlainText"><span lang="EN-US">mpicxx.h:1412, GNU C Compiler 4 (gcc), Priority: Normal <o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US">cast from type ‘const void*’ to type ‘void*’ casts away qualifiers [-Wcast-qual]<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoPlainText"><span lang="EN-US">mpicxx.h:1690, GNU C Compiler 4 (gcc), Priority: Normal<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US">cast from type ‘const char*’ to type ‘char*’ casts away qualifiers [-Wcast-qual]<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoPlainText"><span lang="EN-US">mpicxx.h:1691, GNU C Compiler 4 (gcc), Priority: Normal <o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US">cast from type ‘const char**’ to type ‘char**’ casts away qualifiers [-Wcast-qual]<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoPlainText"><span lang="EN-US">mpicxx.h:1698, GNU C Compiler 4 (gcc), Priority: Normal <o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US">cast from type ‘const char*’ to type ‘char*’ casts away qualifiers [-Wcast-qual] <o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoPlainText"><span lang="EN-US">mpicxx.h:1699, GNU C Compiler 4 (gcc), Priority: Normal <o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US">cast from type ‘const char**’ to type ‘char**’ casts away qualifiers [-Wcast-qual]<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoPlainText"><span lang="EN-US">mpicxx.h:1712, GNU C Compiler 4 (gcc), Priority: Normal <o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US">cast from type ‘const char**’ to type ‘char**’ casts away qualifiers [-Wcast-qual]<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoPlainText"><span lang="EN-US">mpicxx.h:1713, GNU C Compiler 4 (gcc), Priority: Normal <o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US">cast from type ‘const char***’ to type ‘char***’ casts away qualifiers [-Wcast-qual]<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoPlainText"><span lang="EN-US">mpicxx.h:1713, GNU C Compiler 4 (gcc), Priority: Normal <o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US">cast from type ‘const int*’ to type ‘int*’ casts away qualifiers [-Wcast-qual]<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoPlainText"><span lang="EN-US">mpicxx.h:1727, GNU C Compiler 4 (gcc), Priority: Normal <o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US">cast from type ‘const char**’ to type ‘char**’ casts away qualifiers [-Wcast-qual]<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoPlainText"><span lang="EN-US">mpicxx.h:1728, GNU C Compiler 4 (gcc), Priority: Normal <o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US">cast from type ‘const char***’ to type ‘char***’ casts away qualifiers [-Wcast-qual]<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US"> <o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US">mpicxx.h:1728, GNU C Compiler 4 (gcc), Priority: Normal <o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US">cast from type ‘const int*’ to type ‘int*’ casts away qualifiers [-Wcast-qual]<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoPlainText"><span lang="EN-US">mpicxx.h:1851, GNU C Compiler 4 (gcc), Priority: Normal <o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US">cast from type ‘const void*’ to type ‘void*’ casts away qualifiers [-Wcast-qual]<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoPlainText"><span lang="EN-US">mpicxx.h:1872, GNU C Compiler 4 (gcc), Priority: Normal <o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US">cast from type ‘const void*’ to type ‘void*’ casts away qualifiers [-Wcast-qual]<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoPlainText"><span lang="EN-US">A minimum working example of just translating the MPICH mpi.h header using <o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoPlainText"><span lang="EN-US">mpicxx.mpich -o /tmp/test.o -c -fPIC -O3 -g -cxx=g++ -Wall -Wextra -Wcast-qual -Wconversion -Wformat=2 -Wformat-nonliteral -Wformat-security -Winit-self -Wmissing-format-attribute -Wmissing-include-dirs -Wpacked -Wunreachable-code -Wunused -Wno-unused-parameter -Wswitch-enum -Wredundant-decls -pedantic -Wswitch-default -fno-strict-aliasing -funroll-loops -mfpmath=sse -fopenmp -fno-omit-frame-pointer -msse3 -fPIC -std=c++11 /usr/include/mpich/mpi.h<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoPlainText"><span lang="EN-US">produces the same compiler warnings on the following environment (mpich packages from the debian repository): <o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoPlainText"><span lang="EN-US">debian@debian:~$ mpicxx.mpich -v<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US">mpicxx for MPICH version 3.2<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US">Using built-in specs.<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US">COLLECT_GCC=g++<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US">COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/6/lto-wrapper<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US">Target: x86_64-linux-gnu<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US">Configured with: ../src/configure -v --with-pkgversion='Debian 6.3.0-18' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-6 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US">Thread model: posix<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US">gcc version 6.3.0 20170516 (Debian 6.3.0-18)<o:p></o:p></span></p><p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoPlainText">Sincerely,<o:p></o:p></p><p class="MsoPlainText">Vincent<o:p></o:p></p><p class="MsoPlainText"><o:p> </o:p></p><p class="MsoNormal"><o:p> </o:p></p></div></body></html>