From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Kurt Harriman <harriman(at)acm(dot)org> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Mostly Harmless: Welcoming our C++ friends |
Date: | 2008-12-15 19:50:50 |
Message-ID: | 9199.1229370650@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
[ just realized that I set this message aside to reply to later, and
then forgot about it --- apologies ]
Kurt Harriman <harriman(at)acm(dot)org> writes:
> Tom Lane wrote:
>> There is no such option, and won't be.
> Yours is the first comment anyone has posted to the list
> regarding my proposed c++configure patch, and it sounds
> alarmingly definite.
> May I ask you to elaborate? Have you more to say on the
> subject?
Well, as I understand it the proposal is to build main.c as C++ in the
hope of (1) identifying C++ incompatibilities in our include headers,
and (2) linking C++ instead of C library on platforms where they are
different.
As for #1, main.c doesn't (and shouldn't) include a large fraction of
the headers that might be interesting to a C++ add-on --- I'm surprised
that it hits as many as it does, because it surely has no direct use
for most of them.
> Extra #includes could be added to main.c just for the purpose of
> getting them C++-syntax-checked.
They'd disappear again the next time Bruce runs his unnecessary-#include
elimination script. And anyway the vast majority of the inclusions you
show here are accidental, indirect inclusions that might go away in any
header refactoring.
As for #2, thanks but no thanks: the very last thing I want is to have a
switch that causes us to start running on a different basic C library.
That would open all sorts of portability and testability concerns.
AFAIK there are only a few obsolete platforms where a C++-specific libc
is needed, and I'm perfectly happy to blow off the idea of supporting
C++ add-ons on them.
So I'm willing to support a project of making *all* our headers (or at
least all the ones a C++ addon could possibly care about) C++-safe,
if there's buildfarm support for making sure they stay that way. But
I don't approve of changing the way main.c gets compiled.
I am, btw, still waiting for an actually plausible use-case for this.
AFAICS the setjmp-vs-exceptions thing puts a very serious crimp in
what you could hope to accomplish by importing a pile of C++ code.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Martin Pihlak | 2008-12-15 19:55:13 | Re: SQL/MED compatible connection manager |
Previous Message | Tom Lane | 2008-12-15 19:28:01 | Re: planner issue with constraint exclusion |