GEOS 3.13 and GEOSMessageHandler
Greg Troxel
gdt at lexort.com
Wed Aug 28 03:53:47 PDT 2024
Sandro Santilli <strk at kbt.io> writes:
> We're passing -std=gnu99 as a compiler switch when available [1],
> but if I pass -pedantic to the build line I get notified that
> PostgreSQL headers use C11 constructs:
>
> /usr/include/postgresql/16/server/storage/lwlock.h:63:1: warning: '_Static_assert' is a C11 extension [-Wc11-extensions]
>
> I don't find any indication in the README as to which capabilities the
> C compiler must have. What about going -std=gnu11 and see how it goes ?
> Note we use C++11 for Wagyu and FlatGeobuf.
>
> [1] https://trac.osgeo.org/postgis/ticket/4234
I would suggest --std=c11, not gnu11. I realize many gnu extensions are
popular, and that clang mostly has them, but in portable code I view use
of them as bugs.
With use of c++11, I don't see any reason to avoid c11. Are there
non-ancient non-broken environments where the compiler supports c++11
but not c11?
More information about the postgis-devel
mailing list