From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20441 invoked by alias); 1 May 2003 17:26:00 -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 20419 invoked by uid 71); 1 May 2003 17:26:00 -0000 Resent-Date: 1 May 2003 17:26:00 -0000 Resent-Message-ID: <20030501172600.20418.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, giovannibajo@libero.it Received: (qmail 14626 invoked by uid 48); 1 May 2003 17:19:50 -0000 Message-Id: <20030501171950.14625.qmail@sources.redhat.com> Date: Thu, 01 May 2003 17:26:00 -0000 From: giovannibajo@libero.it Reply-To: giovannibajo@libero.it To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/10583: [3.4 regression] ICE with missing typename to refer to nested struct X-SW-Source: 2003-05/txt/msg00044.txt.bz2 List-Id: >Number: 10583 >Category: c++ >Synopsis: [3.4 regression] ICE with missing typename to refer to nested struct >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: ice-on-illegal-code >Submitter-Id: net >Arrival-Date: Thu May 01 17:26:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Giovanni Bajo >Release: 3.4 CVS 20030430 >Organization: >Environment: i686-pc-cygwin >Description: The following snippet triggers an ICE on the mainline: ---------------------------------- template struct A { struct B {}; }; template void func(A::B* ) { } int main() { func(0); } ---------------------------------- regr3.cpp:9: error: variable or field `func' declared void regr3.cpp:9: error: template declaration of `int func' regr3.cpp:9: error: expected primary-expression regr3.cpp:10: error: expected `;' regr3.cpp: In function `int main()': regr3.cpp:15: internal compiler error: in cp_parser_template_id, at cp/parser.c:8013 Please submit a full bug report, The code is illegal (it's missing a typename), but the compiler should not ICE anyway. Moreover, the error message is _very_ confusing. >How-To-Repeat: >Fix: Fix the code adding a typename in front of A::B. >Release-Note: >Audit-Trail: >Unformatted: