This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[C++ PATCH] [PR18733] Fix specializations in friend declarations


it looks like that when I enforced the checks for missing specialization
template headers back in July:

2004-07-21  Giovanni Bajo  <>

        PR c++/14497
        * pt.c (check_explicit_specialization): Remove extension to accept
        specializations without template headers. Fall-through to normal

I managed to expose a bug that shows that we do not currently handle
correctly specializations in friend declarations. The rules for friend
declarations are surely easier: you can name any (full) specialization with
template headers at all. So, current_tmpl_spec_kind does not apply for
friend functions. My patch now avoids to call it in

Tested on i686-pc-linux-gnu with no new regressions, OK for mainline?

Giovanni Bajo

        * pt.c (check_explicit_specialization): Use special logic to
        befriended specializations.

        * g++.dg/template/friend32.C: New testcase.

Attachment: patch-pr18733.txt
Description: Text document

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]