[MPlayer-dev-eng] [PATCH] Drop support for gcc-2.95

Joerg Sonnenberger joerg at britannica.bec.de
Wed Jul 12 23:59:53 CEST 2006


On Tue, Jul 11, 2006 at 05:27:47PM -0400, Rich Felker wrote:
> > and flexible array members. They're usually not
> > hard to work around using C89 syntax but still allow for nicer code.
> 
> Flexible array members are in no way better than just including a
> one-element array at the end of the structure, which is guaranteed to
> work as a consequence of other requirements in the C standard.

They are. Try the attached program on any normal architecture.

Joerg
-------------- next part --------------
struct {
	long double foo;
	char bar[1];
} test1;

struct {
	long double foo;
	char bar[];
} test2;

#include <stdio.h>

int main(void)
{
	printf("%zd %zd\n", sizeof(test1), sizeof(test2) + sizeof(char));
	return 0;
}


More information about the MPlayer-dev-eng mailing list