From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19999 invoked by alias); 5 Nov 2002 08:36:09 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 19984 invoked by uid 71); 5 Nov 2002 08:36:08 -0000 Date: Tue, 05 Nov 2002 00:36:00 -0000 Message-ID: <20021105083608.19972.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Juan Carlos Arevalo-Baeza Subject: Re: c++/8442: Wrongful compiler error - file available Reply-To: Juan Carlos Arevalo-Baeza X-SW-Source: 2002-11/txt/msg00201.txt.bz2 List-Id: The following reply was made to PR c++/8442; it has been noted by GNATS. From: Juan Carlos Arevalo-Baeza To: Cc: , , , Subject: Re: c++/8442: Wrongful compiler error - file available Date: Tue, 5 Nov 2002 00:36:05 -0800 On Mon, 4 Nov 2002 10:58:35 -0600 (CST), Wolfgang Bangerth= wrote: > >>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 > >Start from the .ii file you have. First delete all the # lines,= I use the >following perl script for that usually >perl -pi -s 's/^#.*\n//g;' your_file.ii >(This way, gcc tells you the real location in the file where= something is >happening, not the location in the file from which you generated= the .ii >file.) Then start deleting parts of the file that are not= necessary to >show the problem. (Function bodies, classes that are only= referenced in >the function bodies you deleted, classes and namespaces that= were only >used in classes and namespaces you deleted, etc). In the= beginning, the >pieces you scrap are usually small, but the blocks can become= very large >at the end, so don't be scared if you don't make much progress= in the >beginning. > >This is a tedious task, and may take an hour or two, but in the= end you >usually end up with something that has 10-50 lines of code and= still shows >the problem. With such an example, it is also possible for= someone who is >not used to your code to see whether this is wrong or right.= Otherwise, it >is very hard to see... Ok. I managed to do as you say (turned out step by step as you= say ), and boiled it down to this code: --- template < class FunctorT > struct functor_parser { }; template < typename ScannerT > struct definition { template < typename ParserT > struct brace_block_functor { }; template < typename ParserT > static functor_parser >* brace_block(ParserT const& parser) { // line 15 return 0; }; }; definition def; // line 20 --- Error spew: --- bug.ii: In instantiation of `definition': bug.ii:20: instantiated from here bug.ii:15: type/value mismatch at argument 1 in template= parameter list for ` template struct functor_parser' bug.ii:15: expected a type, got `brace_block_functor' bug.ii:15: confused by earlier errors, bailing out --- This is clearly wrong. =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