|
Boost Users : |
Subject: Re: [Boost-users] [format] warning...warning...warning
From: Oswin Krause (Oswin.Krause_at_[hidden])
Date: 2017-03-24 07:10:19
On 2017-03-23 22:35, Steven Watanabe via Boost-users wrote:
> AMDG
>
> On 03/23/2017 01:51 PM, Oswin Krause wrote:
>> On 2017-03-23 16:43, Steven Watanabe via Boost-users wrote:
>>>
>>>> The warnings were as trivial as (for example):
>>>> ../ext/boost/boost/type_traits/is_default_constructible.hpp:16:22:
>>>> warning: "BOOST_GCC_VERSION_WORKAROUND_GUARD" is not defined
>>>> [-Wundef]
>>>> #if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40700)
>>>>
>>>
>>> <snip>
>>
>> in this specific case the warning is not a false positive, or useless,
>> at elast as far as i udnerstand it. BOOST_GCC_VERSION_WORKAROUND_GUARD
>> is really not defined anywhere in boost, so this #ifdef block will
>> never
>> be used.
>
> No, that's wrong. BOOST_WORKAROUND is intentionally
> written so that an undefined XXX_WORKAROUND_GUARD
> functions correctly. In fact, the sole purpose of
> BOOST_GCC_VERSION_WORKAROUND_GUARD is to suppress the
> warning about BOOST_GCC_VERSION not being defined
> (However, keeping a single global list of macros isn't
> scalable, and it appears that the list isn't up-to-date).
Hi,
the code in question has a special workaround for gcc that is only
supposed to be active for certain old GCCs (i think older than 4.0.7).
The macro is never defined, therefore the code is never active,
therefore it is likely broken on that compiler. Alternatively, this code
block is never active and therefore it is dead code. Again, the warning
hinted towards a problem of code quality degradation.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net