From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30798 invoked by alias); 15 Apr 2003 13:56:01 -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 30770 invoked by uid 71); 15 Apr 2003 13:56:00 -0000 Resent-Date: 15 Apr 2003 13:56:00 -0000 Resent-Message-ID: <20030415135600.30769.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, adrin_jalali@yahoo.com Resent-Reply-To: gcc-gnats@gcc.gnu.org, Adrin_Jalali@yahoo.com Received: (qmail 29479 invoked by uid 48); 15 Apr 2003 13:54:59 -0000 Message-Id: <20030415135459.29478.qmail@sources.redhat.com> Date: Tue, 15 Apr 2003 13:56:00 -0000 From: Adrin_Jalali@yahoo.com Reply-To: Adrin_Jalali@yahoo.com To: gcc-gnats@gcc.gnu.org Cc: adrin_jalali@yahoo.com X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) X-GNATS-Notify: adrin_jalali@yahoo.com Subject: c++/10414: error in compiling a template X-SW-Source: 2003-04/txt/msg00678.txt.bz2 List-Id: >Number: 10414 >Category: c++ >Synopsis: error in compiling a template >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Tue Apr 15 13:56:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: adrin jalali >Release: gcc 3.2 >Organization: >Environment: Linux Redhat 7.3 & Linux Redhat 8.0 >Description: #include class First { public : template T *Func(int i) { printf("%d", i); return new T; } // End of : template T *Func(int i) }; // End of : class First class Second { private : First *m_Member; public : Second(void) { m_Member = new First; } // End of : Second(void) template T *f(int i) { return m_Member->Func(i); } // End of : template T *f(int i) }; // End of : class Second int main(void) { Second a; a.f(10); } // End of : int main(void) >How-To-Repeat: >Fix: May be it can be fixed by naming 2 functions the same. >Release-Note: >Audit-Trail: >Unformatted: