From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9013 invoked by alias); 15 Jan 2003 17:16:05 -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 8959 invoked by uid 71); 15 Jan 2003 17:16:02 -0000 Date: Wed, 15 Jan 2003 17:16:00 -0000 Message-ID: <20030115171602.8955.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Wolfgang Bangerth Subject: Re: c++/9298: [3.4 regression] [new parser] ICE with function-pointer-type template args Reply-To: Wolfgang Bangerth X-SW-Source: 2003-01/txt/msg00967.txt.bz2 List-Id: The following reply was made to PR c++/9298; it has been noted by GNATS. From: Wolfgang Bangerth To: Volker Reichelt , , Cc: Subject: Re: c++/9298: [3.4 regression] [new parser] ICE with function-pointer-type template args Date: Wed, 15 Jan 2003 11:11:32 -0600 (CST) > BTW, the code is illegal (there are three bugs): Of course the code is illegal, but I can really only spot one error :-) > template static int foo(); > ^^^^^^ Why shouldn't a template not be a static function? It's illegal, though, to use its address as a template parameter! > template int CPU::dispatch<&template foo<2> > (); > ^^ ^^^^^^^^ The one at the left: That's an explicit instantiation, not specialization, so this is legal syntax. The syntax at the right should be wrong, though (well, not quite sure, should it?). W. ------------------------------------------------------------------------- Wolfgang Bangerth email: bangerth@ticam.utexas.edu www: http://www.ticam.utexas.edu/~bangerth/