Re: [COMMITTERS] pgsql: Remove extra comma at end of enum list - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: [COMMITTERS] pgsql: Remove extra comma at end of enum list
Date
Msg-id CAEepm=1zTVk7-1CdUpELYwcGw4UKmfud6_dB7G_DmK4btDV1NA@mail.gmail.com
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Remove extra comma at end of enum list  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
On Tue, Oct 25, 2016 at 2:34 PM, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:
> On 10/24/16 8:37 PM, Michael Paquier wrote:
>> Well... Coming back to the subject, are there any recommendations from
>> committers? -std=c89 in CFLAGS does not seem to help much to detect
>> extra commas in enums, even if this has been added in C99.
>
> The only option that gives you a warning for this is -pedantic, and
> that's not going to work because it disabled a bunch of other stuff.

Considering your work to make PostgreSQL a valid C++ program, I just
wanted to note that C++03 doesn't like trailing commas in enums (since
it incorporates the earlier C standard).  That means that the baseline
for C++ would need to be at least C++11 for that to compile.  There
are also C99 features that are not in any C++ standard including
variable length arrays (which the C++ people consider to be insane
AFAIK) and restrict.

-- 
Thomas Munro
http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [COMMITTERS] pgsql: Remove extra comma at end of enum list
Next
From: Kyotaro HORIGUCHI
Date:
Subject: Re: [BUG] pg_basebackup from disconnected standby fails