Re: flexible array members

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: flexible array members
Date: 2011-06-16 19:49:45
Message-ID: 1308253785.6721.2.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On ons, 2011-06-15 at 18:19 -0400, Tom Lane wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > Is this a route we want to go down?
>
> > - GISTENTRY vector[1]; /* variable-length
> array */
> > + GISTENTRY vector[FLEXIBLE_ARRAY_MEMBER];
>
> Yes, I was thinking about the same trick after noting these warnings
> on Fedora 15, although personally I'd name the macro
> VARIABLE_LENGTH_ARRAY.

This macro is provided by Autoconf and it appears to be using the
standard's terminology.

Actually, the term "variable-length array" appears to refer to another
C99 feature, namely this one:

void
foo(int n)
{
bar int[n];

do_something();
}

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-06-16 20:00:21 Re: Patch - Debug builds without optimization
Previous Message Tom Lane 2011-06-16 19:49:16 Re: Boolean operators without commutators vs. ALL/ANY