GEOS 3.13 and GEOSMessageHandler

Sandro Santilli strk at kbt.io
Wed Aug 28 06:06:50 PDT 2024


On Wed, Aug 28, 2024 at 06:53:47AM -0400, Greg Troxel wrote:
> 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.

We'd need to adapt some code for -std=c11, like:

  liblwgeom/measures.c:2482:35: error: ‘M_PI_2’ undeclared (first use in this function)

(works fine with -std=gnu11)

> 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?

I've pushed this "c11" branch that's currently using -std=gnu11 and CI
bots seem happy with it.

What I'd like to know is if it fixes Paul's warning with the typedef
redefinition as that's what we're aiming at.

--strk; 

  Libre GIS consultant/developer
  https://strk.kbt.io/services.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20240828/03e7c873/attachment.sig>


More information about the postgis-devel mailing list