[gnu.gcc.bug] variable length arrays broken?

schmidt@GLACIER.ICS.UCI.EDU ("Douglas C. Schmidt") (04/04/89)

The following is an example from the gcc.texinfo file:

----------------------------------------
int foo;

struct entry
{
  char data[foo];
};

struct entry
tester (struct entry arg)
{
  struct entry new;
  int i;
  for (i = 0; i < foo; i++)
    new.data[i] = arg.data[i] + 1;
  return new;
}
----------------------------------------

This does not compile with gcc 1.34, however.  The compiler
complains that:

----------------------------------------
test.c:5: variable-size type declared outside of any function
----------------------------------------

Is the documentation out-of-date, or is the compiler wrong?

thanks,

Doug