[config] does BOOST_ATTRIBUTE_UNUSED defined implies __attribute__((used)) exists ?
Hi, 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. Would it make sense to have an BOOST_ATTRIBUTE_USED in boost.config? Thanks, Raffi
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
participants (2)
-
Raffi Enficiaud
-
Steven Watanabe