public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/30818]  New: [4.1.2 Regression] templates and typedefs cause function prototype not to match
@ 2007-02-16 10:30 sschunck at pdf dot de
  2007-02-16 11:25 ` [Bug c++/30818] [4.1/4.2/4.3 " rguenth at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: sschunck at pdf dot de @ 2007-02-16 10:30 UTC (permalink / raw)
  To: gcc-bugs

the following compiled fine on gcc-3.4.6 but gives error on gcc-4.1.2

error: prototype for 'typename A<T>::B::type A<T>::B::f()' does not match any
in class 'A<T>::B'
error: candidate is: typename A<T>::type A<T>::B::f()
error: template definition of non-template 'typename A<T>::B::type
A<T>::B::f()'


template < typename T > 
class A 
{
        typedef int type;
        class B;
};

template < typename T >
class A<T>::B
{
        typedef typename A<T>::type type;
        type g() { return 0;}
        type f();
};

template < typename T >
typename A<T>::B::type 
A<T>::B::f() { return 0; }

( I have no vanilla gcc available, so hopefully gentoo guys did not screw up
gcc-4.1.2 )

Using built-in specs.
Target: i686-pc-linux-gnu
Configured with:
/home/portage/portage/sys-devel/gcc-4.1.2/work/gcc-4.1.2/configure
--prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.1.2
--includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include
--datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.2
--mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.2/man
--infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.2/info
--with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4
--host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec
--enable-nls --without-included-gettext --with-system-zlib --disable-checking
--disable-werror --enable-secureplt --disable-libunwind-exceptions
--disable-multilib --disable-libmudflap --disable-libssp --disable-libgcj
--enable-languages=c,c++,fortran --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 4.1.2 (Gentoo 4.1.2)


-- 
           Summary: [4.1.2 Regression] templates and typedefs cause function
                    prototype not to match
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sschunck at pdf dot de
  GCC host triplet: i686-pc-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30818


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2009-03-30 21:35 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-16 10:30 [Bug c++/30818] New: [4.1.2 Regression] templates and typedefs cause function prototype not to match sschunck at pdf dot de
2007-02-16 11:25 ` [Bug c++/30818] [4.1/4.2/4.3 " rguenth at gcc dot gnu dot org
2007-02-16 13:47 ` rguenth at gcc dot gnu dot org
2007-02-21 15:23 ` rguenth at gcc dot gnu dot org
2007-03-05  3:58 ` mmitchel at gcc dot gnu dot org
2007-04-23 21:26 ` janis at gcc dot gnu dot org
2007-04-23 21:29 ` pinskia at gcc dot gnu dot org
2007-07-21 20:51 ` nathan at gcc dot gnu dot org
2007-07-22 16:26 ` nathan at gcc dot gnu dot org
2007-07-22 16:34 ` nathan at gcc dot gnu dot org
2007-07-23 19:24 ` [Bug c++/30818] [4.1/4.2 " rguenth at gcc dot gnu dot org
2008-07-04 21:58 ` [Bug c++/30818] [4.2 " jsm28 at gcc dot gnu dot org
2009-03-30 21:35 ` jsm28 at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).