Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c) - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)
Date
Msg-id aff7c79c-e05c-ed59-ad3a-123823846312@2ndquadrant.com
Whole thread Raw
In response to Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)  (Andres Freund <andres@anarazel.de>)
Responses Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)  (Andres Freund <andres@anarazel.de>)
Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)  (David Steele <david@pgmasters.net>)
List pgsql-hackers
On 22/08/2018 14:02, Andres Freund wrote:
> If we agree on that, I'm going to propose a patch that includes:
> - relevant cleanups to configure
> - adapts sources.sgml to refer to C99 instead of C89
> - add some trivial conversions to for(int i;;) and struct initializers,
>   so the relevant old animals fail
> - adds a configure check to enable errors with vla usage (-Werror=vla)

sounds good

> - do we want to make declarations at arbitrary points errors? It's
>   already a warning currently.

While there are legitimate criticisms, it's a standard feature in C,
C++, and many other languages, so I don't see what we'd gain by fighting it.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: JIT compiling with LLVM v12
Next
From: Andres Freund
Date:
Subject: Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)