Re: [PATCH 03/22] argv-array.h: use the FORMATPRINTF macro to declare the gcc function attribute 'format printf'
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 11, 2016, 21:49 UTC
- Message-ID
- <xmqqwpqavrwr.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <xmqqd1s3vuhy.fsf@gitster.mtv.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 14 quoted lines
> OK, this may answer my previous question. > > It might be pleasing to the eyes when these two macros appearing > together in all CAPS, making them look similar and consistent, > perhaps with two more tweaks: > > - Imitate LAST_ARG_MUST_BE_NULL and spell it FORMAT_PRINTF; > > - Consistently have SP after comma, i.e. FORMAT_PRINTF(2, 3), > or to make it obvious that this thing is a special magic, drop SP > (i.e. this patch would stay the same but some other patches left > a space after comma, which made them look more inconsistent). > > Thanks. I am not 100% sold on this yet, though.
Regarding the second one, I misread the patch series. You consistently drop space and make the result FORMATPRINTF(X,Y).
I was fooled by the inconsistent original text, some of them using __attribute__((format (printf, X, Y))) while others saying __attribute__((format(printf,X,Y)) and some other variants.