all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Richard Copley <rcopley@gmail.com>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: Eli Zaretskii <eliz@gnu.org>, Emacs Development <emacs-devel@gnu.org>
Subject: Re: C warning in MSYS2 build
Date: Thu, 5 Oct 2017 21:08:06 +0100	[thread overview]
Message-ID: <CAPM58oiHS+-52PenZJunFSX2Qw6i03=Yu56kPJ+_sYWBSe6xAA@mail.gmail.com> (raw)
In-Reply-To: <281d43c7-b3a9-be40-a8e7-c8021c286f59@cs.ucla.edu>

On 5 October 2017 at 20:32, Paul Eggert <eggert@cs.ucla.edu> wrote:
> On 10/05/2017 11:54 AM, Eli Zaretskii wrote:
>>
>> Thanks, but it isn't new.
>
> In my experience this kind of warning can appear and vanish almost at whim:
> compiling at a different optimization levels, or changing compilation in
> some other way, can cause GCC to omit or include the warning. So possibly
> Richard wasn't getting the warning a day ago, but got the warning after
> changing from -O2 to -O0 (or whatever), or by upgrading GCC.
>
> If it's a major annoyance we could disable --Wnull-dereference for indent.c.
> I hope that's not needed, though.
>
> Come to think of it, last year I filed a GCC bug report about a similar
> problem with lib-src/etags.c and -Wnull-dereference, here:
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71157
>
> The GCC bug is not fixed yet. etags.c confused GCC by using an assignment
> inside an 'if' expression, which is contrary to the usual GNU style, and
> last year I worked around the GCC bug by changing etags.c to use a cleaner
> style. I notice that indent.c also has an assignment inside an 'if'
> expression that is relevant to these warnings. Richard, does it help to
> recode indent.c to use the usual GNU style, as in the attached patch? If so,
> let's do that instead. (Perhaps we should do that anyway....)

Thanks Eli and Paul.
The warnings don't change with that patch.
FWIW it seems to me that the results of the buffer_display_table calls
in c_string_width and lisp_string_width are dereferenced unchecked,
in character.c.



  reply	other threads:[~2017-10-05 20:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-05 17:44 C warning in MSYS2 build Richard Copley
2017-10-05 18:54 ` Eli Zaretskii
2017-10-05 19:32   ` Paul Eggert
2017-10-05 20:08     ` Richard Copley [this message]
2017-10-05 22:44       ` Paul Eggert
2017-10-06 15:16     ` Richard Stallman
2017-10-06 17:23       ` Richard Copley

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='CAPM58oiHS+-52PenZJunFSX2Qw6i03=Yu56kPJ+_sYWBSe6xAA@mail.gmail.com' \
    --to=rcopley@gmail.com \
    --cc=eggert@cs.ucla.edu \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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.