From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7852 invoked by alias); 13 Jan 2002 18:40:50 -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 7819 invoked by uid 61); 13 Jan 2002 18:40:50 -0000 Date: Sun, 13 Jan 2002 10:40:00 -0000 Message-ID: <20020113184050.7818.qmail@sources.redhat.com> To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, leonid_d@mail.ru, nobody@gcc.gnu.org From: rodrigc@gcc.gnu.org Reply-To: rodrigc@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, leonid_d@mail.ru, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org X-Mailer: gnatsweb 2.9.3 Subject: Re: c++/5367: -pedantic switch causes template compilation to fail X-SW-Source: 2002-01/txt/msg00478.txt.bz2 List-Id: Synopsis: -pedantic switch causes template compilation to fail State-Changed-From-To: open->feedback State-Changed-By: rodrigc State-Changed-When: Sun Jan 13 10:40:49 2002 State-Changed-Why: With gcc 3.0.3, if I compile your test case with: g++ -pedantic -c test.cpp I get the error: test.cpp:7: warning: ISO C++ forbids declaration of `iterator' with no type test.cpp:7: cannot declare member `std::map, std::allocator > >::iterator' within `TemplateA' If I change the line: typedef MyMap::iterator MyMapIterator; to: typedef typename MyMap::iterator MyMapIterator; then it can compile. Can you verify if this works for you? http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5367