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