Boost logo

Boost :

Subject: Re: [boost] [config] Macro for unused declarations
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2013-10-19 15:00:26

On Saturday 19 October 2013 14:12:56 Jeremiah Willcock wrote:
> Would it be possible to have a macro for __attribute__((unused)) and
> similar pragmas to portably avoid "unused typedef" and related warnings
> (especially from recent versions of GCC)? I have mostly removed those in
> Boost.Graph, but there are some that need to remain---creating a typedef
> to a member type of a class to make sure that the member exists, for
> example. Thank you.

I wouldn't mind having BOOST_UNUSED or similar macro but not for this case.
IMHO, that kind of warning is useless and should be disabled by compiler
switches or #pragma gcc warning. It would probably be useful to file a ticket
to the GCC team to move the warning to some higher levels (-Wpedantic, is
it?). Silencing it by means of the attribute surely doesn't make the code

Boost list run by bdawes at, gregod at, cpdaniel at, john at