This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH] gdb: Replace operator new / operator new
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Fri, 23 Sep 2016 17:07:33 +0100
- Subject: Re: [PATCH] gdb: Replace operator new / operator new
- Authentication-results: sourceware.org; auth=none
- References: <email@example.com> <CAH=s-PP0NaFO+EsZEEnoGpKMQJc03i1MR9ATaoLuKKZz0Gw0JA@mail.gmail.com>
On 09/23/2016 10:44 AM, Yao Qi wrote:
> On Thu, Sep 22, 2016 at 12:20 PM, Pedro Alves <firstname.lastname@example.org> wrote:
>> diff --git a/gdb/common/new-op.c b/gdb/common/new-op.c
>> new file mode 100644
>> index 0000000..c3b73c1
>> --- /dev/null
>> +++ b/gdb/common/new-op.c
>> @@ -0,0 +1,85 @@
>> +/* Replace operator new/new, for GDB, the GNU debugger.
> Patch is good to me.
> One comment on file name suffix, did you consider
> .cc suffix?
I think that if we want to use .cc, it should be a mass rename
across the board. Ending up with a mix of .c and .cc files when
both extensions are C++ file is much more confusing than
all C++ files named .c, IMO.
gcc didn't do it, but I think that was because of that
making it difficult to do archaeology. I don't think we have
that problem with git, as it can cross renames.
.c files don't bother me, but maybe it'd be one less
little detail newcomers would have to learn. Not sure...