------- Comment #3 from jason at gcc dot gnu dot org 2010-02-12 17:00 ------- Your patch is correct; the default3.C failure is exposing a latent bug whereby we fail to combine the default args from two templates, as we can see with this testcase that fails without the patch:
template<typename> void g4(int, int); template<typename> void g4(int, int = 0) {} int main() { g4<int>(0); } This worked in 2.95, but does not in 3.4. See also PR 15339. Go ahead and apply your patch, XFAIL that test in default3.C, and make a note of it in that PR. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43033