all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Philipp Stephani <phst@google.com>
To: Paul Eggert <eggert@cs.ucla.edu>,
	Philipp Stephani <p.stephani2@gmail.com>,
	emacs-devel@gnu.org
Subject: Re: [PATCH] Clean up a couple of compiler warnings
Date: Tue, 23 May 2017 10:17:30 +0000	[thread overview]
Message-ID: <CAP-RRPvSi6qZDsf9D24Dth-oYtOPf3nAA2iDPPpbf9uya=0LVA@mail.gmail.com> (raw)
In-Reply-To: <7631cb49-7940-7758-9ec3-5530e0ab542e@cs.ucla.edu>

[-- Attachment #1: Type: text/plain, Size: 2442 bytes --]

Paul Eggert <eggert@cs.ucla.edu> schrieb am So., 21. Mai 2017 um 22:33 Uhr:

> Philipp Stephani wrote:
> > This apparently hasn't worked, at least I still get the warning, and
> > there's no -Wno-missing-braces in WARN_CFLAGS.
>
> My change didn't add -Wno-missing-braces; it removed -Wmissing-braces. This
> sufficed for Fedora 25 x86-64, which has clang 3.9.1.
>
> Perhaps you're running a different version of Clang, which is pickier? If
> so,
> you might try the attached patch; if it works, please feel free to install
> it.
>

I haven't tested it, but I'm pretty sure that adding -Wno-missing-braces
should work.
The warnings enabled for -Wall and -Wextra change from version to version,
so only leaving out -W... will often not be enough, it would be more
future-proof to explicitly specify -Wno... in all cases.


>
> > For Clang, it'd probably be better to use -Weverything and then disable
> > individual warnings with -Wno
>
> I'd rather not spend a lot of time worrying about warnings generated by
> compilers other than recent GCC, as there are too many compilers and too
> many
> false alarms and it's not worth the hassle.


But in practice, at least on Unix-like systems, only GCC and Clang matter,
and Clang is the primary and often the only compiler on systems such as
FreeBSD and macOS.


> If you'd like to take up the burden
> of pacifying Clang with tricks like the above, though, that should be
> fine, as
> long as it doesn't burden maintenance for the rest of us. If not, and if
> Clang
> continues to be a hassle, we can avoid much of the hassle by disabling
> warnings
> by default when the compiler is Clang.
>

It's not a trick. If you don't want the warning FOO to be shown, pass
-Wno-FOO. That should work consistently for both compilers and all
versions.
-- 

Google Germany GmbH
Erika-Mann-Straße 33
80636 München

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle

Diese E-Mail ist vertraulich. Wenn Sie nicht der richtige Adressat sind,
leiten Sie diese bitte nicht weiter, informieren Sie den Absender und
löschen Sie die E-Mail und alle Anhänge. Vielen Dank.

This e-mail is confidential. If you are not the right addressee please do
not forward it, please inform the sender, and please erase this e-mail
including any attachments. Thanks.

[-- Attachment #2: Type: text/html, Size: 3242 bytes --]

  reply	other threads:[~2017-05-23 10:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-18 20:24 [PATCH] Clean up a couple of compiler warnings Philipp Stephani
2017-05-18 20:40 ` Eli Zaretskii
2017-05-19  3:48 ` Paul Eggert
2017-05-19  6:53   ` Eli Zaretskii
2017-05-19  6:55     ` Paul Eggert
2017-05-19  9:31   ` Philipp Stephani
2017-05-21  6:07     ` Paul Eggert
2017-05-21 20:00       ` Philipp Stephani
2017-05-21 20:33         ` Paul Eggert
2017-05-23 10:17           ` Philipp Stephani [this message]
2017-05-23 17:36             ` Paul Eggert
2017-05-23 19:19               ` Eli Zaretskii
2017-05-23 19:21               ` Philipp Stephani
2017-05-21 20:47         ` Perry E. Metzger

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='CAP-RRPvSi6qZDsf9D24Dth-oYtOPf3nAA2iDPPpbf9uya=0LVA@mail.gmail.com' \
    --to=phst@google.com \
    --cc=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    --cc=p.stephani2@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.