Renaming .c files to .cc?

Pedro Alves
Wed Dec 11 10:59:00 GMT 2019

On 12/10/19 10:18 PM, Christian Biesinger via gdb wrote:
> Hello all,
> I was wondering what people's thoughts are on renaming the .c files to
> .cc, since they are in fact C++ code? (Only for files under gdb/)
> Advantages:
> - Easier for newcomers to see that the code is, in fact, C++
> - Editors will syntax highlight C++ keywords w/o having to be told
> that these files are C++
> On IRC it was mentioned that git may have issues with renames like
> that but I have found that "git log --follow" and such are doing a
> good job with that, at least as long as the same commit doesn't change
> the file too much while it is renamed, which I wouldn't expect to be a
> problem here.
> Thoughts?
My thoughts are that using .c instead of .cc is largely a minor
aesthetic issue, and that of all the things that might hinder someone
from seriously contributing to gdb, this has got to be at the bottom
of the list.  It's one of those things that you might be surprised about,
and then once you learn it, it just fades into the background and you
barely remember it.  We could just document it in some easier-to-find
place to eliminate the "surprise" effect and call it a day.
OTOH, renaming all the files has a recurring cost to people using git
tooling every day.

IMO, renaming the files has a disproportionate cost/benefit ratio.
I'm not terribly opposed, but I'm in the "prefer not" camp.

Pedro Alves

More information about the Gdb mailing list