[postgis-devel] PgSQL 12 and -Werror=vla

Paul Ramsey pramsey at cleverelephant.ca
Wed Oct 31 14:25:34 PDT 2018


Looks like it was Andres, about two months ago, during the switch to
"modern" C99

https://github.com/postgres/postgres/blame/696b0c5fd0a8765fe6dfd075a30be06b448fd615/configure.in#L488

Wikipedia commentary :)

https://en.wikipedia.org/wiki/Variable-length_array#C99

Our failure:

geography_centroid.c:108:24: error: variable length array used
[-Werror,-Wvla]
        POINT3DM points[size];
                       ^
geography_centroid.c:261:20: error: variable length array used
[-Werror,-Wvla]
    POINT3DM points[size];
                   ^
geography_centroid.c:316:20: error: variable length array used
[-Werror,-Wvla]
    POINT3DM points[size];
                   ^

Fun! Let the bikeshedding begin!

P

On Wed, Oct 31, 2018 at 2:14 PM Paul Ramsey <pramsey at cleverelephant.ca>
wrote:

> Interesting note: build against Pg12 just failed for me because my build
> off of trunk master included this CFLAG
>
>     -Werror=vla
>
> Funny, hey? It's ./configured exactly the same as my Pg11 version, but
> it's got that error on variable length array. I'll see if I can figure out
> why PgSQL is now added that guard.
>
> P.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20181031/6d3975a6/attachment.html>


More information about the postgis-devel mailing list