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

From Fabien COELHO
Subject Re: [COMMITTERS] pgsql: Remove extra comma at end of enum list
Date
Msg-id alpine.DEB.2.20.1610242257030.20001@lancre
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Remove extra comma at end of enum list  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
>> I find it annoying that "//" comments are not supported, or having to
>> declare variables at the beginning of a block instead of when first used...
>
> I think some c99 features would be nice (variadic macros for one), but
> those particular two get a big "meh" from me.

This is probably a matter of taste.

The question really to know when some C99 features (inline, mixing code & 
declarations, flexible array members, slash-slash comments, compound 
literals, variadic macros, restrict qualifier, ...), will be considered 
okay for Pg sources, or if they should be kept C89 compliant for the next 
27 years.

Well, it seems that Microsoft took time to implement C99 features, which 
would mean that a recent "Visual C++" would be required to compile pg on 
windows if pg would use C99 features.

> .oO( I wonder if it'd be possible to make ereport() an inline function ... )

Probaby not: ISTM that ereport relies on the fact that it is a macro to 
avoid evaluating some arguments until necessary, but the compiler would 
not do that on a function, whether inlined or not, because it would change 
the semantics if the evaluation was to fail.

-- 
Fabien.



pgsql-hackers by date:

Previous
From: Petr Jelinek
Date:
Subject: Re: [COMMITTERS] pgsql: Remove extra comma at end of enum list
Next
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql: Remove extra comma at end of enum list