public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/25666]  New: Bad diagnostic for templated destructor as friend
@ 2006-01-04 11:16 reichelt at gcc dot gnu dot org
  2006-01-04 15:00 ` [Bug c++/25666] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 3+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-01-04 11:16 UTC (permalink / raw)
  To: gcc-bugs

This is a spin-off for the diagnostic issue from PR 25638:

=========================================
struct A { ~A(); };

struct B
{
    template<int> friend A::~A();
};
=========================================

For the above code we get the error message:

  bug.cc:5: error: prototype for 'A::~A()' does not match any in class 'A'
  bug.cc:1: error: candidate is: A::~A()

The error message could be better:
1) A destructor can never be a template. This is not mentioned yet.
2) We only print 'A::~A()' as the prototype. We should probably print
   that we have a template here. Otherwise there's no difference to the
   rejected candidate.


-- 
           Summary: Bad diagnostic for templated destructor as friend
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: diagnostic, monitored
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


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



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

end of thread, other threads:[~2013-05-25  8:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-25666-4@http.gcc.gnu.org/bugzilla/>
2012-10-16  1:18 ` [Bug c++/25666] Bad diagnostic for templated destructor as friend paolo.carlini at oracle dot com
2013-05-25  8:41 ` paolo.carlini at oracle dot com
2006-01-04 11:16 [Bug c++/25666] New: " reichelt at gcc dot gnu dot org
2006-01-04 15:00 ` [Bug c++/25666] " 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).