[C++-sig] Problem compiling V2 tests.

David Abrahams dave at boost-consulting.com
Sun Aug 4 15:15:03 CEST 2002


From: "David Abrahams" <dave at boost-consulting.com>



> The fact that there's an internal compiler error should be a pretty
strong
> hint that this is a bug in your compiler. Since I test with GCC 3.1
> regularly on at least 2 platforms, this is a bug in your particular GCC
3.1
> configuration, specifically in the preprocessor.
> > ---
> >
> > The preprocessor gives the following output for bases.hpp:
> >
> > ---
> > namespace boost { namespace python {
> >
> >   template<typename 0 = ::boost::mpl::null_argument,
> >            typename B1 = ::boost::mpl::null_argument,
> >            typename B2 = ::boost::mpl::null_argument,
> >            [...]
> >            typename B14 = ::boost::mpl::null_argument>
> >
> >   struct bases : ::boost::mpl::type_list<0, B1, B2, [...], B14>::type
{};
>
>
> Yep, you've got a preprocessor bug. That should be "typename B0 = ..."
> I suggest (strongly!) that you report the bug as specified by the error
> message, then consider ways to rebuild your preprocessor or compiler
which
> might work around the problem.

Paul (the preprocessor library guru) suggested a much more obvious
explanation: that you have

#define B0 0

somewhere in your translation unit
You might try adding #undef B0 somewhere near the top of bases.hpp, but
after its dependent #includes.

HTH,
Dave

P.S. You should still report the ICE, even if this fixes it!

-----------------------------------------------------------
           David Abrahams * Boost Consulting
dave at boost-consulting.com * http://www.boost-consulting.com







More information about the Cplusplus-sig mailing list