This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/5976: ICE on incomplete if-statement
- From: reichelt at igpm dot rwth-aachen dot de
- To: gcc-gnats at gcc dot gnu dot org
- Date: 15 Mar 2002 15:27:09 -0000
- Subject: c++/5976: ICE on incomplete if-statement
- Reply-to: reichelt at igpm dot rwth-aachen dot de
>Number: 5976
>Category: c++
>Synopsis: ICE on incomplete if-statement
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: ice-on-illegal-code
>Submitter-Id: net
>Arrival-Date: Fri Mar 15 07:36:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Volker Reichelt
>Release: gcc 3.1 20020311 (prerelease)
>Organization:
>Environment:
mips-sgi-irix6.5, i686-pc-linux-gnu
>Description:
The following code produces an ICE:
------------------------snip here---------------
template <int i> void foo () { if }
void bar() { foo<0>(); }
------------------------snip here---------------
The error message is:
bug.cpp: In function `void foo()':
bug.cpp:1: parse error before `}' token
bug.cpp: In function `void foo() [with int i = 0]':
bug.cpp:2: instantiated from here
bug.cpp:1: Internal compiler error in expand_body, at cp/semantics.c:2407
Please submit a full bug report, [etc.]
This is a regression from 3.0.x.
>How-To-Repeat:
g++ -c bug.cpp
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: