From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9106 invoked by alias); 8 Feb 2009 22:35:35 -0000 Received: (qmail 9074 invoked by uid 48); 8 Feb 2009 22:35:24 -0000 Date: Sun, 08 Feb 2009 22:35:00 -0000 Message-ID: <20090208223524.9073.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/34397] [4.2/4.3/4.4 regression] ICE on invalid default template parameter In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "mmitchel at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-02/txt/msg00747.txt.bz2 ------- Comment #21 from mmitchel at gcc dot gnu dot org 2009-02-08 22:35 ------- Paolo -- My earlier suggestion to try grok_array_decl may indeed have been misguided. Some of the grok_* functions do more parser-style analysis than we want when processing templates. In theory, the way this ought to work is that we parse for a while, until we know what the user meant, and then call a function that actually generates code. When processing a template, we call that same underlying function after substitution. But, in practice, we may not always have organized things that tidily. In that case, the best fix is to factor out syntactic dismabiguation bits from grok_array_decl, and make a new underlying function that is called from both the parser and the template machinery. -- Mark -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34397