Hello,
I am trying to move a project of mine from gcc-3.1 to gcc-3.3 under
MacOS X Jaguar. I'm using Apple's developer tools with the December
2002 updater which included gcc-3.3. Everything compiles just fine
under 3.1 but I really need to use precompiled headers which does not
work very well. I have managed to precompile my prefix header using 3.3
and I can also compile most of my source files using it. However, as
soon as the compiler encounters a source file where Boost.Function is
used I get an internal compiler error.
So, I wrote a small program (included at the end of this email) which
demonstrates the error. It works just fine under 3.1 but not under 3.3.
Using preferred or portable syntax makes no difference.
Has anyone else experienced this problem, or has it been fixed in
Xcode? Perhaps I'm just doing something wrong? I'd really like to know
before I file a bug. (I did a couple of searches on lists.boost.org but
didn't find anything of interest.)
Thanks in advance,
Jens
------------------------------------------------------------
#include <iostream>
#include
void test( int x )
{
std::cout << x << std::endl;
}
int main( int argc, char* argv[] )
{
boost::function __test(test);
__test(5);
return 0;
}
------------------------------------------------------------
Which gives the following error:
/Development/Libraries/boost-1.30.2/boost/function/
function_template.hpp: In
member function `void boost::function1::assign_to(FunctionPtr,
boost::detail::function::function_ptr_tag) [with FunctionPtr = void
(*)(int), R = void, T0 = int, Allocator = std::allocator<void>]':
/Development/Libraries/boost-1.30.2/boost/function/
function_template.hpp:432: instantiated from `void
boost::function1::assign_to(Functor) [with Functor =
void (*)(int), R = void, T0 = int, Allocator = std::allocator<void>]'
/Development/Libraries/boost-1.30.2/boost/function/
function_template.hpp:293: instantiated from `boost::function1::function1(Functor, typename
boost::detail::function::enable_if::value>::value, int>::type) [with Functor = void
(*)(int), R = void, T0 = int, Allocator = std::allocator<void>]'
/Development/Libraries/boost-1.30.2/boost/function/
function_template.hpp:602: instantiated from `boost::function::function(Functor, typename
boost::detail::function::enable_if::value>::value, int>::type) [with Functor = void
(*)(int), R = void, T0 = int, Allocator = std::allocator<void>]'
test.cpp:12: instantiated from here
/Development/Libraries/boost-1.30.2/boost/function/
function_template.hpp:451: internal compiler error: in
c_expand_expr, at c-common.c:4752
Please submit a full bug report,
with preprocessed source if appropriate.
See URL:http://developer.apple.com/bugreporter for instructions.