Subject: [Boost-bugs] [Boost C++ Libraries] #7095: warning: unrecognized __attribute__((__may_alias__))
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-07-06 09:47:20
#7095: warning: unrecognized __attribute__((__may_alias__))
--------------------------------+-------------------------------------------
Reporter: 1czajnik@⦠| Owner: igaztanaga
Type: Bugs | Status: new
Milestone: To Be Determined | Component: move
Version: Boost 1.50.0 | Severity: Problem
Keywords: |
--------------------------------+-------------------------------------------
Hello,
boost/move.hpp contains:
{{{
//Move emulation rv breaks standard aliasing rules so add workarounds for
some compilers
#ifdef __GNUC__
#define BOOST_MOVE_ATTRIBUTE_MAY_ALIAS __attribute__((__may_alias__))
#else
#define BOOST_MOVE_ATTRIBUTE_MAY_ALIAS
#endif
}}}
and using {{{__attribute__((__may_alias__))}}} causes a warning on my TI
compiler.
Would a fix by guarding against {{{__GNUC__>=4}}} be welcome, or are there
some {{{__GNUC__=3}}} compilers, that need this pragma to be enabled?
{{{
Index: move.hpp
===================================================================
--- move.hpp (revision 0)
+++ move.hpp (revision 1)
@@ -217,7 +217,7 @@
#if defined(BOOST_NO_RVALUE_REFERENCES) &&
!defined(BOOST_MOVE_DOXYGEN_INVOKED)
//Move emulation rv breaks standard aliasing rules so add workarounds
for some compilers
- #ifdef __GNUC__
+ #if defined(__GNUC__) && (__GNUC__ >= 4)
#define BOOST_MOVE_ATTRIBUTE_MAY_ALIAS
__attribute__((__may_alias__))
#else
#define BOOST_MOVE_ATTRIBUTE_MAY_ALIAS
}}}
Regards,
Kris
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7095> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:10 UTC