[Boost-bugs] [Boost C++ Libraries] #2225: gcc 4.4.0 pre-processor fails on BOOST_PP_ITERATION_DEPTH

Subject: [Boost-bugs] [Boost C++ Libraries] #2225: gcc 4.4.0 pre-processor fails on BOOST_PP_ITERATION_DEPTH
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-08-19 08:47:44


#2225: gcc 4.4.0 pre-processor fails on BOOST_PP_ITERATION_DEPTH
-----------------------------------------------------+----------------------
 Reporter: Chris Fairles <chris.fairles_at_[hidden]> | Owner: agurtovoy
     Type: Bugs | Status: new
Milestone: Boost 1.36.0 | Component: mpl
  Version: Boost 1.36.0 | Severity: Problem
 Keywords: |
-----------------------------------------------------+----------------------
 Due to a gcc pre-processor change (
 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36320 ), an #elif without a
 constant-expression that is not skipped by a previous #if/elif throws a
 syntax error. This occurs in MPL on lines like:

 #elif BOOST_PP_ITERATION_DEPTH() == 1

 when BOOST_PP_ITERATION_DEPTH is not defined. The cpp sees this as:
 #elif () == 1
 and then throws an error.

 Attached is a patch that fixes this by first testing if
 BOOST_PP_ITERATION_DEPTH is defined before testing the macro function
 expansion.

-- 
Ticket URL: <http://svn.boost.org/trac/boost/ticket/2225>
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:49:58 UTC