Boost logo

Boost :

From: Douglas Gregor (gregod_at_[hidden])
Date: 2001-07-10 11:15:54


On Tuesday 10 July 2001 08:15, you wrote:
> The "official" Boost.Function doesn't work for me anymore under g++
> 2.95.2/mingw:
>
> http://www.nanotech.wisc.edu/~khan/software/gnu-win32/gcc.html
>
> It used to work fine.
>
> In file included from \projects\include\boost\function\function10.hpp:39,
> from \projects\include\boost\function.hpp:33,
> from bind_test.cpp:23:
> \projects\include\boost\function\function_template.hpp: In method `void
> boost::d
> etail::function::function10_base<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,Policy,Mi
>x in,A
> llocator>::assign_to(FunctionPtr,
> boost::detail::function::function_ptr_tag)':
> \projects\include\boost\function\function_template.hpp:563: unknown escape
> seque
> nce `\p'
> \projects\include\boost\function\function_template.hpp:563: unknown escape
> seque
> nce `\i'
>
> --
> Peter Dimov
> Multi Media Ltd.

This appears to be a compiler bug. I was able to reproduce the bug on my
Win9x box, and it's a curious one. Notice the two escape sequences it is
complaining about, \p and \i, are the first two directory nesting levels? I
ended up with just one error per inclusion of function template, where it
complained about \d instead. My top-level directory structure is:
C:\Development\Boost\...

The \d is unknown (it complains), but \b is a known escape sequence, so it
doesn't complain.

Looking at the preprocessed output, it appears that the guilty lines look
something like this:
# 577 "c:\\development\\boost\\boost\\boost\\function\\function_template.hpp"

There are many other similar line directives that don't cause problems. Even
changing the above # to #line in the preprocessed output (and then compiling
the preprocessed source) fixes the problem.

This gets the #2 spot on the 'weirdest bugs' list, right behind MSVC's
token-eating habit. Any workaround ideas emphatically welcomed.

        Doug


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