[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Lots of -Wunused-command-line-argument warnings from clang
From: |
Thomas Dickey |
Subject: |
Re: Lots of -Wunused-command-line-argument warnings from clang |
Date: |
Mon, 2 Sep 2019 15:24:38 -0400 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Mon, Sep 02, 2019 at 08:35:40PM +0200, Sven Joachim wrote:
> On 2019-09-02 14:18 -0400, Thomas Dickey wrote:
>
> > On Mon, Sep 02, 2019 at 06:39:43PM +0200, Sven Joachim wrote:
> >> Building ncurses with clang produces the following warning (line-wrapped
> >> for readability) on every invocation of the compiler:
> >>
> >> ,----
> >> | clang: warning: argument unused during compilation:
> >> | '--param max-inline-insns-single=1200' [-Wunused-command-line-argument]
> >> `----
> >>
> >> It goes without saying that this makes build logs pretty much
> >> unreadable. :-(
> >>
> >> There are CF_CLANG_COMPILER and CF_C_INLINE functions in aclocal.m4
> >> which I think are meant to avoid this, but it does not work for me.
> >
> > I haven't updated those recently,
> > but in a quick check, don't see a new problem.
> >
> >> Tested with clang-8 and clang-7 on Debian unstable, but I think the
> >> problem had been around for quite a while already. I did not specify
> >> any fancy configure options, just ran
> >>
> >> ,----
> >> | $ ./configure CC=clang-7 CXX=clang++-7
> >> `----
> >>
> >> Any ideas?
> >
> > add --enable-warnings
> >
> > I seem to recall someone mentioning this recently: clang without any
> > options will warn about things that gcc does not. My macros are designed
> > to filter/amend/whatever when warnings are wanted.
>
> Thanks, --enable-warnings helped.
sounds good -- I'm reluctant to detect the compiler and work around
noise in the case where warnings aren't requested. That could change,
depending on what the compiler does, of course.
> > Of course doing that will show some warnings that you didn't see before,
> > but I work on those, to reduce them :-)
>
> Clang 8.0.1 prints only a few -Wcast-qual warnings.
those are expected (I don't see a way to improve those, within the
compatibility constraints). I've been seeing (and usually fixing)
warnings from recent gcc 8/9 for sprintf/strcpy/etc
--
Thomas E. Dickey <address@hidden>
https://invisible-island.net
ftp://ftp.invisible-island.net
signature.asc
Description: PGP signature