git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Cc: Junio C Hamano <gitster@pobox.com>,
	GIT Mailing-list <git@vger.kernel.org>
Subject: Re: [PATCH 2/2] cat-file: Fix an gcc -Wuninitialized warning
Date: Thu, 28 Mar 2013 15:02:26 -0400	[thread overview]
Message-ID: <20130328190226.GB17178@sigill.intra.peff.net> (raw)
In-Reply-To: <5154908B.1040801@ramsay1.demon.co.uk>

On Thu, Mar 28, 2013 at 06:48:43PM +0000, Ramsay Jones wrote:

> > I'm OK with this, if it's the direction we want to go. But I thought the
> > discussion kind of ended as "we do not care about these warnings on
> > ancient versions of gcc; those people should use -Wno-error=uninitialized".
> 
> Hmm, I don't recall any agreement or conclusions being reached.
> I guess I missed that!

I think Jonathan said that and nobody disagreed, and I took it as a
conclusion.

> Hmm, so are you saying that this patch is not acceptable because
> I used a compiler that is no longer supported?

No, I just think we should come to a decision on how unreadable to make
the code in order to suppress incorrect warnings on old compilers. I can
see the point in either of the following arguments:

  1. These compilers are old, and we do not need to cater to them in the
     code because people can just _not_ set -Werror=uninitialized (or
     its equivalent). It is still worth catering to bugs in modern
     compilers that most devs use, because being able to set -Werror is
     helpful.

  2. The code is not made significantly less readable, especially if you
     put in a comment, so why not help these compilers.

When we can make the code more readable _and_ help the compiler, I think
it is a no-brainer. I am on the fence otherwise and don't care that
much. I just think we should apply the rule consistently.

-Peff

  reply	other threads:[~2013-03-28 19:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-26 19:20 [PATCH 2/2] cat-file: Fix an gcc -Wuninitialized warning Ramsay Jones
2013-03-26 19:35 ` Jeff King
2013-03-26 19:38   ` Jeff King
2013-03-28 18:48   ` Ramsay Jones
2013-03-28 19:02     ` Jeff King [this message]
2013-03-28 19:36       ` Jonathan Nieder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130328190226.GB17178@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=ramsay@ramsay1.demon.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).