From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31161 invoked by alias); 18 Dec 2002 23:16:02 -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 31120 invoked by uid 71); 18 Dec 2002 23:16:01 -0000 Resent-Date: 18 Dec 2002 23:16:01 -0000 Resent-Message-ID: <20021218231601.31118.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, bangerth@ticam.utexas.edu Received: (qmail 30375 invoked by uid 61); 18 Dec 2002 23:12:59 -0000 Message-Id: <20021218231259.30374.qmail@sources.redhat.com> Date: Wed, 18 Dec 2002 15:16:00 -0000 From: bangerth@ticam.utexas.edu Reply-To: bangerth@ticam.utexas.edu To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/8999: SegFault after illegal template declaration X-SW-Source: 2002-12/txt/msg00982.txt.bz2 List-Id: >Number: 8999 >Category: c++ >Synopsis: SegFault after illegal template declaration >Confidential: no >Severity: non-critical >Priority: low >Responsible: unassigned >State: open >Class: ice-on-illegal-code >Submitter-Id: net >Arrival-Date: Wed Dec 18 15:16:00 PST 2002 >Closed-Date: >Last-Modified: >Originator: Wolfgang Bangerth >Release: unknown-1.0 >Organization: >Environment: gcc 3.3 CVS of last week >Description: While loosing overview of a small template metaprogramming project, I happened to write something like -------------------------------- template struct X {}; int main () {}; -------------------------------- The second template parameter of X is incorrectly given. This crashes the compiler: tmp/g> /home/bangerth/bin/gcc-3.3-pre/bin/c++ -c y.cc y.cc:1: error: parse error before `>' token y.cc:3: error: cannot declare `::main' to be a template y.cc:3: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. >How-To-Repeat: >Fix: Write correct code. >Release-Note: >Audit-Trail: >Unformatted: