From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Richard Copley Newsgroups: gmane.emacs.devel Subject: Re: C warning in MSYS2 build Date: Thu, 5 Oct 2017 21:08:06 +0100 Message-ID: References: <83inftwhlb.fsf@gnu.org> <281d43c7-b3a9-be40-a8e7-c8021c286f59@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1507234128 2222 195.159.176.226 (5 Oct 2017 20:08:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 5 Oct 2017 20:08:48 +0000 (UTC) Cc: Eli Zaretskii , Emacs Development To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 05 22:08:42 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e0CRk-0007rc-Gd for ged-emacs-devel@m.gmane.org; Thu, 05 Oct 2017 22:08:40 +0200 Original-Received: from localhost ([::1]:41869 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0CRo-0004jr-QP for ged-emacs-devel@m.gmane.org; Thu, 05 Oct 2017 16:08:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41278) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0CRi-0004iw-M2 for emacs-devel@gnu.org; Thu, 05 Oct 2017 16:08:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e0CRh-00007W-Jz for emacs-devel@gnu.org; Thu, 05 Oct 2017 16:08:38 -0400 Original-Received: from mail-ua0-x233.google.com ([2607:f8b0:400c:c08::233]:55866) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e0CRh-00006Y-FT; Thu, 05 Oct 2017 16:08:37 -0400 Original-Received: by mail-ua0-x233.google.com with SMTP id b11so9879834uae.12; Thu, 05 Oct 2017 13:08:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=k8fFRUG9OxQ36GkLjLrtwrMzSIJG9R0WU2lfKbY3eTo=; b=mUiBtmAiSUpeuddj3himZGTd6I7jmiRpdkOtBJIJXdnf6q+JnO3dCAeugrywuAKI33 E7hnI+cvYAafwu283lZqR5kwMXaz+TjGH0T/czWm6Nl/HaWr0FGy74Rn0vXp1g0XNioD sQrVmdX+xyAGe+FZMpCVwu1L3PFJ0SSq/Si1PN4LgE7pZS9Iyz0HO33mjIgKERdHilfi DKs8n8dCjjLXFDH41zKepk4gLEYjzuWEEPd5fbitr9+PCZvLrQbMnSTahDVeIGrTYKFl mnZh/whj8EEagrw+1t1hXnrcR/JRnNKmWrOGrGl9xUnaEi/jRw2Bs60/fxeGXndAq+3Z 1OuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=k8fFRUG9OxQ36GkLjLrtwrMzSIJG9R0WU2lfKbY3eTo=; b=UGAPseIh7Rmsg2ILCqTwpBLHD+6QvNFtIb5BeOf1JOLD3TULCkOEiFNdhgYRq2EDn1 uRAC93dgkaRUFlbXFxgy1EHDDzRnn0bBdilEh+06Cd5EovDjfw7IpWVAQDhF+qJFHEZ9 e5GGRPixjcHfuEcybFHOAFthIqGQLKGubp/VBan8KmRqd5hcH+1HfZ5oy/oxndKjC+mR Ca3s5eRHnQjjwpyY3vOGBhFAQGOHva5IdcF4aFw0LFK8aVTqyXrOUKlJ4Icu88V5x4BX Y7Mo8yNZU/iF+MVlVeJtsRo3kaXjS7wzEzu4v4aamse5GHHYzbrawuFz0W+kwKU1CM2K l7vQ== X-Gm-Message-State: AMCzsaVfar5hT+KbQ9l43IqEexz1zT6hwZyst8znZ0zh3RsGBMnULycF re6kL9iHadyKaFTSceSdiE0tJk8rhczQvfUm8IM= X-Google-Smtp-Source: AOwi7QAHRZwgqTFi1Kdp1JiN9q/kyfea2Nt2rAlGS3/iB/TTLzn39ceaC3q059MMVSI1lF6HdDHl52HqxRvvoQwHST0= X-Received: by 10.159.39.97 with SMTP id a88mr5482024uaa.178.1507234116868; Thu, 05 Oct 2017 13:08:36 -0700 (PDT) Original-Received: by 10.176.22.114 with HTTP; Thu, 5 Oct 2017 13:08:06 -0700 (PDT) In-Reply-To: <281d43c7-b3a9-be40-a8e7-c8021c286f59@cs.ucla.edu> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400c:c08::233 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:219145 Archived-At: On 5 October 2017 at 20:32, Paul Eggert 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.