Peter Geoghegan writes:
On Fri, Apr 5, 2013 at 11:14 PM, Tom Lane 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
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

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 18 | next ›
Discussion Overview
grouppgsql-hackers @
postedApr 5, '13 at 10:14p
activeJul 23, '13 at 8:30a



site design / logo © 2021 Grokbase