<div dir="ltr"><div class="gmail_extra">On Wed, Jan 2, 2013 at 1:23 PM, Dmitri Gribenko <span dir="ltr"><<a href="mailto:gribozavr@gmail.com" target="_blank">gribozavr@gmail.com</a>></span> wrote:<br><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>Unfortunately we can not, because user-defined datatypes are<br>
syntactically different from builtin datatypes in MPICH. MPI_INT is a<br>
macro, so what Clang sees is essentially a magic number. With<br>
user-defined datatypes there's an identifier (MyEnumDatatype) that<br>
actually shows up in the AST. There's a separate quirk in Clang for<br>
handling these magic numbers and corresponding 'static const'<br>
variables (not needed for OpenMPI, btw).<br></div></blockquote><div><br></div><div>Okay, makes sense.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div><div>
> so that the symbols are guaranteed to only show up once in<br>
> executables (rather than once per compilation unit)?<br>
<br>
</div>A smart enough compiler (and Clang is smart enough) will eliminate<br>
those even at -O0.</div></blockquote></div><br></div><div class="gmail_extra" style>Okay, gcc also removes them with optimization. Thanks, Dmitri.</div></div>