Re: C++ compiler

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Claudio Freire <klaussfreire(at)gmail(dot)com>, Gaetano Mendola <mendola(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: C++ compiler
Date: 2013-06-25 02:32:42
Message-ID: 51C9014A.8090804@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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
>>> <jd(at)commandprompt(dot)com> 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?
>>>
>>>
>>> Perhaps the size of C++ ?
>>
>> Right. I don't think there are any C features we want to avoid; are
>> there any?
>
> 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 seriously being considered, I'd take a look at:

http://gcc.gnu.org/codingconventions.html

http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml

and look into a stylechecker that warns when it finds usage of
inappropriate features. Possibly combined with a useful static checker.

A useful starting point might be https://en.wikipedia.org/wiki/Cpplint.

http://clang-analyzer.llvm.org/ may also be interesting, though it's
more of a static analysis tool and less of a source code lint.

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2013-06-25 02:40:41 Re: Patch for fail-back without fresh backup
Previous Message Noah Misch 2013-06-25 02:14:22 Re: patch submission: truncate trailing nulls from heap rows to reduce the size of the null bitmap [Review]