From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19430 invoked by alias); 12 Dec 2008 01:42:15 -0000 Received: (qmail 18543 invoked by uid 48); 12 Dec 2008 01:40:48 -0000 Date: Fri, 12 Dec 2008 01:42:00 -0000 Subject: [Bug c++/38501] New: typedef confuses the name of the template and the name of result X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "resume755 at mail dot ru" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-12/txt/msg01303.txt.bz2 typedef confuses the name of the template and the name of result: sh-3.2$ cat tloop_iterator.h #ifndef TLOOP_ITERATOR_H_ #define TLOOP_ITERATOR_H_ #include template struct loop_iterator : public T::iterator { }; template struct list : std::list { typedef loop_iterator loop_iterator; }; #endif Compiling this file: sh-3.2$ g++-4.1 tloop_iterator.h sh-3.2$ g++-4.2 tloop_iterator.h all right, but: sh-3.2$ g++-4.3 tloop_iterator.h tloop_iterator.h:14: error: declaration of ‘typedef struct loop_iterator > list::loop_iterator’ tloop_iterator.h:8: error: changes meaning of ‘loop_iterator’ from ‘struct loop_iterator >’ sh-3.2$ g++-4.3 --version g++-4.3 (Debian 4.3.2-1) 4.3.2 Copyright (C) 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. My system is Debian GLU/Linux Lenny Version 4.3.1 also has this problem -- Summary: typedef confuses the name of the template and the name of result Product: gcc Version: 4.3.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: resume755 at mail dot ru http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38501