public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14622] New: type mismatch in explicit template instantiation not detected
@ 2004-03-17 22:19 jens dot maurer at gmx dot net
  2004-03-18  0:19 ` [Bug c++/14622] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 5+ messages in thread
From: jens dot maurer at gmx dot net @ 2004-03-17 22:19 UTC (permalink / raw)
  To: gcc-bugs

The following code should produce an error for the explicit
template instantiation, because the type given for the static variable
doesn't match the one in the class template.  None of the following
gcc versions produces an error:

gcc version 2.95.3 20010315 (release)
gcc version 3.3
gcc version 3.5.0 20040118 (experimental)
gcc version 3.5.0 20040317 (experimental)



template<class T>
class A
{
  static T a;
};

template<class T>
T A<T>::a;

class B
{ };

template
int A<B>::a;       // type mismatch

-- 
           Summary: type mismatch in explicit template instantiation not
                    detected
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jens dot maurer at gmx dot net
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

end of thread, other threads:[~2007-09-04 15:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-14622-1824@http.gcc.gnu.org/bugzilla/>
2007-02-04 21:30 ` [Bug c++/14622] type mismatch in explicit template instantiation not detected patchapp at dberlin dot org
2007-02-12 22:17 ` simartin at gcc dot gnu dot org
2007-02-12 22:25 ` simartin at gcc dot gnu dot org
2007-09-04 15:01 ` pcarlini at suse dot de
2004-03-17 22:19 [Bug c++/14622] New: " jens dot maurer at gmx dot net
2004-03-18  0:19 ` [Bug c++/14622] " pinskia 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).