This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/745: ICE when using 'while' as a 'for' statement
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/745: ICE when using 'while' as a 'for' statement
- From: carll at online dot no
- Date: 7 Nov 2000 17:17:50 -0000
- Reply-To: carll at online dot no
>Number: 745
>Category: c++
>Synopsis: ICE when using 'while' as a 'for' statement
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: ice-on-illegal-code
>Submitter-Id: net
>Arrival-Date: Tue Nov 07 09:26:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator: carll@online.no
>Release: gcc version 2.96 20000731
>Organization:
>Environment:
Red Hat Linux 7.0
>Description:
Somehow I managed to write the following statement;
while (int x = 0; x < 10; x++) { }
it created the following error:
while_for.C: In function `int main ()':
while_for.C:2: parse error before `;'
while_for.C:2: parse error before `)'
while_for.C:2: Internal error #122.
while_for.C:2: Internal compiler error in finish_function, at
../gcc/cp/decl.c:14422
>How-To-Repeat:
gcc while_for.C -o wf
>Fix:
Detect it...
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="while_for.C"
Content-Disposition: inline; filename="while_for.C"
int main() {
while (int x = 0; x < 10; x++) { }
}