Jeff King <peff@xxxxxxxx> writes: > + /* > + * Should be a noop per the ALLOWED_FLAGS check above, but this > + * is necessary to work around a problem with some versions of > + * "gcc -O3 -Wnonnull", which otherwise thinks that you can have the > + * flag set with a NULL new_oid. > + */ > + flags &= ~REF_HAVE_OLD | REF_HAVE_NEW; Are you missing parentheses around ~(OLD|NEW)? > flags |= (new_oid ? REF_HAVE_NEW : 0) | (old_oid ? REF_HAVE_OLD : 0); > > ref_transaction_add_update(transaction, refname, flags, > > I do find it interesting that gcc really _is_ convinced that those flags > can be set coming in, since clearing them makes the problem go away. > ... > Reading over the code, it all looks OK. And that size is...weirdly huge. The original bug is really annoying and this looks even worse. Hopefully it won't come down from experimental to more stable tracks before they are corrected.