Modify

Opened 5 years ago

Closed 5 years ago

#7095 closed Bugs (fixed)

warning: unrecognized __attribute__((__may_alias__))

Reported by: 1czajnik@… Owned by: Ion Gaztañaga
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 (0)

Change History (1)

comment:1 Changed 5 years ago by Ion Gaztañaga

Resolution: fixed
Status: newclosed

Thanks for the report fixed in trunk at revision: 79424

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ion Gaztañaga.
The resolution will be deleted.

Add Comment


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

 
Note: See TracTickets for help on using tickets.