public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/37093]  New: [4.2/4.3/4.4 Regression] ICE with pointer to member template parameters
Date: Tue, 12 Aug 2008 11:50:00 -0000	[thread overview]
Message-ID: <bug-37093-87@http.gcc.gnu.org/bugzilla/> (raw)

template <class C, void (C::*M) ()>
static void foo (void *obj)
{
  C *p = static_cast<C*> (obj);
  (p->*M) ();
}

template <class C>
static void bar (C *c, void (C::*m) ())
{
  foo<C, m> ((void *) c);
}

struct S
{
  void baz () {}
};

int
main ()
{
  S a;
  bar (&a, &S::baz);
}

ICEs since 4.0 (in 3.4 and before before it gave
rh458297.C: In function `void bar(C*, void (C::*)()) [with C = S]':
rh458297.C:23:   instantiated from here
rh458297.C:11: error: `m' is not a valid template argument
rh458297.C:11: error: it must be a pointer-to-member of the form `&X::Y'
rh458297.C:11: error: no matching function for call to `foo(void*)'
).


-- 
           Summary: [4.2/4.3/4.4 Regression] ICE with pointer to member
                    template parameters
           Product: gcc
           Version: 4.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jakub at gcc dot gnu dot org


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


             reply	other threads:[~2008-08-12 11:50 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-12 11:50 jakub at gcc dot gnu dot org [this message]
2008-08-12 11:51 ` [Bug c++/37093] " jakub at gcc dot gnu dot org
2008-08-13 16:18 ` bangerth at dealii dot org
2008-08-13 20:38 ` reichelt at gcc dot gnu dot org
2008-08-13 20:58 ` reichelt at gcc dot gnu dot org
2008-08-13 21:01 ` reichelt at gcc dot gnu dot org
2008-08-22 15:24 ` rguenth at gcc dot gnu dot org
2008-08-22 16:54 ` maksverver at geocities dot com
2008-08-27 22:12 ` jsm28 at gcc dot gnu dot org
2008-12-27 14:28 ` pinskia at gcc dot gnu dot org
2008-12-29  6:56 ` pinskia at gcc dot gnu dot org
2008-12-30  1:31 ` pinskia at gcc dot gnu dot org
2008-12-30  1:39 ` pinskia at gcc dot gnu dot org
2008-12-30  1:42 ` pinskia at gcc dot gnu dot org
2008-12-30  5:23 ` pinskia at gcc dot gnu dot org
2008-12-30  5:36 ` pinskia at gcc dot gnu dot org
2008-12-30 22:23 ` pinskia at gcc dot gnu dot org
2009-01-24 10:26 ` rguenth at gcc dot gnu dot org
2009-01-30 15:49 ` bangerth at gmail dot com
2009-01-30 15:52 ` bangerth at gmail dot com
2009-04-21 22:48 ` [Bug c++/37093] [4.2/4.3/4.4/4.5 " pinskia at gcc dot gnu dot org
2009-08-04 12:42 ` rguenth at gcc dot gnu dot org
2009-10-30 16:03 ` dodji at gcc dot gnu dot org
2009-10-31  7:06 ` dodji at gcc dot gnu dot org
2009-11-02 19:55 ` dodji at gcc dot gnu dot org
2009-11-02 19:59 ` dodji at gcc dot gnu dot org
2009-11-02 20:08 ` [Bug c++/37093] [4.2/4.3/ " dodji at gcc dot gnu dot org
2009-11-03  9:24 ` [Bug c++/37093] [4.2/4.3 " dodji at gcc dot gnu dot org
2009-11-03  9:25 ` dodji at gcc dot gnu dot org
2009-11-04 19:24 ` dodji at gcc dot gnu dot org
2009-11-09 21:54 ` reichelt at gcc dot gnu dot org
2010-02-09 12:08 ` laikechen at gmail dot com
2010-07-24 18:20 ` pinskia at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-37093-87@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).