git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Use __VA_ARGS__ for all of error's arguments

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 7, 2013, 21:05 UTC
Message-ID
<7vwquj6dio.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1360267238-21896-1-git-send-email-kraai@ftbfs.org>
Matt Kraai <kraai@ftbfs.org> writes:
> -#if defined(__GNUC__) && ! defined(__clang__)
> -#define error(fmt, ...) (error((fmt), ##__VA_ARGS__), -1)
> -#endif
> +#define error(...) (error(__VA_ARGS__), -1)

Before your change, we only define error() macro for GCC variants, but with your patch that no longer is the case. Does every compiler that compiles Git correctly today support this style of varargs macros?

Previous: Matt KraaiNext: John Keeping
Message 2 of 9 in “Use __VA_ARGS__ for all of error's arguments”
  1. Use __VA_ARGS__ for all of error's argumentsMatt Kraai, Feb 7, 2013
  2. Junio C HamanoFeb 7, 2013
  3. John KeepingFeb 7, 2013
  4. Matt KraaiFeb 7, 2013
  5. Use __VA_ARGS__ for all of error's argumentsMatt Kraai, Feb 7, 2013
  6. Jeff KingFeb 8, 2013
  7. Matt KraaiFeb 8, 2013
  8. Use __VA_ARGS__ for all of error's argumentsMatt Kraai, Feb 8, 2013
  9. Jeff KingFeb 8, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.