From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1149 invoked by alias); 28 Aug 2002 14:06:02 -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 1129 invoked by uid 71); 28 Aug 2002 14:06:01 -0000 Resent-Date: 28 Aug 2002 14:06:01 -0000 Resent-Message-ID: <20020828140601.1128.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 Resent-Reply-To: gcc-gnats@gcc.gnu.org, acm@alumni.brown.edu Received: (qmail 625 invoked by uid 61); 28 Aug 2002 14:02:57 -0000 Message-Id: <20020828140257.624.qmail@sources.redhat.com> Date: Wed, 28 Aug 2002 07:56:00 -0000 From: acm@alumni.brown.edu Reply-To: acm@alumni.brown.edu To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/7745: gcc 3.2 rejects legal member template overload X-SW-Source: 2002-08/txt/msg00586.txt.bz2 List-Id: >Number: 7745 >Category: c++ >Synopsis: gcc 3.2 rejects legal member template overload >Confidential: no >Severity: critical >Priority: medium >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Wed Aug 28 07:06:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Andrew Morrow >Release: gcc version 3.2 >Organization: >Environment: System: SunOS 5.8 Generic_108528-13 sun4u sparc SUNW,UltraAX-i2 Architecture: sun4 host: sparc-sun-solaris2.8 >Description: In attached code, the second overload of the member template create in class Factory is rejected in gcc 3.2. This construction was accepted in 3.1 (as well as Forte 6U2 and the comeau online front end) and appears to be legal. Output data: g++ -v -save-temps member_template_failure.cpp Reading specs from /usr/local/software/gcc-3.2/lib/gcc-lib/sparc-sun-solaris2.8/3.2/specs Configured with: ../../gcc-3.2/configure --prefix=/usr/local/software/gcc-3.2 --enable-languages=c,c++ --disable-nls --enable-shared --enable-threads Thread model: posix gcc version 3.2 /usr/local/software/gcc-3.2/lib/gcc-lib/sparc-sun-solaris2.8/3.2/cpp0 -lang-c++ -D__GNUG__=3 -D__DEPRECATED -D__EXCEPTIONS -v -D__GNUC__=3 -D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=0 -D__GXX_ABI_VERSION=102 -Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -D__PRAGMA_REDEFINE_EXTNAME -D__sparc__ -D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__PRAGMA_REDEFINE_EXTNAME -D__sparc -D__sun -D__unix -Asystem=unix -Asystem=svr4 -D__NO_INLINE__ -D__STDC_HOSTED__=1 -D_XOPEN_SOURCE=500 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -D__EXTENSIONS__ -D__SIZE_TYPE__=unsigned int -D__PTRDIFF_TYPE__=int -D__WCHAR_TYPE__=long int -D__WINT_TYPE__=long int -D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc member_template_failure.cpp member_template_failure.ii GNU CPP version 3.2 (cpplib) (sparc ELF) ignoring nonexistent directory "/usr/local/software/gcc-3.2/sparc-sun-solaris2.8/include" #include "..." search starts here: #include <...> search starts here: /usr/local/software/gcc-3.2/include/c++/3.2 /usr/local/software/gcc-3.2/include/c++/3.2/sparc-sun-solaris2.8 /usr/local/software/gcc-3.2/include/c++/3.2/backward /usr/local/include /usr/local/software/gcc-3.2/include /usr/local/software/gcc-3.2/lib/gcc-lib/sparc-sun-solaris2.8/3.2/include /usr/include End of search list. /usr/local/software/gcc-3.2/lib/gcc-lib/sparc-sun-solaris2.8/3.2/cc1plus -fpreprocessed member_template_failure.ii -quiet -dumpbase member_template_failure.cpp -version -o member_template_failure.s GNU CPP version 3.2 (cpplib) (sparc ELF) GNU C++ version 3.2 (sparc-sun-solaris2.8) compiled by GNU C version 3.2. member_template_failure.cpp:20: `template _Interface_* Factory::create() const' and `template Interface* Factory::create() const' cannot be overloaded member_template_failure.cpp:32: prototype for `_Interface_* Factory::create() const' does not match any in class `Factory' member_template_failure.cpp:17: candidate is: template Interface* Factory::create() const member_template_failure.cpp:32: template definition of non-template ` _Interface_* Factory::create() const' member_template_failure.cpp: In function `int main(int, char**)': member_template_failure.cpp:42: no matching function for call to `Factory:: create()' >How-To-Repeat: Compile attached file member_template_failure.cpp. This file does not include any headers, and so is submitted as source, not preprocessed output. >Fix: >Release-Note: >Audit-Trail: >Unformatted: