public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/5355: pointer to templated function gives internal error
@ 2002-06-07  8:09 lerdsuwa
  0 siblings, 0 replies; 2+ messages in thread
From: lerdsuwa @ 2002-06-07  8:09 UTC (permalink / raw)
  To: berend.meijer, bmeijer, gcc-bugs, gcc-prs, nobody

Synopsis: pointer to templated function gives internal error

State-Changed-From-To: open->closed
State-Changed-By: lerdsuwa
State-Changed-When: Fri Jun  7 08:09:29 2002
State-Changed-Why:
    Fixed in GCC 3.0, 3.1.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5355


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

* c++/5355: pointer to templated function gives internal error
@ 2002-01-10 16:46 bmeijer
  0 siblings, 0 replies; 2+ messages in thread
From: bmeijer @ 2002-01-10 16:46 UTC (permalink / raw)
  To: gcc-gnats; +Cc: berend.meijer


>Number:         5355
>Category:       c++
>Synopsis:       pointer to templated function gives internal error
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 10 16:46:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Berend Meijer
>Release:        MINGW 2.95.2-1
>Organization:
>Environment:
Windows 98
>Description:
An attempt to create a pointer to a templated member function causes an internal compiler error. See attached minimum code example.
>How-To-Repeat:
class TryIt
{
  public:
    template<typename T> T *create()
    {
      Deletor=destroy<T>;
      return new T;
    }

    template<typename T> void destroy(void *&Ptr)
    {
      Deletor(reinterpret_cast<T *>(Ptr));
    }

  private:
    void (*Deletor)(void *&Ptr);
};

void main()
{
  TryIt Try;
  int *Ptr = Try.create<int>();
}
>Fix:
No workaround found. I'm open to suggestions.
>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2002-06-07 15:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-07  8:09 c++/5355: pointer to templated function gives internal error lerdsuwa
  -- strict thread matches above, loose matches on Subject: below --
2002-01-10 16:46 bmeijer

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