bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Bruno Haible <bruno@clisp.org>
To: "Tim Rühsen" <tim.ruehsen@gmx.de>
Cc: bug-gnulib@gnu.org
Subject: Re: FreeBSD: Warnings about c-ctype macros used but marked unused
Date: Wed, 28 Aug 2019 17:28:46 +0200	[thread overview]
Message-ID: <34825019.AQjT5cLexE@omega> (raw)
In-Reply-To: <ffd52b5f-a906-4fbf-e202-25fd7f13e582@gmx.de>

Hi Tim,

> FreeBSD clang version 6.0.0 (tags/RELEASE_600/final 326565) (based on
> LLVM 6.0.0)

OK.

> The option -Wused-but-marked-unused is indirectly activated by
> -Weverything

-Weverything is not something we can support in gnulib. For the
meaning of this option, see
https://quuxplusone.github.io/blog/2018/12/06/dont-use-weverything/

> which is set during the ./configure run (kind of a
> manywarnings module)

Why do we have a 'manywarnings' module, not an 'allwarnings' module?
Look into the list of warnings that we don't add through 'manywarnings':
  build-aux/gcc-warning.spec
  build-aux/g++-warning.spec

> And I wonder why do the c_ macros are marked
> UNUSED at all (I assume that gnulib does it for some reason) ?

'c-ctype' uses the module 'extern-inline'. In extern-inline.m4 you can
see that on platforms where 'extern inline' cannot properly be supported,
we let _GL_INLINE expand to 'static _GL_UNUSED'. Without '_GL_UNUSED',
gcc (with some appropriate, useful warning options) would complain that
the functions are not used.

The ability to use this warning option - which allows developers to
detect dead code - is more important than the option -Wused-but-marked-unused.

Bruno



  reply	other threads:[~2019-08-28 15:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-28 13:31 FreeBSD: Warnings about c-ctype macros used but marked unused Tim Rühsen
2019-08-28 14:09 ` Bruno Haible
2019-08-28 14:19   ` Tim Rühsen
2019-08-28 15:28     ` Bruno Haible [this message]
2019-08-28 18:08       ` Tim Rühsen

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

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=34825019.AQjT5cLexE@omega \
    --to=bruno@clisp.org \
    --cc=bug-gnulib@gnu.org \
    --cc=tim.ruehsen@gmx.de \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).