Re: Go C++ only

Andrew Pinski <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <CA+=Sn1keK-yD=OPfmUYWk-1O2kMiACmMRme0E=N=e6rMn7Gfag@mail.gmail.com>
On Thu, Sep 1, 2016 at 11:22 AM, Pedro Alves <[email protected]> wrote:
> On 09/01/2016 07:07 PM, Simon Marchi wrote:
>
>> Are there some guidelines about which C++ features we can use or not?
>
> I think the biggest guideline so far is that people still want to build
> gdb on systems with compilers that predate C++11, so we're stuck with
> C++03 for the moment.
>
>> Perhaps some precisions about the coding style, for C++-specific
>> constructs (e.g. initializer lists).
>
> List initialization is C++11, so it's out, at least for now.
>
>> I suppose we'll end up copying
>> what GCC does for the most part, but it should be clear.
>
> Right, the proposal is to follow GCC's conventions:
>
>  https://sourceware.org/gdb/wiki/cxx-conversion#Coding_conventions
>
> Naturally we'll need to update the coding standards
> pages to mention C++ and point at that:
>
>  https://sourceware.org/gdb/wiki/Internals%20Coding-Standards

Note the only feature I want to use right now is bool instead of char
or int were the value is a boolean.  This is new code and back-porting
is a simple change to char instead of bool so it is not normally a big
issue.

Thanks,
Andrew Pinski

>
> Thanks,
> Pedro Alves
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.