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

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Remove extra comma at end of enum list
Date: 2016-10-25 01:44:54
Message-ID: CAEepm=1zTVk7-1CdUpELYwcGw4UKmfud6_dB7G_DmK4btDV1NA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Tue, Oct 25, 2016 at 2:34 PM, Peter Eisentraut
<peter(dot)eisentraut(at)2ndquadrant(dot)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

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2016-10-25 02:39:23 pgsql: postgres_fdw: Try again to stabilize aggregate pushdown regressi
Previous Message Peter Eisentraut 2016-10-25 01:34:14 Re: [COMMITTERS] pgsql: Remove extra comma at end of enum list

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro HORIGUCHI 2016-10-25 02:07:56 Re: [BUG] pg_basebackup from disconnected standby fails
Previous Message Peter Eisentraut 2016-10-25 01:34:14 Re: [COMMITTERS] pgsql: Remove extra comma at end of enum list