c++/3907: Inheritance of a by a generic member

fasbjx@libertysurf.fr fasbjx@libertysurf.fr
Tue Jul 31 17:46:00 GMT 2001


>Number:         3907
>Category:       c++
>Synopsis:       Inheritance of a by a generic member
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 31 17:46:01 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:

template< int zzzzzz >
struct T {
  enum E { };
};

template< int s >
struct U {};

template< int s >
struct C {

  template< int t >
  class S: U< s >::S< t > {};

  static T< s >::E t();
};

gives, 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/@13055.7.cc:15: declaration of `static typename T::E 
       C::t()'
    /usr/tmp/@13055.7.cc:12: changes meaning of `t' from `int t'

Note that in my environment, the message is slightly different:

test.test.cc:26: declaration of `static typename T<zzzzzz>::E C<s>::t()'
test.test.cc:23: changes meaning of `t' from `int t'

T<zzzzzz>::E !!! Are you confused ? ;-)

	
>How-To-Repeat:
	
>Fix:
	



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



More information about the Gcc-bugs mailing list