On Wed, Jan 2, 2013 at 1:23 PM, Dmitri Gribenko <gribozavr@gmail.com> wrote:
Unfortunately we can not, because user-defined datatypes are
syntactically different from builtin datatypes in MPICH.  MPI_INT is a
macro, so what Clang sees is essentially a magic number.  With
user-defined datatypes there's an identifier (MyEnumDatatype) that
actually shows up in the AST.  There's a separate quirk in Clang for
handling these magic numbers and corresponding 'static const'
variables (not needed for OpenMPI, btw).

Okay, makes sense.
 
> so that the symbols are guaranteed to only show up once in
> executables (rather than once per compilation unit)?

A smart enough compiler (and Clang is smart enough) will eliminate
those even at -O0.

Okay, gcc also removes them with optimization. Thanks, Dmitri.