This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Go C++ only
On Thu, Sep 1, 2016 at 11:22 AM, Pedro Alves <palves@redhat.com> 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
>