Re: Back branches vs. gcc 4.8.0

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Geoghegan <pg(at)heroku(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Back branches vs. gcc 4.8.0
Date: 2013-04-05 22:38:40
Message-ID: 14723.1365201520@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Geoghegan <pg(at)heroku(dot)com> writes:
> On Fri, Apr 5, 2013 at 11:14 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> It also strikes me that we ought to take this as a warning sign
>> that we need to work on getting rid of coding like the above in favor
>> of genuine "flexible arrays", before the gcc boys think of some other
>> overly-cute optimization based on the assumption that an array declared
>> with a fixed size really is fixed.

> The traditional argument against that has been that that's a C99
> feature.

Well, we already have a solution for that, see FLEXIBLE_ARRAY_MEMBER.
But up to now we've just supposed that that was a code beautification
thing and there was no particular urgency to convert all applicable
places to use that notation.

Since there's a potential to break code with such changes (we'd have to
fix any uses of sizeof on the struct type), it's been very far down the
to-do list. But now it appears that we're taking risks if we *don't*
change it.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2013-04-05 22:39:45 Re: Back branches vs. gcc 4.8.0
Previous Message Gavin Flower 2013-04-05 22:29:12 Re: Back branches vs. gcc 4.8.0