From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30854 invoked by alias); 4 Nov 2002 01:56:02 -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 30826 invoked by uid 71); 4 Nov 2002 01:56:01 -0000 Resent-Date: 4 Nov 2002 01:56:01 -0000 Resent-Message-ID: <20021104015601.30824.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, jcab@JCABs-Rumblings.com Received: (qmail 15166 invoked by uid 61); 4 Nov 2002 01:52:01 -0000 Message-Id: <20021104015201.15165.qmail@sources.redhat.com> Date: Sun, 03 Nov 2002 17:56:00 -0000 From: jcab@JCABs-Rumblings.com Reply-To: jcab@JCABs-Rumblings.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/8442: Wrongful compiler error - file available X-SW-Source: 2002-11/txt/msg00140.txt.bz2 List-Id: >Number: 8442 >Category: c++ >Synopsis: Wrongful compiler error - file available >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Sun Nov 03 17:56:00 PST 2002 >Closed-Date: >Last-Modified: >Originator: jcab@JCABs-Rumblings.com >Release: MinGW 2.0.0-3 (GCC 3.2) >Organization: >Environment: Windows 2000, MinGW 2.0.0-3, Spirit 1.5.1 (latest CVS) >Description: You can download the file from here: http://home.JCABs-Rumblings.com/ftp/cpp_grammar_error.zip It's a ZIP archive including the preprocessed .ii file, the original C++ source file, and the error spew. You can read the tracking of the bug so far on the MinGW pages in SourceForge: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=632454&group_id=2435 Basically, when compiling the file, using this command: c:\mingw\bin\g++ -O2 -ftemplate-depth-500 -o cpp_grammar.o -c cpp_grammar.ii I get an error in a piece of code that looks like this: --- struct cpp_grammar: grammar { ... template struct definition: cpp_expressions { ... template < typename ParserT > struct brace_block_functor { ... }; template < typename ParserT > static functor_parser > // line 2306 brace_block(ParserT const& parser) { return brace_block_functor(parser); }; ... }; ... }; --- The error (sans the "instantiated from" super-spew) says this: --- cpp_grammar.cpp:2306: type/value mismatch at argument 1 in template parameter list for `template struct spirit::functor_parser' cpp_grammar.cpp:2306: expected a type, got `brace_block_functor' cpp_grammar.cpp:2306: confused by earlier errors, bailing out --- This is patently wrong. In fact, I have a CygWin with GCC 3.0.3 that compiles this program perfectly. In tracking this with the MinGW people, they've tried this file with the newest 3.3 compiler, and gotten other errors. >How-To-Repeat: Compile the cpp_grammar.ii file from the ZIP file above, using the following command line: c:\mingw\bin\g++ -O2 -ftemplate-depth-500 -o cpp_grammar.o -c cpp_grammar.ii >Fix: >Release-Note: >Audit-Trail: >Unformatted: