This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/5976: ICE on incomplete if-statement



>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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]