Re: [HACKERS] C++ compiler

2013-06-25 Thread Joshua D. Drake
On 06/24/2013 09:16 PM, Tom Lane wrote: Bruce Momjian writes: Right. I don't think there are any C features we want to avoid; are there any? We're avoiding C99-and-later features that are not in C89, such as // for comments, as well as more useful things. It might be time to reconsider whe

Re: [HACKERS] C++ compiler

2013-06-24 Thread Craig Ringer
On 06/25/2013 01:36 PM, james wrote: > On 25/06/2013 05:16, Tom Lane wrote: >> It might be time to reconsider whether we should move the baseline >> portability requirement up to C99. > > My understanding was that you picked up a lot of users when the Win32 > port became useful. While you can bui

Re: [HACKERS] C++ compiler

2013-06-24 Thread james
On 25/06/2013 05:16, Tom Lane wrote: It might be time to reconsider whether we should move the baseline portability requirement up to C99. My understanding was that you picked up a lot of users when the Win32 port became useful. While you can build with msys, I would think that leaving Micro

Re: [HACKERS] C++ compiler

2013-06-24 Thread Tom Lane
Bruce Momjian writes: > Right. I don't think there are any C features we want to avoid; are > there any? We're avoiding C99-and-later features that are not in C89, such as // for comments, as well as more useful things. It might be time to reconsider whether we should move the baseline portabil

Re: [HACKERS] C++ compiler

2013-06-24 Thread Bruce Momjian
On Tue, Jun 25, 2013 at 10:32:42AM +0800, Craig Ringer wrote: > > Anything supported by C99 and not other versions I would say. However, > > my point is if done correctly we would state which features ahead of > > time we are willing to use and make them part of the developer faq? > > If C++ is se

Re: [HACKERS] C++ compiler

2013-06-24 Thread Bruce Momjian
On Mon, Jun 24, 2013 at 06:38:48PM -0700, Joshua D. Drake wrote: > > On 06/24/2013 05:37 PM, Bruce Momjian wrote: > > > >On Mon, Jun 24, 2013 at 09:21:26PM -0300, Claudio Freire wrote: > >>On Mon, Jun 24, 2013 at 9:19 PM, Joshua D. Drake > >>wrote: > > I think the big question is whethe

Re: [HACKERS] C++ compiler

2013-06-24 Thread Craig Ringer
On 06/25/2013 09:38 AM, Joshua D. Drake wrote: > > On 06/24/2013 05:37 PM, Bruce Momjian wrote: >> >> On Mon, Jun 24, 2013 at 09:21:26PM -0300, Claudio Freire wrote: >>> On Mon, Jun 24, 2013 at 9:19 PM, Joshua D. Drake >>> wrote: > > I think the big question is whether you can _control_ w

Re: [HACKERS] C++ compiler

2013-06-24 Thread Joshua D. Drake
On 06/24/2013 05:37 PM, Bruce Momjian wrote: On Mon, Jun 24, 2013 at 09:21:26PM -0300, Claudio Freire wrote: On Mon, Jun 24, 2013 at 9:19 PM, Joshua D. Drake wrote: I think the big question is whether you can _control_ what C++ features are used, or whether you are perpetually instructing u

Re: [HACKERS] C++ compiler

2013-06-24 Thread Bruce Momjian
On Mon, Jun 24, 2013 at 09:21:26PM -0300, Claudio Freire wrote: > On Mon, Jun 24, 2013 at 9:19 PM, Joshua D. Drake > wrote: > >> > >> I think the big question is whether you can _control_ what C++ features > >> are used, or whether you are perpetually instructing users what C++ > >> features not

Re: [HACKERS] C++ compiler

2013-06-24 Thread Claudio Freire
On Mon, Jun 24, 2013 at 9:19 PM, Joshua D. Drake wrote: >> >> I think the big question is whether you can _control_ what C++ features >> are used, or whether you are perpetually instructing users what C++ >> features not to use. > > > How is that different than us having to do the same with C? P

Re: [HACKERS] C++ compiler

2013-06-24 Thread Joshua D. Drake
On 06/24/2013 04:59 PM, Bruce Momjian wrote: On Thu, Jun 20, 2013 at 12:45:48PM +0800, Craig Ringer wrote: I see value in making the codebase compileable with g++... and down the track I can see being able to use basic class features as quite useful given Pg's fairly OO internal design. Inline

Re: [HACKERS] C++ compiler

2013-06-24 Thread Bruce Momjian
On Thu, Jun 20, 2013 at 12:45:48PM +0800, Craig Ringer wrote: > I see value in making the codebase compileable with g++... and down the > track I can see being able to use basic class features as quite useful > given Pg's fairly OO internal design. Inline template functions instead > of macros woul

Re: [HACKERS] C++ compiler

2013-06-19 Thread Craig Ringer
On 06/16/2013 03:19 AM, Gaetano Mendola wrote: > I have read Peter Eisentraut blog entry about "Moving to C++", I full agree > with him about what he wrote. > > Is there any interest or work in progress in making the entire Postgresql > code base compilable by a C++ compiler? Well, from Peter at le

Re: [HACKERS] C++ compiler

2013-06-16 Thread Maciej Gajewski
It would be great. I'm working at the moment on porting integer operations to unsigned types, and the code is essentially a small number of functions, repeated for every combination of integer types. In C++ it could be simply one single set of template functions. Less code; less bugs.

[HACKERS] C++ compiler

2013-06-15 Thread Gaetano Mendola
I have read Peter Eisentraut blog entry about "Moving to C++", I full agree with him about what he wrote. Is there any interest or work in progress in making the entire Postgresql code base compilable by a C++ compiler? Regards Gaetano Mendola -- cpp-today.blogspot.com