public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14409] New: [3.3/3.4/3.5 regression] Accepts invalid function signature for explicit instantiation
@ 2004-03-03 15:32 bangerth at dealii dot org
  2004-03-03 15:32 ` [Bug c++/14409] " bangerth at dealii dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: bangerth at dealii dot org @ 2004-03-03 15:32 UTC (permalink / raw)
  To: gcc-bugs

3.3, 3.4 and mainline accept this piece of invalid code (note the 
missing 'const' on the signature in the explicit instantiation): 
-------------------- 
template <typename T> struct X 
{ 
    template <typename U> void foo (U) const {}; 
}; 
 
template void X<int>::foo (int); 
-------------------- 
 
On the other hand, 2.95 rejected this: 
g/x> /home/bangerth/bin/gcc-2*/bin/c++ -c x.cc 
x.cc:6: template-id `foo<>' for `X<int>::foo(int)' does not match any template 
declaration 
x.cc:6: confused by earlier errors, bailing out 
 
So this is a regression. 
 
W.

-- 
           Summary: [3.3/3.4/3.5 regression] Accepts invalid function
                    signature for explicit instantiation
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bangerth at dealii dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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

end of thread, other threads:[~2004-03-10  8:49 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-03 15:32 [Bug c++/14409] New: [3.3/3.4/3.5 regression] Accepts invalid function signature for explicit instantiation bangerth at dealii dot org
2004-03-03 15:32 ` [Bug c++/14409] " bangerth at dealii dot org
2004-03-03 17:00 ` pinskia at gcc dot gnu dot org
2004-03-03 19:22 ` giovannibajo at libero dot it
2004-03-04  3:29 ` giovannibajo at libero dot it
2004-03-09 10:45 ` mmitchel at gcc dot gnu dot org
2004-03-09 15:27 ` giovannibajo at libero dot it
2004-03-09 15:35 ` cvs-commit at gcc dot gnu dot org
2004-03-09 15:41 ` cvs-commit at gcc dot gnu dot org
2004-03-09 16:00 ` [Bug c++/14409] [3.3 " gdr at integrable-solutions dot net
2004-03-09 16:23 ` cvs-commit at gcc dot gnu dot org
2004-03-09 16:25 ` giovannibajo at libero dot it
2004-03-10  8:49 ` gdr at integrable-solutions dot net

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).