# gcc -c template.cc template.cc: In method `a<A>::a ()': template.cc:15: parse error before `>' template.cc: In method `void a<A>::foo ()': template.cc:21: parse error before `>'
Created attachment 28715 [details] A testcase
gcc 3.1 still fails to compile it.
Created attachment 28814 [details] A patch
I am enclosing a patch. It seems to work for the testcase. But I have NO idea if it is correct at all.
Created attachment 28895 [details] A new patch
I bootstrapped gcc 2.96 without regression.
Can you please mail this to gcc-patches yourself? I don't think I have to act as an interface between you and Jason/Mark and this is a gcc 3.x bug. Once some patch is agreed on, I'll of course put it in.
Done. See http://gcc.gnu.org/ml/gcc-patches/2001-08/msg01274.html
But you haven't mention that the bug is present in 3.0 and 3.1 too.
Created attachment 29275 [details] A testcase
Created attachment 29276 [details] A new testcase
It is a very strange bug. My last patch is not complete/correct. # diff -up 1.cc 2.cc --- 1.cc Thu Aug 23 13:45:48 2001 +++ 2.cc Thu Aug 23 13:45:30 2001 @@ -15,7 +15,7 @@ struct a } template<typename T> - void get() { + void set() { } }; # gcc 1.cc 2.cc -c 2.cc: In method `a<A>::a ()': 2.cc:14: parse error before `>'
Created attachment 29298 [details] Another testcase
My patch doesn't help much in this new testcase. # gcc -c 3.cc 3.cc: In method `void a<A>::a1 ()': 3.cc:33: parse error before `>' 3.cc: In method `void a<A>::a2 ()': 3.cc:40: parse error before `>' 3.cc: In method `void a<A>::a3 ()': 3.cc:47: parse error before `>' 3.cc: In method `void a<A>::a4 ()': 3.cc:54: parse error before `>' 3.cc: In method `void a<A>::a5 ()': 3.cc:61: parse error before `>' 3.cc: In method `void a<A>::a6 ()': 3.cc:68: parse error before `>' 3.cc: In method `void a<A>::a7 ()': 3.cc:76: parse error before `>' 3.cc: In method `void a<A>::a8 ()': 3.cc:84: parse error before `>'
Created attachment 29346 [details] A new patch
Here is a new patch. It seems to work with 3.cc. BTW, I am not sure if the gcc people think it is a real problem since I got zero response from the gcc mailing list.
My patch is not correct. I just hope it leads to a real fix.
Created attachment 29417 [details] A new patch
My new patch seems to work and causes no regressions in gcc 2.96.
Created attachment 29614 [details] Another testcase
I uploaded another testcase. I am testing a new patch now.
Created attachment 29674 [details] A new patch
Fails through gcc 3.2; fixed in gcc 3.3.