From: Christian Couder <christian.couder@gmail.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: git <git@vger.kernel.org>, "Junio C Hamano" <gitster@pobox.com>,
"Jeff King" <peff@peff.net>,
"Torsten Bögershausen" <tboegi@web.de>,
"Renato Botelho" <garga@freebsd.org>
Subject: Re: [PATCH 1/2] git-compat-util: st_add4: work around gcc 4.2.x compiler crash
Date: Mon, 21 Mar 2016 05:56:56 +0100 [thread overview]
Message-ID: <CAP8UFD0Kp55bpwdNrXY3KhpDiHVDReWKpuNJz7_Q537DXeUXHA@mail.gmail.com> (raw)
In-Reply-To: <1458534958-6956-2-git-send-email-sunshine@sunshineco.com>
On Mon, Mar 21, 2016 at 5:35 AM, Eric Sunshine <sunshine@sunshineco.com> wrote:
>
> diff --git a/git-compat-util.h b/git-compat-util.h
> index c07e0c1..4743954 100644
> --- a/git-compat-util.h
> +++ b/git-compat-util.h
> @@ -715,8 +715,8 @@ static inline size_t st_add(size_t a, size_t b)
> (uintmax_t)a, (uintmax_t)b);
> return a + b;
> }
> -#define st_add3(a,b,c) st_add((a),st_add((b),(c)))
> -#define st_add4(a,b,c,d) st_add((a),st_add3((b),(c),(d)))
> +#define st_add3(a,b,c) st_add(st_add((a),(b)),(c))
> +#define st_add4(a,b,c,d) st_add(st_add3((a),(b),(c)),(d))
Nit: maybe a comment around those lines would make sure that people do
not inadvertently change them back later.
Thanks,
Christian.
next prev parent reply other threads:[~2016-03-21 4:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-21 4:35 [PATCH 0/2] work around gcc 4.2.x compiler crash Eric Sunshine
2016-03-21 4:35 ` [PATCH 1/2] git-compat-util: st_add4: " Eric Sunshine
2016-03-21 4:43 ` Jeff King
2016-03-21 4:56 ` Christian Couder [this message]
2016-03-21 5:38 ` Eric Sunshine
2016-03-21 17:46 ` Torsten Bögershausen
2016-03-21 4:35 ` [PATCH 2/2] Revert "config.mak.uname: use clang for Mac OS X 10.6" Eric Sunshine
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAP8UFD0Kp55bpwdNrXY3KhpDiHVDReWKpuNJz7_Q537DXeUXHA@mail.gmail.com \
--to=christian.couder@gmail.com \
--cc=garga@freebsd.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
--cc=sunshine@sunshineco.com \
--cc=tboegi@web.de \
/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.
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 NNTP newsgroup(s).