From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5187 invoked by alias); 2 May 2003 18:36:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 5132 invoked by uid 71); 2 May 2003 18:36:00 -0000 Date: Fri, 02 May 2003 18:36:00 -0000 Message-ID: <20030502183600.5129.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: "Giovanni Bajo" Subject: Re: c++/9127: Misleading diagnostic for missing template<> introducing specialization Reply-To: "Giovanni Bajo" X-SW-Source: 2003-05/txt/msg00147.txt.bz2 List-Id: The following reply was made to PR c++/9127; it has been noted by GNATS. From: "Giovanni Bajo" To: , , , , Cc: Subject: Re: c++/9127: Misleading diagnostic for missing template<> introducing specialization Date: Fri, 2 May 2003 20:29:05 +0200 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9127 Well, the problem is that the compiler is entering an instantiation recursion which should be terminated by the explicit specialization. Since the spiecialization is invalid (and skipped by the compiler), the loop never ends. The problem about the too long output is already covered by c++/9335. So, I keep this PR open only because the diagnostic of 3.4 could be improved: ----------------------------------- template struct A; struct A<0> {}; ----------------------------------- pr9127.cpp:5: error: too few template-parameter-lists The same code snippet on Comeau gives: "pr9127.cpp", line 4: error: specializing class "A<0>" without "template<>" syntax is nonstandard which is _far_ better. Giovanni Bajo