pgsql: Start using flexible array members - Mailing list pgsql-committers

From Peter Eisentraut
Subject pgsql: Start using flexible array members
Date
Msg-id E1QXIVl-0007XK-Gm@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: pgsql: Update README-SSI. Add a section to describe the "dangerous stru
Next
From: Peter Eisentraut
Date:
Subject: pgsql: Avoid compiler warnings due to possibly unused variables