Re: flexible array members - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: flexible array members
Date
Msg-id 1308253785.6721.2.camel@vanquo.pezone.net
Whole thread Raw
In response to Re: flexible array members  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: flexible array members
List pgsql-hackers
On ons, 2011-06-15 at 18:19 -0400, Tom Lane wrote:
> Peter Eisentraut <peter_e@gmx.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();
}




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Boolean operators without commutators vs. ALL/ANY
Next
From: Tom Lane
Date:
Subject: Re: Patch - Debug builds without optimization