From: Timo Hirvonen Date: Sun, 18 Jun 2006 08:43:52 GMT Subject: Re: [PATCH] Fix git to be (more) ANSI C99 compliant. Message-ID: <20060618114352.15191199.tihirvon@gmail.com> In-Reply-To: <20060618082103.GA1331@verplant.org> Florian Forster wrote: > GCC ignores the FAM in this case and allocates `sizeof (struct > combine_diff_path)' bytes. However, this is not correct according to > ANSI and prevents building using other compilers (e.g. Sun cc). Fair enough. > To be honest, I don't get the point of FAMs anyways. Why don't we just > use a pointer to `struct combine_diff_parent' there in the first place? In general FAMs are used to replace two mallocs with one. x = malloc(sizeof(struct foo) + 100) instead of x = malloc(sizeof(struct foo)); x->y = malloc(100); -- http://onion.dynserv.net/~timo/