This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/8442: Wrongful compiler error - file available
- From: jcab at JCABs-Rumblings dot com
- To: gcc-gnats at gcc dot gnu dot org
- Date: 4 Nov 2002 01:52:01 -0000
- Subject: c++/8442: Wrongful compiler error - file available
- Reply-to: jcab at JCABs-Rumblings dot com
>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<cpp_grammar> {
...
template <typename ScannerT>
struct definition:
cpp_expressions<ScannerT>
{
...
template < typename ParserT >
struct brace_block_functor {
...
};
template < typename ParserT >
static
functor_parser<brace_block_functor<ParserT> > //
line 2306
brace_block(ParserT const& parser) {
return brace_block_functor<ParserT>(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<class FunctorT> 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: