pgsql: Start using flexible array members

Started by Peter Eisentrautabout 15 years ago1 messagescomitters
Jump to latest
#1Peter Eisentraut
peter_e@gmx.net

Start using flexible array members

Flexible array members are a C99 feature that avoids "cheating" in the
declaration of variable-length arrays at the end of structs. With
Autoconf support, this should be transparent for older compilers.

We start with one use in gist.h because gcc 4.6 started to raise a
warning there. Over time, it can be expanded to other places in the
source, but they will likely need some review of sizeof and offsetof
usage. The current change in gist.h appears to be safe in this
regard.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/dbbba5279f66f95805c1e084e6f646d174931e56

Modified Files
--------------
configure | 71 ++++++++++++++++++++++++++++++++++++++++++++
configure.in | 1 +
src/include/access/gist.h | 2 +-
src/include/pg_config.h.in | 9 +++++
4 files changed, 82 insertions(+), 1 deletions(-)