This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/3] Introduce gdb::unique_ptr
On 2016-10-11 16:54, Eli Zaretskii wrote:
Then why was there talk to use -std=gnu++11?
For those compilers that support C++11, but default to C++03. If the
feature is present and using it provides use with better error-checking,
why not use it?
That's not "stick to C++03" in my book. Sticking to C++03 means not
writing any code that requires a later standard at all.
That's your interpretation. I prefer to interpret it as compilable with
a C++03 compiler, with no significant difference in the resulting
behaviour.
Exactly like
we did when we required C90, but not C99: we had no code written for
C99 compilers, #ifdef'ed away for C90 compilers. Everything was C90.
Maybe because there wasn't a need or reason to do so? In this case,
there appears to be some value doing it. Do you question the fact that
it brings value at all, or that that value is not worth the extra
complexity?
I am sure nobody wants to see the whole code base sprinkled with such
#ifs. But here it's isolated in a file that we'll almost never touch
again, and which will significantly improve the rest of the code base,
with which we work with daily.
The warning analogy was perhaps not clearly expressed but I think it
was
good.
No, it wasn't: warnings don't affect code at all. This suggestion
clearly will.
I made sure to point that out at the end of my paragraph, but anyway the
analogy is not the important point here.