Modify

Ticket #7095 (closed Bugs: fixed)

Opened 22 months ago

Last modified 22 months ago

warning: unrecognized __attribute__((__may_alias__))

Reported by: 1czajnik@… Owned by: igaztanaga
Milestone: To Be Determined Component: move
Version: Boost 1.50.0 Severity: Problem
Keywords: Cc:

Description

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

Attachments

Change History

comment:1 Changed 22 months ago by igaztanaga

  • Status changed from new to closed
  • Resolution set to fixed

Thanks for the report fixed in trunk at revision: 79424

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.