This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c++/8442: Wrongful compiler error - file available


On 4 Nov 2002 15:55:11 -0000, bangerth@dealii.org wrote:
>Synopsis: Wrongful compiler error - file available
>
>I can confirm the messages on Linux from your preprocessed
>sources, but it is very hard to tell whether they are justfied
>or not, as the file has some 59,000 lines and invokes all
>kinds of template stuff (not that I would be unused to that
>but this seems messy).

   Yes, Spirit is a complex beast. I'm sorry about that. I've tried extracting the error bits, but I've been uncuccessful so far. It seems to me that something in the chain of template instantiations is fooling the compiler into thinking that either brace_block_functor is not in scope, or something like that.

>Could you try to condense the
>problem into a smaller testcase where it is simpler to
>see whether the error is justified or not?

   Maybe I can condense the error as I see it here. The code looks like this:

(line 2304.cpp, line 60573.ii)
template < typename ParserT >
static
functor_parser<this_t::brace_block_functor<ParserT> >
brace_block(ParserT const& parser) {
    return brace_block_functor<ParserT>(parser);
};

functor_parser is a template class that takes a single type parameter, and can be implicitly constructed from that type. Defined in line 50729.ii.

brace_block_functor is defined in the same scope as the brace_block file above, as a template class that takes a single template parameter.

this_t is the current scope (class scope), but it is inconsequential (it was a test trying to track down this problem). You get the same error without it.

   For some reason, according to the error messages, the compiler thinks that brace_block_functor should be a type, instead of a template.

   I tried generating similar situations using simpler code, without success. The problem is that the call to this function is generated kind of deep into the template instantiations, and extracting the call doesn't seem to show the problem.

   I'll keep trying. Thanx!

   Salutaciones,
                    JCAB
email: jcab@JCABs-Rumblings.com
ICQ: 10913692 @WORK: 101728263
WWW: http://www.JCABs-Rumblings.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]