From: | Peter Geoghegan <peter(at)2ndquadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Andres Freund <andres(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org, Robert Haas <robertmhaas(at)gmail(dot)com> |
Subject: | Re: [PATCH 04/16] Add embedded list interface (header only) |
Date: | 2012-06-25 20:22:07 |
Message-ID: | CAEYLb_VEO-=Km1C8dSkHhvfB-Q5Sap7enhV2gHt=20Yao2MNZw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 25 June 2012 20:59, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Andres Freund <andres(at)2ndquadrant(dot)com> writes:
>> Also, 'static inline' *is* C99 conforming as far as I can see?
>
> Hmm. I went back and re-read the C99 spec, and it looks like most of
> the headaches we had in the past with C99 inline are specific to the
> case where you want an extern declaration to be available. For a
> function that exists *only* as a static it might be all right. So maybe
> I'm misremembering how well this would work. We'd have to be sure we
> don't need any extern declarations, though.
Yeah, the extern inline functions sounds at least superficially
similar to what happened with extern templates in C++ - exactly one
compiler vendor implemented them to the letter of the standard (they
remained completely unimplemented elsewhere), and subsequently went
bust, before they were eventually removed from the standard last year.
Note that when you build Postgres with Clang, it's implicitly and
automatically building C code as C99. There is an excellent analysis
of the situation here, under "C99 inline functions":
http://clang.llvm.org/compatibility.html
> Having said that, I'm still of the opinion that it's not so hard to deal
> with that we should just blow off compilers where "inline" doesn't work
> well.
Fair enough.
--
Peter Geoghegan http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services
From | Date | Subject | |
---|---|---|---|
Next Message | ktm@rice.edu | 2012-06-25 20:25:23 | Re: libpq compression |
Previous Message | Tom Lane | 2012-06-25 20:20:54 | Re: new --maintenance-db options |