> On Sep 15, 2016, at 11:06 PM, Jed Brown <[email protected]> wrote: > > Satish Balay <[email protected]> writes: > >> On Tue, 13 Sep 2016, Satish Balay wrote: >> >>> On Tue, 13 Sep 2016, Satish Balay wrote: >>> >>>> And this one is perhaps for Matt.. >>> >>> Ops - perhaps Jed needs to look at this.. >>>> >>>>>>>>>>>>>>>>>>>>>>> >>>> CC arch-clang-cmplx/obj/src/dm/impls/composite/pack.o >>>> /home/balay/petsc/src/dm/impls/composite/pack.c:657:17: warning: passing >>>> an object that undergoes default argument promotion to 'va_start' has >>>> undefined behavior [-Wvarargs] >>>> va_start(Argp,imode); >>>> ^ >>>> /home/balay/petsc/src/dm/impls/composite/pack.c:641:61: note: parameter of >>>> type 'InsertMode' is declared here >>>> PetscErrorCode DMCompositeGather(DM dm,Vec gvec,InsertMode imode,...) >>>> ^ >>>> 1 warning generated. >>>> <<<<<<<<<<<<<<<<< >> >> The fix here is: >> >> -PetscErrorCode DMCompositeGather(DM dm,Vec gvec,InsertMode imode,...) >> +PetscErrorCode DMCompositeGather(DM dm,InsertMode imode,Vec gvec,...) >> >> [Barry is ok - but Jed,Matt might object?] > > 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.
