From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org, "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: Re: [PATCH v2 5/5] CodingGuidelines: recommend against unportable C99 struct syntax
Date: Mon, 10 Oct 2022 17:26:36 -0700 [thread overview]
Message-ID: <xmqqlepnxl1f.fsf@gitster.g> (raw)
In-Reply-To: <Y0S0Tpn/uCjG9J61@coredump.intra.peff.net> (Jeff King's message of "Mon, 10 Oct 2022 20:09:50 -0400")
Jeff King <peff@peff.net> writes:
> On Mon, Oct 10, 2022 at 01:38:00PM -0700, Junio C Hamano wrote:
>
>> diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
>> index 9598b45f7e..cbe0377699 100644
>> --- a/Documentation/CodingGuidelines
>> +++ b/Documentation/CodingGuidelines
>> @@ -242,6 +242,10 @@ For C programs:
>> printf("%"PRIuMAX, (uintmax_t)v). These days the MSVC version we
>> rely on supports %z, but the C library used by MinGW does not.
>>
>> + . Shorthand like ".a.b = *c" in struct assignments is known to trip
>> + up an older IBM XLC version, use ".a = { .b = *c }" instead. See
>> + the 33665d98e6b portability fix from mid-2022.
>
> FWIW, the use of the word "assignment" here left me scratching my head.
> Reading 33665d98e6b, it is about struct initialization.
Thanks, I missed that confusion in the new description. Perhaps
another round of reroll would make the series polished enough?
next prev parent reply other threads:[~2022-10-11 0:26 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-07 9:30 [PATCH 0/5] CodingGuidelines: various C99 updates Ævar Arnfjörð Bjarmason
2022-10-07 9:30 ` [PATCH 1/5] CodingGuidelines: update for C99 Ævar Arnfjörð Bjarmason
2022-10-07 18:08 ` Junio C Hamano
2022-10-07 9:30 ` [PATCH 2/5] CodingGuidelines: mention dynamic C99 initializer elements Ævar Arnfjörð Bjarmason
2022-10-07 9:30 ` [PATCH 3/5] CodingGuidelines: allow declaring variables in for loops Ævar Arnfjörð Bjarmason
2022-10-07 18:12 ` Junio C Hamano
2022-10-07 9:30 ` [PATCH 4/5] CodingGuidelines: mention C99 features we can't use Ævar Arnfjörð Bjarmason
2022-10-07 18:13 ` Junio C Hamano
2022-10-07 9:30 ` [PATCH 5/5] CodingGuidelines: recommend against unportable C99 struct syntax Ævar Arnfjörð Bjarmason
2022-10-07 17:54 ` [PATCH 0/5] CodingGuidelines: various C99 updates Junio C Hamano
2022-10-07 18:15 ` Junio C Hamano
2022-10-10 20:37 ` [PATCH v2 0/5] CodingGUidelines: " Junio C Hamano
2022-10-10 20:37 ` [PATCH v2 1/5] CodingGuidelines: update for C99 Junio C Hamano
2022-10-10 20:37 ` [PATCH v2 2/5] CodingGuidelines: mention dynamic C99 initializer elements Junio C Hamano
2022-10-10 20:37 ` [PATCH v2 3/5] CodingGuidelines: allow declaring variables in for loops Junio C Hamano
2022-10-10 20:37 ` [PATCH v2 4/5] CodingGuidelines: mention C99 features we can't use Junio C Hamano
2022-10-10 20:38 ` [PATCH v2 5/5] CodingGuidelines: recommend against unportable C99 struct syntax Junio C Hamano
2022-10-11 0:09 ` Jeff King
2022-10-11 0:26 ` Junio C Hamano [this message]
2022-10-11 0:39 ` Jeff King
2022-10-11 8:30 ` Ævar Arnfjörð Bjarmason
2022-10-11 15:01 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqlepnxl1f.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).