This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH 1/3] Introduce gdb::unique_ptr
On 10/12/2016 10:31 AM, Eli Zaretskii wrote:
>> From: "Metzger, Markus T" <email@example.com>
>> CC: "firstname.lastname@example.org" <email@example.com>,
>> "firstname.lastname@example.org" <email@example.com>, "Jan Kratochvil
>> (firstname.lastname@example.org)" <email@example.com>, Simon Marchi
>> Date: Wed, 12 Oct 2016 08:11:44 +0000
>> I think we got hung up on the perceived requirement of having to build
>> your own GCC. The discussion got a bit too abstract and mentioning GCC 6
>> as the first to default to C++11 may have been confusing in the heat of the
>> discussion as "GCC 6 defaults to C++11" may have been misread as "C++11
>> requires GCC 6".
> I don't think that's what happened. In my interpretation, there are
> simply several issues intertwined in this discussion (which probably
> adds to confusion):
> . Should we start using C++11 features in GDB?
I would hope that no one would suggest that we shouldn't use
C++11 features just because they like C++03 better than C++11.
That would make no sense.
In my mind, the only reason you'd not use C++11 over C++03
is simply because you couldn't because you don't have a
compiler that supports it. IMO, at this point, the number
of systems that don't have a C++11 compiler handy AND where
you'd absolutely need to build a new GDB is sufficiently small that
the desire to use C++11 features overwhelms the inconvenience
of having to build a new compiler first, on those specific cases.
Many of the larger projects around the free software community
require C++11 nowadays. It's quite likely that even on older
systems you'll have arranged to set up a newer compiler that
supports C++11, because it is dependency on the programs that
you'll likely want to debug with gdb.
Alternatives to GDB, like lldb, already require a C++11
compiler anyway, so C++11 alone won't be a reason that
would cause people to try alternatives on those systems.
But even if we don't _require_ C++11, IMO, yes, we should
still use select C++11 features when available, in implementation
details of gdb's general utilities, when they add extra safety or
efficiency that is simply not possible in C++03.
TBC, I would reject patches that added:
sprinkled around the codebase in non-utility code.
> . Should we document these decisions and also decide to abide by
> them for some reasonably long stretch of time?
Sure, we should document the decisions. But I see no point in locking
ourselves to past decisions on a timed basis. Past decisions should
be reevaluated simply when they longer make sense. I.e.,
apply past reasoning to current reality and see if the same answer