This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/17152] Useless error message
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Aug 2004 14:07:33 -0000
- Subject: [Bug c++/17152] Useless error message
- References: <20040823135432.17152.paavola@skycomputers.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-08-23 14:07 -------
I think the error message is actually quite clear: you try to make
something a friend which isn't known: for a friend declaration, if
name lookup doesn't find an existing name, and if it is a declaration
of either a function or a function template, then this injects the
name into the surrounding namespace. However, this doesn't apply for
a function template specialization, as in your case, if the actual
template declaration isn't available. Thus the compiler complains
that you are trying to declare something you can't declare (a non-function,
non-template). It should be obvious that the compiler can't do anything
about it unless you provide a declaration of the general template.
I leave it to others to decide whether we want to keep this PR and if so
how to change the error message. I personally would vote for closing it.
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17152