[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi] -W[no-]unused-variable [Was: Getting rid of the rest of Boost]
From: |
Greg Chicares |
Subject: |
[lmi] -W[no-]unused-variable [Was: Getting rid of the rest of Boost] |
Date: |
Mon, 25 Oct 2021 22:19:42 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 |
On 10/24/21 11:31 AM, Vadim Zeitlin wrote:
[...]
> One thing that I couldn't do in this commit was to remove the
>
> LMI_CXX_ADD_IF_SUPPORTED(-Wno-unused-variable)
>
> line from configure. It was initially added as a workaround for warnings in
> Boost, but removing it now uncovered that this warning also occurs for "f2"
> and "f4" local variables in Ledger::make_evaluator().
Just now, I experimentally added that warning in 'workhorse.make':
gcc_version_specific_cxx_warnings := \
-Wredundant-tags \
+ -Wunused-variable \
-Wvolatile \
and rebuilt with pc-linux-gnu gcc-10.x, but didn't see any warning:
g++ -MMD -MP -MT ledger_evaluator.o -MF ledger_evaluator.d -c [...]
-Wzero-as-null-pointer-constant -Wcast-qual -Wredundant-tags
-Wunused-variable -Wvolatile
-O2 -fno-omit-frame-pointer -ggdb -fPIC
/opt/lmi/src/lmi/ledger_evaluator.cpp -oledger_evaluator.o
Any idea why?
I'd like to test and compare several ideas for fixing it, but
first I'd like to be able to reproduce it.