Re: [PATCH 1/2] git-compat-util: st_add4: work around gcc 4.2.x compiler crash

2016-03-21 Thread Torsten Bögershausen
On 2016-03-21 05.35, Eric Sunshine wrote: > } > -#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)) > That fix comp

Re: [PATCH 1/2] git-compat-util: st_add4: work around gcc 4.2.x compiler crash

2016-03-20 Thread Eric Sunshine
On Mon, Mar 21, 2016 at 12:56 AM, Christian Couder wrote: > On Mon, Mar 21, 2016 at 5:35 AM, Eric Sunshine > 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

Re: [PATCH 1/2] git-compat-util: st_add4: work around gcc 4.2.x compiler crash

2016-03-20 Thread Christian Couder
On Mon, Mar 21, 2016 at 5:35 AM, Eric Sunshine 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,

Re: [PATCH 1/2] git-compat-util: st_add4: work around gcc 4.2.x compiler crash

2016-03-20 Thread Jeff King
On Mon, Mar 21, 2016 at 12:35:57AM -0400, Eric Sunshine wrote: > Although changes by 5b442c4 (tree-diff: catch integer overflow in > combine_diff_path allocation, 2016-02-19) are perfectly valid, they > unfortunately trigger an internal compiler error in gcc 4.2.x: > > combine-diff.c: In func

[PATCH 1/2] git-compat-util: st_add4: work around gcc 4.2.x compiler crash

2016-03-20 Thread Eric Sunshine
Although changes by 5b442c4 (tree-diff: catch integer overflow in combine_diff_path allocation, 2016-02-19) are perfectly valid, they unfortunately trigger an internal compiler error in gcc 4.2.x: combine-diff.c: In function 'diff_tree_combined': combine-diff.c:1391: internal compiler erro