[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] fix jump-misses-init warnings
From: |
Ludovic Courtès |
Subject: |
Re: [PATCH] fix jump-misses-init warnings |
Date: |
Mon, 14 Sep 2009 09:37:26 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Hi Giuseppe,
Sorry for the late reply.
Giuseppe Scrivano <address@hidden> writes:
> I reported some problems compiling guile with new versions of GCC. The
> reason of these problems is that new GCC versions check for declaration
> in the current scope that are missed by a goto.
Which version is that? Is the warning enabled by ‘-Wall’? I’m using
4.4.1, which is the latest released version AIUI, without having this
problem.
> --- a/libguile/conv-uinteger.i.c
> +++ b/libguile/conv-uinteger.i.c
> @@ -26,9 +26,10 @@
> TYPE
> SCM_TO_TYPE_PROTO (SCM val)
> {
> + scm_t_signed_bits n;
> if (SCM_I_INUMP (val))
> {
> - scm_t_signed_bits n = SCM_I_INUM (val);
> + n = SCM_I_INUM (val);
> if (n >= 0
> && ((scm_t_uintmax)n) >= TYPE_MIN && ((scm_t_uintmax)n) <= TYPE_MAX)
> return n;
Why does it help to move locals to the enclosing scope? I’d expect the
opposite.
Thanks for the report!
Ludo’.