Boost logo

Boost :

From: Doug Gregor (dgregor_at_[hidden])
Date: 2007-04-27 14:57:16


On Apr 27, 2007, at 1:47 PM, Eric Niebler wrote:
> This is going to be very useful, thanks Doug. From the regression
> reports (http://tinyurl.com/2uvxrz), I see this version of GCC is not
> happy at all with xpressive. There are at least two problems:
>
> In file included from ../boost/detail/atomic_count.hpp:97,
> from
> ../boost/xpressive/detail/utility/counted_base.hpp:12,
> from ../boost/xpressive/detail/dynamic/
> matchable.hpp:21,
> from ../boost/xpressive/detail/core/access.hpp:18,
> from ../boost/xpressive/detail/core/state.hpp:18,
> from ../boost/xpressive/regex_algorithms.hpp:21,
> from ../libs/xpressive/test/
> test_regex_algorithms.cpp:8:
> ../boost/detail/atomic_count_gcc.hpp:20:28: error: bits/
> atomicity.h: No
> such file or directory
>
>
> This could be that the test machine is misconfigured, or that
> atomic_count.hpp needs a patch for this version of GCC.

GCC 4.3 has moved this header into ext/atomicity.h and all of its
functions into namespace __gnu_cxx.

> The other problem is:
> ../boost/xpressive/detail/core/state.hpp:95: error: declaration of
> 'typedef struct boost::xpressive::detail::match_context<BidiIter>
> boost::xpressive::detail::match_state<BidiIter>::match_context'
> ../boost/xpressive/detail/core/state.hpp:33: error: changes meaning of
> 'match_context' from 'struct
> boost::xpressive::detail::match_context<BidiIter>'
>
>
> The code it's complaining about looks like:
>
> template<typename BidiIter>
> struct match_state
> : noncopyable
> {
> typedef BidiIter iterator;
> typedef core_access<BidiIter> access;
> typedef match_context<BidiIter> match_context;
>
>
> It seems this version of GCC doesn't like my typedef'ing of
> match_context<It> to match_context. I think this is a compiler bug.
>
> Where should I report this bug?

The bug also occurs on mainline GCC 4.3 (without my changes), so
please report it to the Bugzilla system on gcc.gnu.org. Here's a
shorter test case:

   template<typename Iter> struct match_context { };

   template<typename BidIter>
   struct match_state
   {
     typedef match_context<BidIter> match_context;
   };

        - Doug


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk