From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15128 invoked by alias); 23 Aug 2004 14:07:35 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 15036 invoked by uid 48); 23 Aug 2004 14:07:33 -0000 Date: Mon, 23 Aug 2004 14:07:00 -0000 Message-ID: <20040823140733.15035.qmail@sourceware.org> From: "bangerth at dealii dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040823135432.17152.paavola@skycomputers.com> References: <20040823135432.17152.paavola@skycomputers.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/17152] Useless error message X-Bugzilla-Reason: CC X-SW-Source: 2004-08/txt/msg02324.txt.bz2 List-Id: ------- 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