git-compat-util: st_add4: work around gcc 4.2.x compiler crash
[gitweb.git] / git-compat-util.h
index 061e33c7749dc496e1f5e78aabdfd4c6f1e82736..6d304613ff1faa8b65567438227376ad383ead30 100644 (file)
@@ -713,8 +713,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))
 
 static inline size_t st_mult(size_t a, size_t b)
 {