Boost C++ Libraries: Ticket #7095: warning: unrecognized __attribute__((__may_alias__)) https://svn.boost.org/trac10/ticket/7095 <p> Hello, </p> <p> boost/move.hpp contains: </p> <pre class="wiki">//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 </pre><p> and using <code>__attribute__((__may_alias__))</code> causes a warning on my TI compiler. </p> <p> Would a fix by guarding against <code>__GNUC__&gt;=4</code> be welcome, or are there some <code>__GNUC__=3</code> compilers, that need this pragma to be enabled? </p> <pre class="wiki">Index: move.hpp =================================================================== --- move.hpp (revision 0) +++ move.hpp (revision 1) @@ -217,7 +217,7 @@ #if defined(BOOST_NO_RVALUE_REFERENCES) &amp;&amp; !defined(BOOST_MOVE_DOXYGEN_INVOKED) //Move emulation rv breaks standard aliasing rules so add workarounds for some compilers - #ifdef __GNUC__ + #if defined(__GNUC__) &amp;&amp; (__GNUC__ &gt;= 4) #define BOOST_MOVE_ATTRIBUTE_MAY_ALIAS __attribute__((__may_alias__)) #else #define BOOST_MOVE_ATTRIBUTE_MAY_ALIAS </pre><p> Regards, Kris </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7095 Trac 1.4.3 Ion Gaztañaga Wed, 11 Jul 2012 18:00:03 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/7095#comment:1 https://svn.boost.org/trac10/ticket/7095#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Thanks for the report fixed in trunk at revision: 79424 </p> Ticket