all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Richard Copley <rcopley@gmail.com>, emacs-devel@gnu.org
Subject: Re: GCC 7 warnings
Date: Sat, 9 Sep 2017 11:27:40 -0700	[thread overview]
Message-ID: <271de726-eae7-640f-456b-4e31c6dfff7f@cs.ucla.edu> (raw)
In-Reply-To: <831snfx2xy.fsf@gnu.org>

Eli Zaretskii wrote:
> Paul, why do we use level 5 here, instead of using level 3, the
> default?  Level 3 supports the /* FALLTHROUGH */ and similar comments
> that indicate a fall-through in a more portable way.

Those comments have problems of their own, as they don't play well with macros 
and with non-GCC auditing tools that look at preprocessor output. So in other 
GNU projects we use level 5. It's easy enough to use it portably, and we've done 
that elsewhere in Emacs with the FALLTHROUGH macro. I just never noticed 
tparam.c since I never compiled it. I fixed it just now.

Many of the problems you ran into are because of my 2016-05-30 patch "Omit 
IF_LINT code that no longer seems needed" that simplified the code by assuming a 
recent-enough GCC for --enable-gcc-warnings.

There is a tradeoff for --enable-gcc-warnings. If we try to support ancient GCC 
compilers, we'll have to complicate the code and consume scarce maintenance 
resources. If we support only the latest GCC, developers using slightly-older 
GCCs will get some annoying warnings when they use --enable-gcc-warnings. I 
prefer to push the bleeding edge here, and ask developers who use 
--enable-gcc-warnings to at most (say) a year-old GCC version, as this saves 
some work for the rest of us. Of course we can't expect everybody to immediately 
sync to the latest GCC when released, but on the other hand there is a cost to 
supporting too-old GCCs, a cost I'd rather not pay (since I bear a good deal of 
it...).

By the way, I find the UNINIT macro to be more readable than supplying nonce 
expressions, as UNINIT clearly indicates to the reader that the variable is 
intended to be uninitialized. So I used that as part of my fixups. The 
pre-2016-05-30 version of the code was using UNINIT anyway.



  reply	other threads:[~2017-09-09 18:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-09 16:16 GCC 7 warnings Eli Zaretskii
2017-09-09 18:27 ` Paul Eggert [this message]
2017-09-09 19:29   ` Eli Zaretskii
2017-09-09 20:30     ` Paul Eggert

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=271de726-eae7-640f-456b-4e31c6dfff7f@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rcopley@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.
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.