From: handa <handa@m17n.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: 8697@debbugs.gnu.org
Subject: bug#8697: possibly-uninitialized variables in find_automatic_composition
Date: Thu, 19 May 2011 10:32:54 +0900 [thread overview]
Message-ID: <tl7tycr4gqh.fsf@m17n.org> (raw)
In-Reply-To: <4D841112.50403@cs.ucla.edu> (message from Paul Eggert on Fri, 18 Mar 2011 19:12:34 -0700)
Very sorry for the late response on this matter.
In article <4D841112.50403@cs.ucla.edu>, Paul Eggert <eggert@cs.ucla.edu> writes:
> In the Emacs trunk, src/composite.c's find_automatic_composition has
> two local variables 'check' and 'prev' that gcc -Wuninitialized warns
> as being possibly being uninitialized when used. This function has
> multiple gotos and dependencies on data structures that I don't
> understand, so it's not clear to me that GCC is wrong here. So I'm
> filing a bug report in the hopes that someone more expert can look at it.
> I plan to work around the diagnostic by committing the following
> change, which adds a FIXME comment asking for initial value if needed,
> and for the comment to be removed if the code is OK as-is. IF_LINT
> is used to tell GCC not to issue a warning here, for now.
> I'm CC:ing this to Kenichi Handa, who committed the code in question,
> to give him a heads-up about the problem.
Actually, those local variables are surely initialized when
used. But as they are initialized under a specific
condition (e.g. check_val is set to non-nil) and used under
the same condition, it's difficult for gcc to detect that.
Anyway, I've just committed an inproved version of
find_automatic_composition, and gcc won't complain about it
now.
2011-05-18 Kenichi Handa <handa@m17n.org>
* composite.c (CHAR_COMPOSABLE_P): Add more check for efficiency.
(BACKWARD_CHAR): Wrap the arg STOP by parenthesis.
(find_automatic_composition): Mostly rewrite for efficiency.
---
Kenichi Handa
handa@m17n.org
prev parent reply other threads:[~2011-05-19 1:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-19 2:12 bug#8290: possibly-uninitialized variables in find_automatic_composition Paul Eggert
2011-05-19 1:32 ` handa [this message]
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=tl7tycr4gqh.fsf@m17n.org \
--to=handa@m17n.org \
--cc=8697@debbugs.gnu.org \
--cc=eggert@cs.ucla.edu \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
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.