Re: [PATCH] list-objects-filter-options: fix function name in BUG

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 17, 2020 at 5:55 PM Jeff King <peff@xxxxxxxx> wrote:
> I actually wonder if it is time to drop HAVE_VARIADIC_MACROS completely.
> They are in C99, and we have been introducing many other C99-isms. It
> would be a minor cleanup to a few bits of code, which perhaps isn't
> worth the risk. But I also have a vague memory of not being able to
> implement some interfaces because we couldn't count on them.
>
> Poking around, 3689539127 (add helpers for allocating flex-array
> structs, 2016-02-22) points out one such case. I think discussion of
> BUG_ON() got blocked by that, too. Looks like we also discussed them in
> the big "C99 weather balloon" thread:

There was also an idea[1] to use variadic macros to prevent `errno`
from being clobbered in a case like this:

    die_errno(_("blah %s"), foobar());

In which, if foobar() changes `errno`, then die_errno() reports the wrong value.

[1]: https://lore.kernel.org/git/CAPig+cQKMxwadf9aGyC5ESa-vxDy9PzrYo+m+JaVQ3S=12PyQQ@xxxxxxxxxxxxxx/



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux