Gcc emits the following error message when I compile the code in the 'How-To-Repeat' section. t.cc:16: sorry, not implemented: use of `ptrmem_cst' in template type unification t.cc: In function `void f()': t.cc:16: warning: unused variable `bar<baz, &baz::the_foo_, baz> i' Release: gcc version 3.1 20010225 (experimental) Environment: i686-pc-linux-gnu, RedHat 6.2 How-To-Repeat: Compiling the following code with 'gcc -c <filename>' will repeat the problem. template<typename Element, int Element::*Foo, typename CVElement> struct bar { bar() {} template<typename CVE> bar(const bar<Element, Foo, CVE>& x) {} }; struct baz { int the_foo_; }; void f() { bar<baz, &baz::the_foo_, baz> i = bar<baz, &baz::the_foo_, baz>(); }
State-Changed-From-To: open->closed State-Changed-Why: I'm closing this PR - the error message indicates that the GCC team is aware of the issue; thus an extra bug report is unnecessary and just lowers the signal to noise ratio of GNATS.
From: neil@gcc.gnu.org To: gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org, togawa@acm.org Cc: Subject: Re: c++/2094 Date: 26 Feb 2001 07:44:15 -0000 Synopsis: gcc3.1 emits 'sorry, not implemented: use of `ptrmem_cst' in template type unification' State-Changed-From-To: open->closed State-Changed-By: neil State-Changed-When: Sun Feb 25 23:44:15 2001 State-Changed-Why: I'm closing this PR - the error message indicates that the GCC team is aware of the issue; thus an extra bug report is unnecessary and just lowers the signal to noise ratio of GNATS. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=2094&database=gcc
State-Changed-From-To: closed->open State-Changed-Why: Re-opened on request of submitter.
From: neil@gcc.gnu.org To: gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org, togawa@acm.org Cc: Subject: Re: c++/2094 Date: 26 Feb 2001 19:16:55 -0000 Synopsis: gcc3.1 emits 'sorry, not implemented: use of `ptrmem_cst' in template type unification' State-Changed-From-To: closed->open State-Changed-By: neil State-Changed-When: Mon Feb 26 11:16:55 2001 State-Changed-Why: Re-opened on request of submitter. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=2094&database=gcc
State-Changed-From-To: open->analyzed State-Changed-Why: Confirm as a bug.
From: lerdsuwa@gcc.gnu.org To: gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org, togawa@acm.org Cc: Subject: Re: c++/2094 Date: 14 Mar 2001 11:54:15 -0000 Synopsis: gcc3.1 emits 'sorry, not implemented: use of `ptrmem_cst' in template type unification' State-Changed-From-To: open->analyzed State-Changed-By: lerdsuwa State-Changed-When: Wed Mar 14 03:54:15 2001 State-Changed-Why: Confirm as a bug. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=2094&database=gcc
From: Wolfgang Bangerth <bangerth@apex68.ticam.utexas.edu> To: gcc-gnats@gcc.gnu.org Cc: Subject: c++/2094: gcc3.1 emits 'sorry, not implemented: use of `ptrmem_cst' in template type unification' Date: Thu, 14 Nov 2002 14:58:06 -0600 Confirmed with CVS from 2002-11-10. The present error message is somewhat annoying, since it repeats the same text twice: tmp/g> /home/bangerth/bin/gcc-3.3x-pre/bin/c++ -c x.cc x.cc:16: sorry, unimplemented: sorry, not implemented: use of `ptrmem_cst' in template type unification
From: Wolfgang Bangerth <bangerth@ticam.utexas.edu> To: Gabriel Dos Reis <gdr@integrable-solutions.net> Cc: Wolfgang Bangerth <bangerth@apex68.ticam.utexas.edu>, <gcc-gnats@gcc.gnu.org> Subject: Re: c++/2094: gcc3.1 emits 'sorry, not implemented: use of `ptrmem_cst' in template type unification' Date: Thu, 14 Nov 2002 15:15:46 -0600 (CST) > Wolfgang Bangerth <bangerth@apex68.ticam.utexas.edu> writes: > > | Confirmed with CVS from 2002-11-10. The present error message is somewhat annoying, since it repeats the same > | text twice: > | tmp/g> /home/bangerth/bin/gcc-3.3x-pre/bin/c++ -c x.cc > | x.cc:16: sorry, unimplemented: sorry, not implemented: use of `ptrmem_cst' in > > I think I have an idea of where that repeatition is coming from. > Expect a patch to correct that annoyance in a moment. Very good, I took a quick look but got lost in the macro jungle too quickly and did not have my laser macro sword (== plenty of free time) with me, so left it to others :-) Thanks Wolfgang ------------------------------------------------------------------------- Wolfgang Bangerth email: bangerth@ticam.utexas.edu www: http://www.ticam.utexas.edu/~bangerth
From: Gabriel Dos Reis <gdr@integrable-solutions.net> To: Wolfgang Bangerth <bangerth@apex68.ticam.utexas.edu> Cc: gcc-gnats@gcc.gnu.org Subject: Re: c++/2094: gcc3.1 emits 'sorry, not implemented: use of `ptrmem_cst' in template type unification' Date: 14 Nov 2002 22:08:46 +0100 Wolfgang Bangerth <bangerth@apex68.ticam.utexas.edu> writes: | Confirmed with CVS from 2002-11-10. The present error message is somewhat annoying, since it repeats the same | text twice: | tmp/g> /home/bangerth/bin/gcc-3.3x-pre/bin/c++ -c x.cc | x.cc:16: sorry, unimplemented: sorry, not implemented: use of `ptrmem_cst' in I think I have an idea of where that repeatition is coming from. Expect a patch to correct that annoyance in a moment. -- Gaby
From: Wolfgang Bangerth <bangerth@ices.utexas.edu> To: gcc-gnats@gcc.gnu.org Cc: Subject: Re: c++/2094 Date: Mon, 5 May 2003 19:18:08 -0500 (CDT) The duplicate message is gone, but ptrmem_cst is still not implemented. W. ------------------------------------------------------------------------- Wolfgang Bangerth email: bangerth@ices.utexas.edu www: http://www.ices.utexas.edu/~bangerth/
From: Wolfgang Bangerth <bangerth@ices.utexas.edu> To: gcc-gnats@gcc.gnu.org Cc: Subject: Re: c++/2094 Date: Mon, 5 May 2003 19:30:36 -0500 (CDT) Here's a small testcase that is somewhat more like our usual ones: --------------------- struct S { int i; }; template<int S::*p, typename> struct X { X (); template<typename U> X(const X<p,U> &); }; X<&S::i,S> x = X<&S::i,S>(); ----------------------------
Patch submitted: http://gcc.gnu.org/ml/gcc-patches/2003-06/msg02859.html
Subject: Bug 2094 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_3-branch Changes by: bernie@gcc.gnu.org 2003-11-14 04:31:14 Modified files: gcc/cp : pt.c ChangeLog Log message: Backport from 3.4-branch. 2003-06-25 Giovanni Bajo <giovannibajo@libero.it> PR c++/2094 * pt.c (unify): Add support for PTRMEM_CST and FIELD_DECL unification. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.635.2.37&r2=1.635.2.38 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.3076.2.220&r2=1.3076.2.221
Subject: Bug 2094 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_3-branch Changes by: bernie@gcc.gnu.org 2003-11-14 04:34:52 Modified files: gcc/testsuite : ChangeLog Added files: gcc/testsuite/g++.dg/template: ptrmem6.C Log message: Backport from 3.4-branch 2003-06-25 Giovanni Bajo <giovannibajo@libero.it> PR c++/2094 * g++.dg/template/ptrmem6.C: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.2261.2.317&r2=1.2261.2.318 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/ptrmem6.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.20.1
Bernardo, this was not applied on the mainline at all and it was not approved as far as I could see, could you make sure it was approved and then apply it to the mainline as of two weeks ago, this was not accepted on the mainline.
Subject: Bug 2094 CVSROOT: /cvs/gcc Module name: gcc Changes by: bernie@gcc.gnu.org 2003-11-14 04:51:22 Modified files: gcc/cp : ChangeLog pt.c Log message: PR c++/2094 * pt.c (unify): Add support for PTRMEM_CST and FIELD_DECL unification. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3759&r2=1.3760 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.793&r2=1.794
Subject: Bug 2094 CVSROOT: /cvs/gcc Module name: gcc Changes by: bernie@gcc.gnu.org 2003-11-14 05:13:45 Modified files: gcc/testsuite : ChangeLog Added files: gcc/testsuite/g++.dg/template: ptrmem7.C Log message: PR c++/2094 * g++.dg/template/ptrmem7.C: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3191&r2=1.3192 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/ptrmem7.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
Fixed for 3.3.3.
(In reply to comment #15) > Bernardo, this was not applied on the mainline at all and it was not approved as far as I could see, > could you make sure it was approved and then apply it to the mainline as of two weeks ago, this > was not accepted on the mainline. The patch was approved for mainline here: http://gcc.gnu.org/ml/gcc-patches/2003-11/msg00667.html And for 3.3-branch here: http://gcc.gnu.org/ml/gcc-patches/2003-11/msg00652.html I had the patch applied to mainline in my local tree. Shortly after committing on 3.3, I realized the mainline version wasn't yet in CVS. Now it's in both branches.
Yes, it's approved for both mainline and 3.3 branch. This bug has now been fixed for any future version of GCC starting from 3.3.3. Thank you Bernardo for taking care of the commit!