[petsc-dev] Hijacked MPI calls...

Jed Brown jed at jedbrown.org
Thu Sep 15 23:20:43 CDT 2016

Barry Smith <bsmith at mcs.anl.gov> writes:
>> It's annoying, but it appears to be needed.  It's screwy because enum
>> ought to be handled no differently than int for this purpose.
>    Yeah, we checked and sizeof(enum type) = 4 so there is no need for promotion so I blame it on compiler flakiness.

Well, the size of enums in general is compiler-dependent.  (I think our
use of PetscEnum is technically incorrect unless we have already ensured
that the actual enums have that size.)  But even if the size varies by
enum, it's still well-defined and behaves like the compatible int as far
as varargs should be concerned.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 800 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20160915/e4fa6849/attachment.sig>

More information about the petsc-dev mailing list