All of lore.kernel.org
 help / color / mirror / Atom feed
From: "SZEDER Gábor" <szeder.dev@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Jonathan Nieder" <jrnieder@gmail.com>,
	"Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
	git@vger.kernel.org
Subject: Re: [PATCH 1/5] compat/obstack: fix -Wcast-function-type warnings
Date: Wed, 16 Jan 2019 00:55:46 +0100	[thread overview]
Message-ID: <20190115235546.GF840@szeder.dev> (raw)
In-Reply-To: <20190111185118.GD840@szeder.dev>

On Fri, Jan 11, 2019 at 07:51:18PM +0100, SZEDER Gábor wrote:
> On Fri, Jan 11, 2019 at 10:03:01AM -0800, Junio C Hamano wrote:
> > SZEDER Gábor <szeder.dev@gmail.com> writes:
> > 
> > > On Thu, Jan 10, 2019 at 01:22:00PM -0800, Junio C Hamano wrote:
> > >> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
> > >>  ...
> > >> > I.e. is this another case where we're blindly fixing bugs but should
> > >> > just re-import upstream's code instead?
> > >> 
> > >> Good point.  I am inclined to queue the remainder of the series
> > >> without this one for now.
> > >
> > > Note that without this first patch the linux-gcc build job will fail
> > > with the above compiler error, and that's the only build job that runs
> > > the test suite with all the misc test knobs (split-index,
> > > commit-graph, etc.) enabled.
> > 
> > I know.  
> > 
> > The point is to give more incentive to try what was suggested
> > earlier by Ævar (in short, "try to do the right thing, before
> > hacking around locally in this project" ;-)
> 
> Well, first I'm not sure what changes Ævar meant to be backported.
> Back then I briefly glanced at glibc's gitweb [1], but didn't see
> anything remotely relevant to these compiler errors.

So, I looked at the gnulib repository, where glibc got it's
obstack.{c,h} from, and it does have a fix for this issue in commit
127ed6a3e (obstack: avoid potentially-nonportable function casts,
2014-11-04):

  http://git.savannah.gnu.org/cgit/gnulib.git/commit?id=127ed6a3ea9c46452f079dee50382dc1f70ea796

It chose basically the same approach as my fix, i.e. storing pointers
to functions with different signatures in an union.  However,, the
differences between our and their obstack.{c,h} are way too big to
backport their patch.

> As to re-importing obstack.{c,h} from upstream, we've made some
> portability fixes to these files, and neither of the commit messages
> of those fixes mention that they are backports from upstream.  OTOH,
> one of those commits mentions platforms like
> "i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1, SunOS 5.10", which makes
> me suspect that the re-import will be susceptible to those portability
> issues again.  Therefore, I think re-importing these files from
> upstream is beyond the scope of this patch series (and might not be
> the right thing at all).

gnulib's obstack.{c,h} doesn't fix the issues that we've fixed in
3254310863 (obstack.c: Fix some sparse warnings, 2011-09-11) and
d190a0875f (obstack: Fix portability issues, 2011-08-28).  So if we
were to re-import from gnulib, then these two patches would have to be
applied on top yet again.


> [1] https://sourceware.org/git/?p=glibc.git;a=history;f=malloc/obstack.c;h=1669641983512d64f66c1ad659562f77ef48adfd;hb=refs/heads/master
> 

  reply	other threads:[~2019-01-15 23:55 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-16 18:45 On overriding make variables from the environment SZEDER Gábor
2018-10-16 21:54 ` Jonathan Nieder
2018-10-16 22:33   ` SZEDER Gábor
2018-10-16 22:40     ` Jonathan Nieder
2018-10-17 14:29       ` SZEDER Gábor
2018-10-18 10:01         ` Johannes Schindelin
2018-10-18 12:49         ` Junio C Hamano
2018-12-20 16:24 ` [PATCH 0/5] travis-ci: build with the right compiler SZEDER Gábor
2018-12-20 16:24   ` [PATCH 1/5] compat/obstack: fix -Wcast-function-type warnings SZEDER Gábor
2018-12-20 23:12     ` Ævar Arnfjörð Bjarmason
2019-01-10 21:22       ` Junio C Hamano
2019-01-11  0:37         ` SZEDER Gábor
2019-01-11 18:03           ` Junio C Hamano
2019-01-11 18:51             ` SZEDER Gábor
2019-01-15 23:55               ` SZEDER Gábor [this message]
2019-01-16  1:13                 ` Jonathan Nieder
2019-01-17  1:36                   ` SZEDER Gábor
2019-01-16  4:16                 ` Junio C Hamano
2018-12-20 16:24   ` [PATCH 2/5] .gitignore: ignore external debug symbols from GCC on macOS SZEDER Gábor
2018-12-20 16:24   ` [PATCH 3/5] travis-ci: don't be '--quiet' when running the tests SZEDER Gábor
2018-12-20 16:24   ` [PATCH 4/5] travis-ci: switch to Xcode 10.1 macOS image SZEDER Gábor
2018-12-20 16:24   ` [PATCH 5/5] travis-ci: build with the right compiler SZEDER Gábor
2019-01-03 16:01     ` Johannes Schindelin
2019-01-17  1:29   ` [PATCH v2 0/5] " SZEDER Gábor
2019-01-17  1:29     ` [PATCH v2 1/5] compat/obstack: fix -Wcast-function-type warnings SZEDER Gábor
2019-01-17  1:29     ` [PATCH v2 2/5] .gitignore: ignore external debug symbols from GCC on macOS SZEDER Gábor
2019-01-17  1:29     ` [PATCH v2 3/5] travis-ci: don't be '--quiet' when running the tests SZEDER Gábor
2019-01-17 13:28       ` Johannes Schindelin
2019-01-17  1:29     ` [PATCH v2 4/5] travis-ci: switch to Xcode 10.1 macOS image SZEDER Gábor
2019-01-17  1:29     ` [PATCH v2 5/5] travis-ci: build with the right compiler SZEDER Gábor
2019-01-17 13:44       ` Johannes Schindelin
2019-01-17 14:56         ` SZEDER Gábor
2019-01-18  8:40           ` Johannes Schindelin

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=20190115235546.GF840@szeder.dev \
    --to=szeder.dev@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.