From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9003 invoked by alias); 26 Feb 2003 17:11:53 -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 8984 invoked by uid 48); 26 Feb 2003 17:11:52 -0000 Date: Wed, 26 Feb 2003 17:11:00 -0000 Message-ID: <20030226171152.8983.qmail@sources.redhat.com> To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, jcab@JCABs-Rumblings.com, nobody@gcc.gnu.org From: bangerth@dealii.org Reply-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 Subject: Re: c++/5763: [2003-01-20]Compiler uses the wrong type X-SW-Source: 2003-02/txt/msg01381.txt.bz2 List-Id: Synopsis: [2003-01-20]Compiler uses the wrong type State-Changed-From-To: open->analyzed State-Changed-By: bangerth State-Changed-When: Wed Feb 26 17:11:52 2003 State-Changed-Why: Confirmed. The code is illegal, but the error message we presently get from mainline are less than helpful: x.cc:15: error: ISO C++ forbids declaration of `iterator' with no type x.cc:15: error: cannot declare member `filter >::iterator' within `phase_2' x.cc:15: error: expected `;' x.cc:18: error: `phase_2::iter2' is not a class-name or namespace-name x.cc:18: error: expected constructor, destructor, or type conversion x.cc:18: error: expected `,' or `;' I think we should consider this a bug. The code is easily fixed, though, adding typename and template at the appropriate places in the typedef. It then also compiles with all versions of gcc. W. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5763