[mpich-discuss] Extensible Clang type annotation

Jed Brown jedbrown at mcs.anl.gov
Wed Jan 2 13:01:21 CST 2013


On Wed, Jan 2, 2013 at 12:09 PM, Dmitri Gribenko <gribozavr at gmail.com>wrote:

> Sorry if what I wrote was unclear.  Here's a complete example:
>
> $ cat t.cc
> #include <mpi.h>
>
> enum MyEnum { Foo };
> MPI_Datatype MyEnumDatatype MPICH_ATTR_TYPE_TAG(MyEnum);
>

Oh, fantastic. I didn't realize this could be applied to uninitialized
variables (and somehow didn't recognize that you were saying as much in the
first email). In light of this, can mpi.h change all the static
declarations to extern so that the symbols are guaranteed to only show up
once in executables (rather than once per compilation unit)?

And yes, I'm aware of the flexibility the standard gives compiler
implementers regarding enum size.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20130102/99baa0d3/attachment.html>


More information about the discuss mailing list