Description of problem: The following code compiles with gcc-3.4.1-2 from fc3test1. It doesn't compile with gcc-3.4.1-10 from fc3test2. It doesn't compile either with a vanilla gcc 3.4.2 built from sources. I believe a bad patch has been integrated from gcc 3.4.2 into your copy of gcc 3.4.1. $ cat > foo.cc namespace nmr { template <class T> void helper(); } template <class T> void nmr::helper() { } template <> void nmr::helper<char>() { } $ $ g++ -c foo.cc foo.cc:7: error: specialization of `template<class T> void nmr::helper()' in different namespace foo.cc:5: error: from definition of `template<class T> void nmr::helper()' $ Version-Release number of selected component (if applicable): gcc-c++-3.4.1-10 How reproducible: Always Steps to Reproduce: 1. Get attached C++ source foo.cc 2. g++ -c foo.cc Actual results: Compilation fails. Expected results: Compilation succeeds.
Created attachment 104772 [details] testcase
Mmmh... It looks like the Comeau compiler agrees with gcc-3.4.1-10, so I guess this may be one of these C++ subtleties again, not a gcc bug. I'm not sure which paragraph of the C++ standard this error message corresponds to. Note that gcc35-3.5.0-0.3 from fc3test1 does compile the code. So it could be a gcc 3.5.0 regression instead of gcc 3.4.1 bug.
But gcc4-4.0.0-0.2 agrees with gcc-3.4.1-10.
Ah OK, this seems to confirm this is not a spurious error message, but the result of the stricter application of the standard. However I understand fc3 will ship with gcc-3.4.1 and gcc35-3.5.0, not with gcc4-4.0.0. At least I can't find that package in the fc3test2 distribution. Isn't it a problem if there's a regression in gcc35-3.5.0? I'm just nitpicking... As far as I'm concerned, I don't intend to use gcc 3.5 on Fedora before it's the "native" compiler of Fedora.
I've now tried gcc35-3.5.0-0.9 from fc3test2. It also exits with an error, unlike gcc35-3.5.0-0.3 from fc3test1, and like gcc-3.4.1-10. So this definitely looks like stricter application of the standard. I still don't know which paragraph of the standard, but anyway... Sorry for the noise.
FC3 is going to use gcc4-4.0.0-0.*.