testcase: === Cut === #if !defined(BOOST_PP_IS_ITERATING) #elif BOOST_PP_ITERATION_DEPTH() == 1 #endif === Cut === error: missing binary operator before token "(" from reading the PR36320, this behaviour doesn't seem to be intended. It was intended to only add a check for non-null argument.
By my reading of the standard, issuing an error here is correct. The restrictions on #elif are only lifted if it is in a skipped group. But, in this case, it is not.
so the code should be changed to #elif defined(BOOST_PP_ITERATION_DEPTH) && BOOST_PP_ITERATION_DEPTH() == 1 ? it is confusing that #elif behaves more like "#if" and not like "#else\n#if"
Sorry, I somehow missed the followup comment. >> #elif defined(BOOST_PP_ITERATION_DEPTH) && BOOST_PP_ITERATION_DEPTH() == 1 The expression has to be valid after preprocessing. So, if BOOST_PP_ITERATION_DEPTH is not defined, this will yield an error. >> it is confusing that #elif behaves more like "#if" and not like "#else\n#if" I agree, but by my reading this is what the standard actually says. I am open to arguments contrariwise, or to rulings from gcc developers more expert at standardese than I.
well, lets keep it at that for now
*** Bug 37518 has been marked as a duplicate of this bug. ***
*** Bug 37781 has been marked as a duplicate of this bug. ***
Note that this has been fixed in Boost SVN repository recently (http://svn.boost.org/trac/boost/ticket/2069).
*** Bug 38161 has been marked as a duplicate of this bug. ***
Hello. I'm in a position in which I cannot upgrade my Boost libraries right now. So, is there a way that I can tell gcc to ignore this warning for now? Thanks in advance.
Subject: Re: PR36320 breaks boost On Thu, 6 May 2010, knocte at gmail dot com wrote: > ------- Comment #9 from knocte at gmail dot com 2010-05-06 18:02 ------- > Hello. > > I'm in a position in which I cannot upgrade my Boost libraries right now. > > So, is there a way that I can tell gcc to ignore this warning for now? No.
Reopening to ...
Suspend based on the defect report.
*** Bug 260998 has been marked as a duplicate of this bug. *** Seen from the domain http://volichat.com Marked for reference. Resolved as fixed @bugzilla.
http://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_412.htm
Looks like there is TR about this now as far as I can tell from Feb 2012.
*** Bug 80231 has been marked as a duplicate of this bug. ***
Dup. *** This bug has been marked as a duplicate of bug 60570 ***