[Boost-bugs] [Boost C++ Libraries] #8705: BOOST_PP_ENUM_SHIFTED doesn't work with Intel ICC

Subject: [Boost-bugs] [Boost C++ Libraries] #8705: BOOST_PP_ENUM_SHIFTED doesn't work with Intel ICC
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-06-17 20:04:30


#8705: BOOST_PP_ENUM_SHIFTED doesn't work with Intel ICC
------------------------------+---------------------------
 Reporter: pascal@… | Owner: no-maintainer
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: preprocessor
  Version: Boost 1.53.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------------
 Consider this example:

 {{{
 #include <boost/preprocessor/repetition.hpp>

 #define F(z, n, p) n
 #define INNER_NORMAL(z, n, p) f( BOOST_PP_ENUM(n, F, p) ) ;
 #define INNER_SHIFTED(z, n, p) f( BOOST_PP_ENUM_SHIFTED(n, F, p) ) ;

 shifted:
 BOOST_PP_REPEAT(4, INNER_SHIFTED, ~)

 expected:
 INNER_SHIFTED(~, 0, ~)
 INNER_SHIFTED(~, 1, ~)
 INNER_SHIFTED(~, 2, ~)
 INNER_SHIFTED(~, 3, ~)

 normal:
 BOOST_PP_REPEAT(4, INNER_NORMAL, ~)
 }}}

 With `clang++ -P -E` and `g++ -P -E` it expands correctly:

 {{{
 shifted:
 f( ) ; f( ) ; f( 1 ) ; f( 1 , 2 ) ;
 expected:
 f( ) ; f( ) ; f( 1 ) ; f( 1 , 2 ) ;
 normal:
 f( ) ; f( 0 ) ; f( 0 , 1 ) ; f( 0 , 1 , 2 ) ;
 }}}

 But `icpc -P -E` gets stuck:

 {{{
 shifted:
 f( BOOST_PP_ENUM_SHIFTED_1_2(0, F, ~) );
 f( BOOST_PP_ENUM_SHIFTED_1_2(1, F, ~) );
 f( BOOST_PP_ENUM_SHIFTED_1_2(2, F, ~) );
 f( BOOST_PP_ENUM_SHIFTED_1_2(3, F, ~) );
 expected:
 f( ); f( ); f( 1 ); f( 1, 2 );
 normal:
 f( ); f( 0 ); f( 0, 1 ); f( 0, 1, 2 );
 }}}

 I'm using *Intel(R) C++ Intel(R) 64 Compiler XE for applications running
 on Intel(R) 64, Version 13.1.1.163 Build 20130313*, not sure if it's a bug
 in ICC or in Boost.Preprocessor;

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8705>
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:13 UTC