From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116467 invoked by alias); 11 Dec 2019 01:27:00 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 116459 invoked by uid 89); 11 Dec 2019 01:27:00 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-17.4 required=5.0 tests=AWL,BAYES_00,ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_PASS,USER_IN_DEF_SPF_WL autolearn=ham version=3.3.1 spammy=manipulating, H*f:sk:1ae59e3, H*i:sk:1ae59e3, Components X-HELO: mail-oi1-f174.google.com Received: from mail-oi1-f174.google.com (HELO mail-oi1-f174.google.com) (209.85.167.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 11 Dec 2019 01:26:58 +0000 Received: by mail-oi1-f174.google.com with SMTP id x195so11785286oix.4 for ; Tue, 10 Dec 2019 17:26:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4n1d6LIgJpozrMnPtkkNqc0jVb+w7VUSpk1XvZu/R2o=; b=tPjIkH8OtuSwbNZcpYDzl9EAadJ+aZGPaeEOX4usny3xJUsuCBYcc+TEZpBlDdlEdL NMZPf+fDEd2uPS1uPlD7If2HL3U8Kl/95bYv0HiaXD2H0u22yxRIZL+WvFf98o9Hmndv rct6M4xa2QC20cEJRACUa/0G92iyT/d13M4dBDVom4izQSDgiWNc2e80JeOvIDStEyTE OBghnT6fS0jS+QtFNVwNwlX/TJiKZhWpLhxp7IVwXPEGKy63Ce8EdyFtHjRc1M5M6qXR YTjTbiW6eLZezkpdLsIkbWMBn74uTEUWX94toJW8+dMunMuhGbavjXa72iQbrhusgsKU +thw== MIME-Version: 1.0 References: <1ae59e3e-9685-b9fa-49b5-71b29d709604@linaro.org> In-Reply-To: <1ae59e3e-9685-b9fa-49b5-71b29d709604@linaro.org> From: "Christian Biesinger via gdb" Reply-To: Christian Biesinger Date: Wed, 11 Dec 2019 01:27:00 -0000 Message-ID: Subject: Re: Renaming .c files to .cc? To: Luis Machado Cc: gdb@sourceware.org, Pedro Alves Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019-12/txt/msg00003.txt.bz2 On Tue, Dec 10, 2019 at 7:41 PM Luis Machado wrote: > > On 12/10/19 7: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/) > > I don't have strong objections to this other than it may make things > slightly more tedious to 'git blame' some files, as Tromey pointed out. Can you elaborate on that? git blame seems to work as expected for this, e.g.: $ git blame gdbsupport/gdb_string_view.h 7adcdf08e792 gdb/common/gdb_string_view.h (Simon Marchi 2018-04-09 13:31:04 -0400 1) // Components for manipulating non-owning sequences of characters -*- C++ -*- 7adcdf08e792 gdb/common/gdb_string_view.h (Simon Marchi 2018-04-09 13:31:04 -0400 2) 1a5c25988eab gdb/common/gdb_string_view.h (Tom Tromey 2019-01-27 12:51:36 -0700 3) 1a5c25988eab gdb/common/gdb_string_view.h (Tom Tromey 2019-01-27 12:51:36 -0700 4) #ifndef COMMON_GDB_STRING_VIEW_H 1a5c25988eab gdb/common/gdb_string_view.h (Tom Tromey 2019-01-27 12:51:36 -0700 5) #define COMMON_GDB_STRING_VIEW_H ... 700545387df8 gdb/gdbsupport/gdb_string_view.h (Christian Biesinger 2019-10-01 13:36:07 -0500 49) #include "gdb_assert.h" And git log has the --follow option for this purpose. > But i think that is excusable compared to better organization of source > files, for what they really are (C++ files). > > > > > 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++ > > The above items sound like reasonable pluses. > > > > > 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? > > Christian > >