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

Juan Carlos Arevalo-Baeza jcab@JCABs-Rumblings.com
Mon Nov 4 08:56:00 GMT 2002


The following reply was made to PR c++/8442; it has been noted by GNATS.

From: Juan Carlos Arevalo-Baeza <jcab@JCABs-Rumblings.com>
To: <bangerth@dealii.org>, <gcc-bugs@gcc.gnu.org>,
	<gcc-prs@gcc.gnu.org>, <jcab@JCABs-Rumblings.com>,
	<nobody@gcc.gnu.org>, <gcc-gnats@gcc.gnu.org>,
	<gcc-bugs@gcc.gnu.org>, <gcc-prs@gcc.gnu.org>, <nobody@gcc.gnu.org>
Cc:  
Subject: Re: c++/8442: Wrongful compiler error - file available
Date: Mon, 4 Nov 2002 08:48:05 -0800

 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!
 
 =A0=A0=A0Salutaciones,
 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0JCAB
 email: jcab@JCABs-Rumblings.com
 ICQ: 10913692 @WORK: 101728263
 WWW: http://www.JCABs-Rumblings.com
 



More information about the Gcc-prs mailing list