Boost logo

Boost :

Subject: Re: [boost] [config] does BOOST_ATTRIBUTE_UNUSED defined implies __attribute__((used)) exists ?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2018-09-17 20:56:40


AMDG

On 09/17/2018 02:46 PM, Raffi Enficiaud via Boost wrote:
> I have a problem with symbol visibility in boost.test:
> https://github.com/boostorg/boost/pull/190
>
> I am wondering if __attribute__((used)) is a portable way to flag a
> static const ref as being used, or there are variations
> (__attribute__((used)) vs __attribute__((__used__))).
>
> I am also wondering if __attribute__((used)) can be considered as
> available if BOOST_ATTRIBUTE_UNUSED is defined.
>

  Probably not. Even if it works, it's purely by
coincidence. __attribute__((used)) and __attribute_((unused))
are completely different, even if the names are similar.

> Would it make sense to have an BOOST_ATTRIBUTE_USED in boost.config?
>

In Christ,
Steven Watanabe


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk