This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] gdb: Use vector::emplace_back
On 11/09/2016 05:08 PM, John Baldwin wrote:
>> This:
>>
>> cmdarg (cmdarg_kind type, char *string)
>> : this->type (type), this->string (string)
>> {}
>>
>> is not valid C++ and does _not_ compile:
>
> No, but this compiles:
>
> cmdarg (cmdarg_kind type, char *string)
> : type (type), string (string)
> {}
>
> I converted a non-trivial C++ code base both to C++11 and to compile with
> -Wshadow (two of several different passes). There were many instances of the
> style above that all had to be changed to compile with -Wshadow.
Ah! I stand corrected. Then it is about -Wshadow after all.
Thanks,
Pedro Alves