This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

c++/3943: Template function and using declaration



>Number:         3943
>Category:       c++
>Synopsis:       Template function and using declaration
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Sat Aug 04 20:26:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Franck Branjonneau
>Release:        3.0 (Debian) (Debian testing/unstable)
>Organization:
>Environment:
System: Linux alpha.tchume.net 2.4.4 #2 mar mai 22 08:16:07 CEST 2001 i586 unknown
Architecture: i586

	
host: i386-pc-linux-gnu
build: i386-pc-linux-gnu
target: i386-pc-linux-gnu
configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,objc --prefix=/usr --infodir=/share/info --mandir=/share/man --enable-shared --with-gnu-as --with-gnu-ld --with-system-zlib --enable-long-long --enable-nls --without-x --without-included-gettext --disable-checking --enable-threads=posix --enable-java-gc=boehm --with-cpp-install-dir=bin --enable-objc-gc i386-linux
>Description:
The following code:

namespace N {

template< int >
void f() {}

}

using N::f< 0 >;

doesn't compile. From codesourcery:

GCC Output

These are the results of processing your source code with the following command:

    g++ [input] 

Exit code: 256

Messages:

    /usr/tmp/@13172.7.cc:8: Internal error #384.
    /usr/tmp/@13172.7.cc:8: Internal compiler error in push_using_decl, at 
       cp/decl.c:4514

	
>How-To-Repeat:
	
>Fix:
	

Trivial work around:

namespace N {

template< int >
void f() {}

}

template< int x >
void f() { N::f< x >(); }




>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]