lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] -W[no-]unused-variable


From: Vadim Zeitlin
Subject: Re: [lmi] -W[no-]unused-variable
Date: Tue, 26 Oct 2021 00:26:42 +0200

On Mon, 25 Oct 2021 22:19:42 +0000 Greg Chicares <gchicares@sbcglobal.net> 
wrote:

GC> On 10/24/21 11:31 AM, Vadim Zeitlin wrote:
GC> [...]
GC> >  One thing that I couldn't do in this commit was to remove the
GC> > 
GC> >     LMI_CXX_ADD_IF_SUPPORTED(-Wno-unused-variable)
GC> > 
GC> > line from configure. It was initially added as a workaround for warnings 
in
GC> > Boost, but removing it now uncovered that this warning also occurs for 
"f2"
GC> > and "f4" local variables in Ledger::make_evaluator().
GC> 
GC> Just now, I experimentally added that warning in 'workhorse.make':
GC> 
GC>    gcc_version_specific_cxx_warnings := \
GC>      -Wredundant-tags \
GC> +    -Wunused-variable \
GC>      -Wvolatile \
GC> 
GC> and rebuilt with pc-linux-gnu gcc-10.x, but didn't see any warning:
GC> 
GC>   g++ -MMD -MP -MT ledger_evaluator.o -MF ledger_evaluator.d  -c [...]
GC>  -Wzero-as-null-pointer-constant  -Wcast-qual  -Wredundant-tags 
-Wunused-variable -Wvolatile
GC>  -O2 -fno-omit-frame-pointer -ggdb  -fPIC   
/opt/lmi/src/lmi/ledger_evaluator.cpp -oledger_evaluator.o
GC> 
GC> Any idea why?
GC> 
GC> I'd like to test and compare several ideas for fixing it, but
GC> first I'd like to be able to reproduce it.

 For a moment I had a panic attack because I was afraid I forgot to send
the email in which I answered this yesterday, but I do see my answer in the
list archives:

   https://lists.nongnu.org/archive/html/lmi/2021-10/msg00027.html

so I did send it and it just looks like our emails have crossed, somehow,
and so you've probably already read my answer to this question in the
previous email. But, to be certain, let me write again that the reason you
can't reproduce it is that this warning is only given by clang and not gcc.

 Sorry again for forgetting to mention (or, rather just not realizing) this
initially,
VZ

Attachment: pgpOURkil2Du7.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]